本文整理匯總了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();
}
示例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);
}
}
示例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;
}
示例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;
}
示例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);