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

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


            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);
            } catch (final IsisException e) {
                LOG.error("remote exception: " + e.getMessage(), e);
View Full Code Here


            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);
            }
            encoder.decode(updates);
        } else {
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);
        assertEquals(0, updatesData.length);
    }
View Full Code Here

        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();
        final ClearAssociationResponse response = serverFacadeProxy.clearAssociation(request);
        final ObjectData[] ret = response.getUpdates();
        control.verify();

        assertEquals(data, ret);
    }
View Full Code Here

        if (association instanceof OneToOneAssociation) {
            ((OneToOneAssociation) association).clearAssociation(targetAdapter);
        } else {
            ((OneToManyAssociation) association).removeElement(targetAdapter, associateAdapter);
        }
        return new ClearAssociationResponse(getUpdates());
    }
View Full Code Here

        final String fieldIdentifier = request.getFieldIdentifier();
        final IdentityData target = request.getTarget();
        final IdentityData associate = request.getAssociate();

        log("clear association " + fieldIdentifier + indentedNewLine() + "target: " + dump(target) + indentedNewLine() + "associate: " + dump(associate));
        final ClearAssociationResponse response = decorated.clearAssociation(request);
        final ObjectData[] updates = response.getUpdates();
        log("  <-- changes: " + dump(updates));
        return response;
    }
View Full Code Here

        final IdentityData target = request.getTarget();
        final IdentityData associate = request.getAssociate();

        log("clear association " + fieldIdentifier + indentedNewLine() + "target: " + dump(target) + indentedNewLine()
            + "associate: " + dump(associate));
        final ClearAssociationResponse response = decorated.clearAssociation(request);
        final ObjectData[] updates = response.getUpdates();
        log("  <-- changes: " + dump(updates));
        return response;
    }
View Full Code Here

            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);
            } catch (final IsisException e) {
                LOG.error("remote exception: " + e.getMessage(), e);
View Full Code Here

            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);
            }
            encoder.decode(updates);
        } else {
View Full Code Here

        if (association instanceof OneToOneAssociation) {
            ((OneToOneAssociation) association).clearAssociation(targetAdapter);
        } else {
            ((OneToManyAssociation) association).removeElement(targetAdapter, associateAdapter);
        }
        return new ClearAssociationResponse(getUpdates());
    }
View Full Code Here

TOP

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

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.