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

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


        if (inObject.isPersistent()) {
            LOG.debug("clear association remotely " + inObject + "/" + associate);
            try {
                final IdentityData targetReference = encoder.encodeIdentityData(inObject);
                final IdentityData associateReference = encoder.encodeIdentityData(associate);
                final ClearAssociationRequest request = new ClearAssociationRequest(getAuthenticationSession(), name, targetReference, associateReference);
                final ClearAssociationResponse response = serverFacade.clearAssociation(request);
                final ObjectData[] updates = response.getUpdates();
                encoder.decode(updates);
            } catch (final ConcurrencyException e) {
                throw ProxyUtil.concurrencyException(e);
View Full Code Here


            final IdentityData targetReference = encoder.encodeIdentityData(inObject);
            ObjectData[] updates;
            try {
                final IdentityData nullData = encoder.encodeIdentityData(null); // not
                                                                                // used.
                final ClearAssociationRequest request = new ClearAssociationRequest(getAuthenticationSession(), name, targetReference, nullData);
                final ClearAssociationResponse response = serverFacade.clearAssociation(request);
                updates = response.getUpdates();
            } catch (final ConcurrencyException e) {
                throw ProxyUtil.concurrencyException(e);
            }
View Full Code Here

         *
         * could place all these clear test in one class; test other methods in
         * other classes
         */
        IsisContext.getTransactionManager().startTransaction();
        final ClearAssociationRequest request = new ClearAssociationRequest(authenticationSession, "director", movieData, personData);
        final ClearAssociationResponse response = server.clearAssociation(request);
        final ObjectData[] updatesData = response.getUpdates();
        IsisContext.getTransactionManager().endTransaction();

        nameField.assertFieldEmpty(movieAdapter);
View Full Code Here

    }

    public void testClearAssociation() {
        final DummyIdentityData target = new DummyIdentityData(new TestProxyOid(1), "class 1", null);
        final DummyIdentityData associate = new DummyIdentityData(new TestProxyOid(2), "class 2", null);
        final ClearAssociationRequest request = new ClearAssociationRequest(session, "fieldname", target, associate);
        serverFacade.clearAssociation(request);
        final ObjectData[] data = new ObjectData[2];
        control.setReturnValue(new ClearAssociationResponse(data));

        control.replay();
View Full Code Here

        if (inObject.isPersistent()) {
            LOG.debug("clear association remotely " + inObject + "/" + associate);
            try {
                final IdentityData targetReference = encoder.encodeIdentityData(inObject);
                final IdentityData associateReference = encoder.encodeIdentityData(associate);
                final ClearAssociationRequest request =
                    new ClearAssociationRequest(getAuthenticationSession(), name, targetReference, associateReference);
                final ClearAssociationResponse response = serverFacade.clearAssociation(request);
                final ObjectData[] updates = response.getUpdates();
                encoder.decode(updates);
            } catch (final ConcurrencyException e) {
                throw ProxyUtil.concurrencyException(e);
View Full Code Here

        if (inObject.isPersistent()) {
            final IdentityData targetReference = encoder.encodeIdentityData(inObject);
            ObjectData[] updates;
            try {
                final IdentityData nullData = encoder.encodeIdentityData(null); // not used.
                final ClearAssociationRequest request =
                    new ClearAssociationRequest(getAuthenticationSession(), name, targetReference, nullData);
                final ClearAssociationResponse response = serverFacade.clearAssociation(request);
                updates = response.getUpdates();
            } catch (final ConcurrencyException e) {
                throw ProxyUtil.concurrencyException(e);
            }
View Full Code Here

         * other tests for clear: - clear collection element - fails if unauthorised - fails if unavailable
         *
         * could place all these clear test in one class; test other methods in other classes
         */
        IsisContext.getTransactionManager().startTransaction();
        final ClearAssociationRequest request =
            new ClearAssociationRequest(authenticationSession, "director", movieData, personData);
        final ClearAssociationResponse response = server.clearAssociation(request);
        final ObjectData[] updatesData = response.getUpdates();
        IsisContext.getTransactionManager().endTransaction();

        nameField.assertFieldEmpty(movieAdapter);
View Full Code Here

    }

    public void testClearAssociation() {
        final DummyIdentityData target = new DummyIdentityData(new TestProxyOid(1), "class 1", null);
        final DummyIdentityData associate = new DummyIdentityData(new TestProxyOid(2), "class 2", null);
        final ClearAssociationRequest request = new ClearAssociationRequest(session, "fieldname", target, associate);
        serverFacade.clearAssociation(request);
        final ObjectData[] data = new ObjectData[2];
        control.setReturnValue(new ClearAssociationResponse(data));

        control.replay();
View Full Code Here

TOP

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

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.