/** * Assemble all of the state that has been accumulated in this context. This includes: * <ul> * <li>Diffs accumulated on objects passed to {@link #edit}. * <li>Invocations accumulated as Request subtypes passed to {@link #addInvocation}. * </ul> */ public String makePayload() { // Get the factory from the runtime-specific holder. MessageFactory f = MessageFactoryHolder.FACTORY; List<OperationMessage> operations = makePayloadOperations(); List<InvocationMessage> invocationMessages = makePayloadInvocations(); // Create the outer envelope message AutoBean<RequestMessage> bean = f.request(); RequestMessage requestMessage = bean.as(); requestMessage.setRequestFactory(getRequestFactory().getFactoryTypeToken()); if (!invocationMessages.isEmpty()) { requestMessage.setInvocations(invocationMessages); } if (!operations.isEmpty()) { requestMessage.setOperations(operations); } return AutoBeanCodex.encode(bean).getPayload(); }
/** * Assemble all of the state that has been accumulated in this context. This includes: * <ul> * <li>Diffs accumulated on objects passed to {@link #edit}. * <li>Invocations accumulated as Request subtypes passed to {@link #addInvocation}. * </ul> */ public String makePayload() { // Get the factory from the runtime-specific holder. MessageFactory f = MessageFactoryHolder.FACTORY; List<OperationMessage> operations = makePayloadOperations(); List<InvocationMessage> invocationMessages = makePayloadInvocations(); // Create the outer envelope message AutoBean<RequestMessage> bean = f.request(); RequestMessage requestMessage = bean.as(); requestMessage.setRequestFactory(getRequestFactory().getFactoryTypeToken()); if (!invocationMessages.isEmpty()) { requestMessage.setInvocations(invocationMessages); } if (!operations.isEmpty()) { requestMessage.setOperations(operations); } return AutoBeanCodex.encode(bean).getPayload(); }
/** * Assemble all of the state that has been accumulated in this context. This includes: * <ul> * <li>Diffs accumulated on objects passed to {@link #edit}. * <li>Invocations accumulated as Request subtypes passed to {@link #addInvocation}. * </ul> */ public String makePayload() { // Get the factory from the runtime-specific holder. MessageFactory f = MessageFactoryHolder.FACTORY; List<OperationMessage> operations = makePayloadOperations(); List<InvocationMessage> invocationMessages = makePayloadInvocations(); // Create the outer envelope message AutoBean<RequestMessage> bean = f.request(); RequestMessage requestMessage = bean.as(); requestMessage.setRequestFactory(getRequestFactory().getFactoryTypeToken()); if (!invocationMessages.isEmpty()) { requestMessage.setInvocations(invocationMessages); } if (!operations.isEmpty()) { requestMessage.setOperations(operations); } return AutoBeanCodex.encode(bean).getPayload(); }
/** * Assemble all of the state that has been accumulated in this context. This includes: * <ul> * <li>Diffs accumulated on objects passed to {@link #edit}. * <li>Invocations accumulated as Request subtypes passed to {@link #addInvocation}. * </ul> */ public String makePayload() { // Get the factory from the runtime-specific holder. MessageFactory f = MessageFactoryHolder.FACTORY; List<OperationMessage> operations = makePayloadOperations(); List<InvocationMessage> invocationMessages = makePayloadInvocations(); // Create the outer envelope message AutoBean<RequestMessage> bean = f.request(); RequestMessage requestMessage = bean.as(); requestMessage.setRequestFactory(getRequestFactory().getFactoryTypeToken()); if (!invocationMessages.isEmpty()) { requestMessage.setInvocations(invocationMessages); } if (!operations.isEmpty()) { requestMessage.setOperations(operations); } return AutoBeanCodex.encode(bean).getPayload(); }