Package org.apache.isis.runtimes.dflt.remoting.common.exchange

Examples of org.apache.isis.runtimes.dflt.remoting.common.exchange.ExecuteServerActionRequest


        final KnownObjectsRequest knownObjects = new KnownObjectsRequest();
        final Data[] parameterObjectData = parameterValues(parameterAdapters, knownObjects);
        final ReferenceData targetReference = targetAdapter == null ? null : encoder.encodeActionTarget(targetAdapter, knownObjects);
        ExecuteServerActionResponse response;
        try {
            final ExecuteServerActionRequest request = new ExecuteServerActionRequest(getAuthenticationSession(), ActionType.USER, objectAction.getIdentifier().toNameParmsIdentityString(), targetReference, parameterObjectData);
            response = serverFacade.executeServerAction(request);

            // must deal with transient-now-persistent objects first
            if (targetAdapter.isTransient()) {
                encoder.madePersistent(targetAdapter, response.getPersistedTarget());
View Full Code Here


            }
        });

        IsisContext.getTransactionManager().startTransaction();
        final ExecuteServerActionRequest request = new ExecuteServerActionRequest(new TestProxySession(), ActionType.USER, "action()", targetData, parameterData);
        final ExecuteServerActionResponse result = server.executeServerAction(request);
        IsisContext.getTransactionManager().endTransaction();

        assertEquals(results, result);
    }
View Full Code Here

        });

        IsisContext.getTransactionManager().startTransaction();

        IsisContext.getUpdateNotifier().addDisposedObject(adapter);
        final ExecuteServerActionRequest request = new ExecuteServerActionRequest(new TestProxySession(), ActionType.USER, "action()", targetData, parameterData);
        final ExecuteServerActionResponse result = server.executeServerAction(request);

        IsisContext.getTransactionManager().endTransaction();

        assertEquals(results, result);
View Full Code Here

        IsisContext.getTransactionManager().startTransaction();

        IsisContext.getUpdateNotifier().addChangedObject(adapter);

        final ExecuteServerActionRequest request = new ExecuteServerActionRequest(new TestProxySession(), ActionType.USER, "action()", targetData, parameterData);
        final ExecuteServerActionResponse result = server.executeServerAction(request);

        IsisContext.getTransactionManager().endTransaction();

        assertEquals(results, result);
View Full Code Here

        IsisContext.getMessageBroker().addMessage("message 2");

        IsisContext.getMessageBroker().addWarning("warning 1");
        IsisContext.getMessageBroker().addWarning("warning 2");

        final ExecuteServerActionRequest request = new ExecuteServerActionRequest(new TestProxySession(), ActionType.USER, "action()", targetData, parameterData);
        final ExecuteServerActionResponse result = server.executeServerAction(request);

        IsisContext.getTransactionManager().endTransaction();

        assertEquals(results, result);
View Full Code Here

    @Test
    public void testOnTransientObjectWithRemoteAnnotation() throws Exception {
        // actionPeer.getTarget();
        // expectLastCall().andStubReturn(ObjectAction.REMOTE);

        final ExecuteServerActionRequest request = new ExecuteServerActionRequest(IsisContext.getAuthenticationSession(), ActionType.USER, identifierString, targetData, parameterData);
        mockDistribution.executeServerAction(request);
        final ExecuteServerActionResponse result = new ExecuteServerActionResponse(new DummyNullValue("type"), new ObjectData[0], new ReferenceData[0], null, new ObjectData[2], new String[0], new String[0]);
        expectLastCall().andReturn(result);

        mockEncoder.madePersistent(target, null);
View Full Code Here

        // actionPeer.getTarget();
        // expectLastCall().andStubReturn(null);

        IsisContext.getPersistenceSession().makePersistent(target);

        final ExecuteServerActionRequest request = new ExecuteServerActionRequest(IsisContext.getAuthenticationSession(), ActionType.USER, identifierString, targetData, parameterData);
        mockDistribution.executeServerAction(request);
        final ExecuteServerActionResponse result = new ExecuteServerActionResponse(new DummyNullValue("type"), new ObjectData[0], new ReferenceData[0], null, new ObjectData[2], new String[0], new String[0]);
        expectLastCall().andReturn(result);

        replay(mockObjectActionPeer, mockEncoder, mockDistribution);
View Full Code Here

        IsisContext.getPersistenceSession().makePersistent(target);

        final ObjectAdapter object = system.createPersistentTestObject();

        final ExecuteServerActionRequest request = new ExecuteServerActionRequest(IsisContext.getAuthenticationSession(), ActionType.USER, identifierString, targetData, parameterData);
        mockDistribution.executeServerAction(request);
        final ReferenceData[] disposedReferenceData = new ReferenceData[] { new DummyReferenceData(object.getOid(), object.getSpecification().getFullIdentifier(), null) };
        final ExecuteServerActionResponse result = new ExecuteServerActionResponse(new DummyNullValue("type"), new ObjectData[0], disposedReferenceData, null, new ObjectData[2], new String[0], new String[0]);
        expectLastCall().andReturn(result);
View Full Code Here

        final Data[] parameterObjectData = parameterValues(parameterAdapters, knownObjects);
        final ReferenceData targetReference =
            targetAdapter == null ? null : encoder.encodeActionTarget(targetAdapter, knownObjects);
        ExecuteServerActionResponse response;
        try {
            final ExecuteServerActionRequest request =
                new ExecuteServerActionRequest(getAuthenticationSession(), ActionType.USER, objectAction
                    .getIdentifier().toNameParmsIdentityString(), targetReference, parameterObjectData);
            response = serverFacade.executeServerAction(request);

            // must deal with transient-now-persistent objects first
            if (targetAdapter.isTransient()) {
View Full Code Here

            }
        });

        IsisContext.getTransactionManager().startTransaction();
        final ExecuteServerActionRequest request =
            new ExecuteServerActionRequest(new TestProxySession(), ActionType.USER, "action()", targetData,
                parameterData);
        final ExecuteServerActionResponse result = server.executeServerAction(request);
        IsisContext.getTransactionManager().endTransaction();

        assertEquals(results, result);
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.remoting.common.exchange.ExecuteServerActionRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.