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

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


                one(mockEncoder).encodeClientActionResult(with(equalTo(new ObjectData[0])), with(equalTo(new Version[0])), with(equalTo(new ObjectData[0])));
                will(returnValue(new ExecuteClientActionResponse(new ObjectData[0], new Version[0], null)));
            }
        });

        final ExecuteClientActionRequest request = new ExecuteClientActionRequest(session, new ReferenceData[0], new int[0]);

        // don't start xactn here, since within call.
        final ExecuteClientActionResponse result = server.executeClientAction(request);

        assertEquals(0, result.getPersisted().length);
View Full Code Here


                one(mockEncoder).encodeClientActionResult(with(equalTo(new ReferenceData[1])), with(equalTo(new Version[] { new TestProxyVersion(2) })), with(equalTo(new ObjectData[0])));
                will(returnValue(results));
            }
        });

        final ExecuteClientActionRequest request = new ExecuteClientActionRequest(session, new ReferenceData[] { data }, new int[] { ClientTransactionEvent.CHANGE });
        // don't start xactn here, since within call.
        final ExecuteClientActionResponse result = server.executeClientAction(request);
        final ObjectAdapter object = IsisContext.getPersistenceSession().loadObject(adapter.getOid(), adapter.getSpecification());

        assertEquals(new TestProxyVersion(2), object.getVersion());
View Full Code Here

            }
        });

        // don't start xactn here, since within call.

        final ExecuteClientActionRequest request = new ExecuteClientActionRequest(session, new ReferenceData[] { data }, new int[] { ClientTransactionEvent.ADD });
        final ExecuteClientActionResponse response = server.executeClientAction(request);

        final ObjectAdapter object = IsisContext.getPersistenceSession().loadObject(adapter.getOid(), adapter.getSpecification());

        assertEquals(results, response);
View Full Code Here

        final Oid oid = adapter.getOid();
        final DummyIdentityData identityData = new DummyIdentityData(oid, TestProxyAdapter.class.getName(), new TestProxyVersion(6));

        try {
            final ExecuteClientActionRequest request = new ExecuteClientActionRequest(new TestProxySession(), new ReferenceData[] { identityData }, new int[] { ClientTransactionEvent.DELETE });
            server.executeClientAction(request);
            fail();
        } catch (final ConcurrencyException expected) {
        }
    }
View Full Code Here

                will(returnValue(results));
            }
        });

        // don't start xactn here, since within call.
        final ExecuteClientActionRequest request = new ExecuteClientActionRequest(new TestProxySession(), new ReferenceData[] { identityData }, new int[] { ClientTransactionEvent.DELETE });
        final ExecuteClientActionResponse result = server.executeClientAction(request);

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

        final int[] eventTypes = asEventTypes(transactionEntries);

        ExecuteClientActionResponse results;
        try {
            final ExecuteClientActionRequest request = new ExecuteClientActionRequest(getAuthenticationSession(), referenceData, eventTypes);
            results = connection.executeClientAction(request);
        } catch (final ConcurrencyException e) {
            if (LOG.isInfoEnabled()) {
                LOG.info("concurrency conflict: " + e.getMessage());
            }
View Full Code Here

        final int[] eventTypes = asEventTypes(transactionEntries);

        ExecuteClientActionResponse results;
        try {
            final ExecuteClientActionRequest request =
                new ExecuteClientActionRequest(getAuthenticationSession(), referenceData, eventTypes);
            results = connection.executeClientAction(request);
        } catch (final ConcurrencyException e) {
            if (LOG.isInfoEnabled()) {
                LOG.info("concurrency conflict: " + e.getMessage());
            }
View Full Code Here

                    with(equalTo(new Version[0])), with(equalTo(new ObjectData[0])));
                will(returnValue(new ExecuteClientActionResponse(new ObjectData[0], new Version[0], null)));
            }
        });

        final ExecuteClientActionRequest request =
            new ExecuteClientActionRequest(session, new ReferenceData[0], new int[0]);

        // don't start xactn here, since within call.
        final ExecuteClientActionResponse result = server.executeClientAction(request);

        assertEquals(0, result.getPersisted().length);
View Full Code Here

                    with(equalTo(new Version[] { new TestProxyVersion(2) })), with(equalTo(new ObjectData[0])));
                will(returnValue(results));
            }
        });

        final ExecuteClientActionRequest request =
            new ExecuteClientActionRequest(session, new ReferenceData[] { data },
                new int[] { ClientTransactionEvent.CHANGE });
        // don't start xactn here, since within call.
        final ExecuteClientActionResponse result = server.executeClientAction(request);
        final ObjectAdapter object =
            IsisContext.getPersistenceSession().loadObject(adapter.getOid(), adapter.getSpecification());
View Full Code Here

            }
        });

        // don't start xactn here, since within call.

        final ExecuteClientActionRequest request =
            new ExecuteClientActionRequest(session, new ReferenceData[] { data },
                new int[] { ClientTransactionEvent.ADD });
        final ExecuteClientActionResponse response = server.executeClientAction(request);

        final ObjectAdapter object =
            IsisContext.getPersistenceSession().loadObject(adapter.getOid(), adapter.getSpecification());
View Full Code Here

TOP

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

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.