use of com.icodici.universa.node2.Notification in project narayana by jbosstm.
the class CompletionCoordinatorPortTypeImpl method commitOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "CommitOperation", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Commit")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Commit")
public void commitOperation(@WebParam(name = "Commit", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters") Notification parameters) {
MessageContext ctx = webServiceCtx.getMessageContext();
final Notification commit = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
CompletionCoordinatorProcessor.getProcessor().commit(commit, inboundMap, arjunaContext);
}
});
}
use of com.icodici.universa.node2.Notification in project narayana by jbosstm.
the class CoordinatorPortTypeImpl method preparedOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "PreparedOperation", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Prepared")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Prepared")
public void preparedOperation(@WebParam(name = "Prepared", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters") Notification parameters) {
MessageContext ctx = webServiceCtx.getMessageContext();
final Notification prepared = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
CoordinatorProcessor.getProcessor().prepared(prepared, inboundMap, arjunaContext);
}
});
}
use of com.icodici.universa.node2.Notification in project narayana by jbosstm.
the class CoordinatorPortTypeImpl method committedOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "CommittedOperation", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Committed")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/Committed")
public void committedOperation(@WebParam(name = "Committed", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters") Notification parameters) {
MessageContext ctx = webServiceCtx.getMessageContext();
final Notification committed = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
CoordinatorProcessor.getProcessor().committed(committed, inboundMap, arjunaContext);
}
});
}
use of com.icodici.universa.node2.Notification in project narayana by jbosstm.
the class CoordinatorPortTypeImpl method readOnlyOperation.
/**
* @param parameters
*/
@WebMethod(operationName = "ReadOnlyOperation", action = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/ReadOnly")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsat/2006/06/ReadOnly")
public void readOnlyOperation(@WebParam(name = "ReadOnly", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsat/2006/06", partName = "parameters") Notification parameters) {
MessageContext ctx = webServiceCtx.getMessageContext();
final Notification readOnly = parameters;
final MAP inboundMap = AddressingHelper.inboundMap(ctx);
final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
TaskManager.getManager().queueTask(new Task() {
public void executeTask() {
CoordinatorProcessor.getProcessor().readOnly(readOnly, inboundMap, arjunaContext);
}
});
}
use of com.icodici.universa.node2.Notification in project ORCID-Source by ORCID.
the class JpaJaxbNotificationAdapterTest method testCustomEntityToNotification.
@Test
public void testCustomEntityToNotification() {
NotificationCustomEntity notificationEntity = new NotificationCustomEntity();
notificationEntity.setId(123L);
notificationEntity.setNotificationType(NotificationType.CUSTOM);
notificationEntity.setSubject("Test subject");
notificationEntity.setDateCreated(DateUtils.convertToDate("2014-01-01T09:17:56"));
notificationEntity.setReadDate(DateUtils.convertToDate("2014-03-04T17:43:06"));
Notification notification = jpaJaxbNotificationAdapter.toNotification(notificationEntity);
assertNotNull(notification);
assertTrue(notification instanceof NotificationCustom);
NotificationCustom notificationCustom = (NotificationCustom) notification;
assertEquals(NotificationType.CUSTOM, notification.getNotificationType());
assertEquals("Test subject", notificationCustom.getSubject());
assertEquals("2014-01-01T09:17:56.000Z", notification.getCreatedDate().toXMLFormat());
assertEquals("2014-03-04T17:43:06.000Z", notification.getReadDate().toXMLFormat());
}
Aggregations