Package org.apache.isis.core.metamodel.facets.actions.invoke

Examples of org.apache.isis.core.metamodel.facets.actions.invoke.ActionInvocationFacet


            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }

        if (facetType == ActionInvocationFacet.class) {
            final ActionInvocationFacet invocationFacet = (ActionInvocationFacet) facet;
            final ObjectAction objectAction = (ObjectAction) requiredHolder;
            final ActionInvocationFacetWrapProxy decoratingFacet =
                new ActionInvocationFacetWrapProxy(invocationFacet, serverFacade, encoderDecoder, objectAction);
            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
View Full Code Here


        if (consent.isVetoed()) {
            throw new WebApplicationException(responseOfBadRequest(consent));
        }

        // invoke the action
        final ActionInvocationFacet actionInvocationFacet = action.getFacet(ActionInvocationFacet.class);
        final ObjectAdapter result = actionInvocationFacet.invoke(nakedObject, proposedArguments);
        if (result == null) {
            // do nothing;
            // NB: this is not a response of NO_CONTENT
            // (not sure if it ought to be, can't see how you would return it)
        } else {
View Full Code Here

        final TestProxyAdapter target = new TestProxyAdapter();
        target.setupSpecification(new TestSpecification());
        final ObjectAdapter[] parameters = new ObjectAdapter[2];

        final TestProxyAdapter result = new TestProxyAdapter();
        final ActionInvocationFacet facet = new ActionInvocationFacetAbstract(mockFacetedMethod) {
            @Override
            public ObjectAdapter invoke(final ObjectAdapter target, final ObjectAdapter[] parameters) {
                return result;
            }
View Full Code Here

        return null;
    }

    @Override
    public ObjectSpecification getReturnType() {
        final ActionInvocationFacet facet = getActionInvocationFacet();
        return facet.getReturnType();
    }
View Full Code Here

    }


    @Override
    public ObjectSpecification getOnType() {
        final ActionInvocationFacet facet = getActionInvocationFacet();
        return facet.getOnType();
    }
View Full Code Here

    public ObjectAdapter execute(final ObjectAdapter target, final ObjectAdapter[] arguments) {
        if(LOG.isDebugEnabled()) {
            LOG.debug("execute action " + target + "." + getId());
        }
        //final ObjectAdapter[] params = realParameters(target, arguments);
        final ActionInvocationFacet facet = getFacet(ActionInvocationFacet.class);
        return facet.invoke(target, arguments);
    }
View Full Code Here

        return null;
    }

    @Override
    public ObjectSpecification getReturnType() {
        final ActionInvocationFacet facet = getActionInvocationFacet();
        return facet.getReturnType();
    }
View Full Code Here

        return getReturnType() != null;
    }

    @Override
    public ObjectSpecification getOnType() {
        final ActionInvocationFacet facet = getActionInvocationFacet();
        return facet.getOnType();
    }
View Full Code Here

    @Override
    public ObjectAdapter execute(final ObjectAdapter object, final ObjectAdapter[] parameters) {
        LOG.debug("execute action " + object + "." + getId());
        final ObjectAdapter[] params = realParameters(object, parameters);
        final ObjectAdapter target = realTarget(object);
        final ActionInvocationFacet facet = getFacet(ActionInvocationFacet.class);
        return facet.invoke(target, params);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.actions.invoke.ActionInvocationFacet

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.