当前位置: 首页>>代码示例>>Java>>正文


Java MessageDismissalException类代码示例

本文整理汇总了Java中org.kuali.rice.kcb.api.exception.MessageDismissalException的典型用法代码示例。如果您正苦于以下问题:Java MessageDismissalException类的具体用法?Java MessageDismissalException怎么用?Java MessageDismissalException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MessageDismissalException类属于org.kuali.rice.kcb.api.exception包,在下文中一共展示了MessageDismissalException类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: remove

import org.kuali.rice.kcb.api.exception.MessageDismissalException; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kcb.service.MessagingService#remove(long, java.lang.String, java.lang.String)
 */
@Override
public void remove(long messageId, String user, String cause) throws MessageDismissalException {
    /*if (StringUtils.isBlank(messageId)) {
        throw new RiceIllegalArgumentException("message is null");
    } if we switch to String id*/

    if (StringUtils.isBlank(user)) {
        throw new RiceIllegalArgumentException("user is null");
    }

    if (StringUtils.isBlank(cause)) {
        throw new RiceIllegalArgumentException("cause is null");
    }

    Message m = messageService.getMessage(Long.valueOf(messageId));
    if (m == null) {
        throw new MessageDismissalException("No such message: " + messageId);
    }

    remove (m, user, cause);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:25,代码来源:MessagingServiceImpl.java

示例2: removeByOriginId

import org.kuali.rice.kcb.api.exception.MessageDismissalException; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kcb.service.MessagingService#removeByOriginId(java.lang.String, java.lang.String, java.lang.String)
 */
@Override
public Long removeByOriginId(String originId, String user, String cause) throws MessageDismissalException {
    if (StringUtils.isBlank(originId)) {
        throw new RiceIllegalArgumentException("originId is null");
    }

    Message m = messageService.getMessageByOriginId(originId);
    if (m == null) {
        return null; 
        //throw new MessageDismissalException("No such message with origin id: " + originId);
    }
    remove(m, user, cause);
    return m.getId();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:MessagingServiceImpl.java

示例3: dismiss

import org.kuali.rice.kcb.api.exception.MessageDismissalException; //导入依赖的package包/类
/**
 * @see MessageDeliverer#dismiss(MessageDelivery, String, String)
 */
public void dismiss(MessageDelivery messageDelivery, String user, String cause) throws MessageDismissalException {
    // we can't remove an sms message once it has been sent
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:SMSMessageDeliverer.java

示例4: dismiss

import org.kuali.rice.kcb.api.exception.MessageDismissalException; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kcb.deliverer.MessageDeliverer#dismiss(org.kuali.rice.kcb.bo.MessageDelivery, java.lang.String, java.lang.String)
 */
public void dismiss(MessageDelivery messageDelivery, String user, String cause) throws MessageDismissalException {
    deliveries.remove(messageDelivery.getId());

}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:MockMessageDeliverer.java

示例5: dismiss

import org.kuali.rice.kcb.api.exception.MessageDismissalException; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kcb.deliverer.MessageDeliverer#dismiss(org.kuali.rice.kcb.bo.MessageDelivery, java.lang.String, java.lang.String)
 */
public void dismiss(MessageDelivery messageDelivery, String user, String cause) throws MessageDismissalException {
    // we can't remove an email message once it has been sent
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:EmailMessageDeliverer.java

示例6: remove

import org.kuali.rice.kcb.api.exception.MessageDismissalException; //导入依赖的package包/类
/**
 * Removes a specific message and all deliveries
 * 
 * @param messageId id of the message to remove
 * @param user the user under which the action was taken
 * @param cause the cause or action taken to remove the message
 * @throws MessageDismissalException if no message for the given messageId is found.
 * @throws RiceIllegalArgumentException if user, cause is null.
 */
public void remove(long messageId, String user, String cause) throws MessageDismissalException, RiceIllegalArgumentException;
 
开发者ID:kuali,项目名称:kc-rice,代码行数:11,代码来源:MessagingService.java

示例7: removeByOriginId

import org.kuali.rice.kcb.api.exception.MessageDismissalException; //导入依赖的package包/类
/**
 * Removes a specific message and all deliveries.  Does not throw an exception if no message with the origin
 * id is found.
 * 
 * @param originId origin id of the message to remove
 * @param user the user under which the action was taken
 * @param cause the cause or action taken to remove the message
 * @return Long the message id of the message removed, if any
 * @throws MessageDismissalException if no message for the given messageId is found.
 * @throws RiceIllegalArgumentException if originId is null
 */
public Long removeByOriginId(String originId, String user, String cause) throws MessageDismissalException, RiceIllegalArgumentException;
 
开发者ID:kuali,项目名称:kc-rice,代码行数:13,代码来源:MessagingService.java

示例8: bulkDismiss

import org.kuali.rice.kcb.api.exception.MessageDismissalException; //导入依赖的package包/类
/**
 * This method is responsible for dismissing a series of messageDelivery records
 * @param messageDeliveries The messageDeliveries to process
 * @throws MessageDeliveryException
 */
public void bulkDismiss(Collection<MessageDelivery> messageDeliveries) throws MessageDismissalException;
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:BulkMessageDeliverer.java

示例9: dismiss

import org.kuali.rice.kcb.api.exception.MessageDismissalException; //导入依赖的package包/类
/**
 * This method dismisses/removes the NotificationMessageDelivery so that it is no longer being presented to the user
 * via this deliverer.  Note, whether this action is meaningful is dependent on the deliverer implementation.  If the
 * deliverer cannot control the presentation of the message, then this method need not do anything. 
 * @param messageDelivery the messageDelivery to dismiss
 * @param the user that caused the dismissal; in the case of end-user actions, this will most likely be the user to
 *        which the message was delivered (user recipient in the NotificationMessageDelivery object)
 * @param cause the reason the message was dismissed
 */
public void dismiss(MessageDelivery messageDelivery, String user, String cause) throws MessageDismissalException;
 
开发者ID:kuali,项目名称:kc-rice,代码行数:11,代码来源:MessageDeliverer.java

示例10: dismiss

import org.kuali.rice.kcb.api.exception.MessageDismissalException; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kcb.deliverer.MessageDeliverer#dismiss(org.kuali.rice.kcb.bo.MessageDelivery, java.lang.String, java.lang.String)
 */
public void dismiss(MessageDelivery messageDelivery, String user, String cause) throws MessageDismissalException {
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:6,代码来源:AOLInstantMessageDeliverer.java


注:本文中的org.kuali.rice.kcb.api.exception.MessageDismissalException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。