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

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


     *
     * @see #decodeObject(ObjectData)
     */
    protected ObjectData encodeObject(final ObjectAdapter adapter) {
        // REVIEW: this implementation is a bit of a hack...
        final Data[] datas = getObjectEncoder().encodeActionParameters(new ObjectSpecification[] { adapter.getSpecification() }, new ObjectAdapter[] { adapter }, new KnownObjectsRequest());
        return (ObjectData) datas[0];
    }
View Full Code Here


        getTransaction().commit();
    }

    private void endNonEmptyTransaction() {
        final KnownObjectsRequest knownObjects = new KnownObjectsRequest();

        final ClientTransactionEvent[] transactionEntries = getTransaction().getEntries();
        final ReferenceData[] referenceData = asData(transactionEntries, knownObjects);

        final int[] eventTypes = asEventTypes(transactionEntries);
View Full Code Here

        getTransaction().commit();
    }

    private void endNonEmptyTransaction() {
        final KnownObjectsRequest knownObjects = new KnownObjectsRequest();

        final ClientTransactionEvent[] transactionEntries = getTransaction().getEntries();
        final ReferenceData[] referenceData = asData(transactionEntries, knownObjects);

        final int[] eventTypes = asEventTypes(transactionEntries);
View Full Code Here

    private ObjectAdapter executeRemotely(final ObjectAdapter targetAdapter, final ObjectAdapter[] parameterAdapters) {
        if (LOG.isDebugEnabled()) {
            LOG.debug(debug("execute remotely", getIdentifier(), targetAdapter, parameterAdapters));
        }

        final KnownObjectsRequest knownObjects = new KnownObjectsRequest();
        final Data[] parameterObjectData = parameterValues(parameterAdapters, knownObjects);
        final ReferenceData targetReference =
            targetAdapter == null ? null : encoder.encodeActionTarget(targetAdapter, knownObjects);
        ExecuteServerActionResponse response;
        try {
View Full Code Here

        // although the PersistenceSession will also do xactn mgmt, because we
        // are potentially modifying several objects we should explicitly define
        // the xactn at this level.
        getTransactionManager().startTransaction();
        try {
            final KnownObjectsRequest knownObjects = new KnownObjectsRequest();
            final ObjectAdapter[] persistedObjects = new ObjectAdapter[data.length];
            final ObjectAdapter[] disposedObjects = new ObjectAdapter[data.length];
            final ObjectAdapter[] changedObjects = new ObjectAdapter[data.length];
            for (int i = 0; i < data.length; i++) {
                ObjectAdapter object;
View Full Code Here

        if (LOG.isDebugEnabled()) {
            LOG.debug("request executeAction " + actionIdentifier + " on " + targetData + " for " + session);
        }

        final KnownObjectsRequest knownObjects = new KnownObjectsRequest();

        final ObjectAdapter targetAdapter = decodeTargetAdapter(session, targetData, knownObjects);

        final ObjectAction action = targetAdapter.getSpecification().getObjectAction(actionType, actionIdentifier);
        final ObjectAdapter[] parameters = decodeParameters(session, parameterData, knownObjects);
View Full Code Here

    // restore
    // ///////////////////////////////////////////////////////

    public ObjectAdapter deserialize(final Data data) {
        if (data instanceof CollectionData) {
            return deserializeCollection((CollectionData) data, new KnownObjectsRequest());
        } else {
            return deserializeObject(data, new KnownObjectsRequest());
        }
    }
View Full Code Here

        Data[] fieldContent;
        final ObjectAssociation[] fields = getFieldOrder(specification);
        fieldContent = new Data[fields.length];

        PersistorUtil.start(adapter, adapter.getResolveState().serializeFrom());
        final KnownObjectsRequest knownObjects = new KnownObjectsRequest();
        for (int i = 0; i < fields.length; i++) {
            if (fields[i].getId().equals(fieldName)) {
                final ObjectAdapter field = fields[i].get(adapter);
                if (field == null) {
                    fieldContent[i] = dataFactory.createNullData(fields[i].getSpecification().getFullIdentifier());
View Full Code Here

        Data resultData;
        if (result == null) {
            resultData = dataFactory.createNullData("");
        } else if (result.getSpecification().isCollection()) {
            resultData =
                serializer.serializeCollection(result, serverSideRetrievedObjectGraphDepth, new KnownObjectsRequest());
        } else if (result.getSpecification().isNotCollection()) {
            resultData = encodeCompletePersistentGraph(result);
        } else {
            throw new UnknownTypeException(result);
        }
View Full Code Here

            return encode(adapter, clientSideActionParameterGraphDepth, knownObjects);
        }
    }

    private ObjectData encode(final ObjectAdapter adapter, final int depth) {
        return (ObjectData) encode(adapter, depth, new KnownObjectsRequest());
    }
View Full Code Here

TOP

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

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.