當前位置: 首頁>>代碼示例>>Java>>正文


Java Notification類代碼示例

本文整理匯總了Java中org.kuali.rice.ken.api.notification.Notification的典型用法代碼示例。如果您正苦於以下問題:Java Notification類的具體用法?Java Notification怎麽用?Java Notification使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Notification類屬於org.kuali.rice.ken.api.notification包,在下文中一共展示了Notification類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: to

import org.kuali.rice.ken.api.notification.Notification; //導入依賴的package包/類
/**
 * Converts a mutable bo to its immutable counterpart
 * @param bo the mutable business object
 * @return the immutable object
 */
public static Notification to(NotificationBo bo) {
    if (bo == null) {
        return null;
    }

    return Notification.Builder.create(bo).build();
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:13,代碼來源:NotificationBo.java

示例2: sendNotification

import org.kuali.rice.ken.api.notification.Notification; //導入依賴的package包/類
@Override
public NotificationResponse sendNotification(Notification notification) {
    if (null == notification) {
        throw new RiceIllegalArgumentException("xml is null or blank");
    }

    try {
        NotificationBo notificationBo = NotificationBo.from(notification);
        NotificationResponseBo response = notificationService.sendNotification(notificationBo);
        LOG.info(response.getMessage());
        return NotificationResponseBo.to(response);
    } catch (Exception e) {
        throw new IllegalStateException(e);
    }
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:16,代碼來源:SendNotificationServiceKewXmlImpl.java

示例3: from

import org.kuali.rice.ken.api.notification.Notification; //導入依賴的package包/類
/**
 * Converts a immutable object to its mutable counterpart
 * @param im immutable object
 * @return the mutable bo
 */
public static NotificationBo from(Notification im) {
    if (im == null) {
        return null;
    }

    NotificationBo bo = new NotificationBo();
    bo.setId(im.getId());
    bo.setVersionNumber(im.getVersionNumber());
    bo.setObjectId(im.getObjectId());
    bo.setDeliveryType(im.getDeliveryType());
    bo.setCreationDateTimeValue(im.getCreationDateTime() == null ? null : new Timestamp(im.getCreationDateTime().getMillis()));
    bo.setSendDateTimeValue(im.getSendDateTime() == null ? null : new Timestamp(im.getSendDateTime().getMillis()));
    bo.setAutoRemoveDateTimeValue(im.getAutoRemoveDateTime() == null ? null : new Timestamp(im.getAutoRemoveDateTime().getMillis()));
    bo.setTitle(im.getTitle());
    bo.setContent(im.getContent());
    bo.setLockedDateValue(im.getLockedDate() == null ? null : new Timestamp(im.getLockedDate().getMillis()));
    bo.setDocTypeName(im.getDocTypeName());

    // object references
    bo.setPriority(NotificationPriorityBo.from(im.getPriority()));
    bo.setContentType(NotificationContentTypeBo.from(im.getContentType()));
    bo.setChannel(NotificationChannelBo.from(im.getChannel()));
    bo.setProducer(NotificationProducerBo.from(im.getProducer()));

    // lists
    List<NotificationRecipientBo> tempRecipients = new ArrayList<NotificationRecipientBo>();
    if (CollectionUtils.isNotEmpty(im.getRecipients())) {
        for (NotificationRecipient recipient : im.getRecipients()) {
            tempRecipients.add(NotificationRecipientBo.from(recipient));
        }
        bo.setRecipients(tempRecipients);
    }
    List<NotificationSenderBo> tempSenders = new ArrayList<NotificationSenderBo>();
    if (CollectionUtils.isNotEmpty(im.getSenders())) {
        for (NotificationSender sender : im.getSenders()) {
            tempSenders.add(NotificationSenderBo.from(sender));
        }
        bo.setSenders(tempSenders);
    }

    return bo;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:48,代碼來源:NotificationBo.java

示例4: from

import org.kuali.rice.ken.api.notification.Notification; //導入依賴的package包/類
/**
 * Converts a immutable object to its mutable counterpart
 * @param im immutable object
 * @return the mutable bo
 */
public static NotificationBo from(Notification im) {
    if (im == null) {
        return null;
    }

    NotificationBo bo = new NotificationBo();
    bo.setId(im.getId());
    bo.setVersionNumber(im.getVersionNumber());
    bo.setObjectId(im.getObjectId());
    bo.setDeliveryType(im.getDeliveryType());
    bo.setCreationDateTimeValue(im.getCreationDateTime() == null ? null : new Timestamp(im.getCreationDateTime().getMillis()));
    bo.setSendDateTimeValue(im.getSendDateTime() == null ? null : new Timestamp(im.getSendDateTime().getMillis()));
    bo.setAutoRemoveDateTimeValue(im.getAutoRemoveDateTime() == null ? null : new Timestamp(im.getAutoRemoveDateTime().getMillis()));
    bo.setTitle(im.getTitle());
    bo.setContent(im.getContent());
    bo.setLockedDateValue(im.getLockedDate() == null ? null : new Timestamp(im.getLockedDate().getMillis()));

    // object references
    bo.setPriority(NotificationPriorityBo.from(im.getPriority()));
    bo.setContentType(NotificationContentTypeBo.from(im.getContentType()));
    bo.setChannel(NotificationChannelBo.from(im.getChannel()));
    bo.setProducer(NotificationProducerBo.from(im.getProducer()));

    // lists
    List<NotificationRecipientBo> tempRecipients = new ArrayList<NotificationRecipientBo>();
    if (CollectionUtils.isNotEmpty(im.getRecipients())) {
        for (NotificationRecipient recipient : im.getRecipients()) {
            tempRecipients.add(NotificationRecipientBo.from(recipient));
        }
        bo.setRecipients(tempRecipients);
    }
    List<NotificationSenderBo> tempSenders = new ArrayList<NotificationSenderBo>();
    if (CollectionUtils.isNotEmpty(im.getSenders())) {
        for (NotificationSender sender : im.getSenders()) {
            tempSenders.add(NotificationSenderBo.from(sender));
        }
        bo.setSenders(tempSenders);
    }

    return bo;
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:47,代碼來源:NotificationBo.java

示例5: sendNotification

import org.kuali.rice.ken.api.notification.Notification; //導入依賴的package包/類
/**
 * This method allows consumers to send notification messages.
 * @since 2.0.1
 * @param notification
 * @return NotificationResponse
 */
@WebMethod(operationName = "sendNotification")
@WebResult(name = "response")
NotificationResponse sendNotification(Notification notification);
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:10,代碼來源:SendNotificationService.java


注:本文中的org.kuali.rice.ken.api.notification.Notification類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。