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


Java Notification.getSenders方法代碼示例

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


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

示例1: 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

示例2: 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


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