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

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


    @Override
    public Facet decorate(final Facet facet, final FacetHolder requiredHolder) {
        final Class<? extends Facet> facetType = facet.facetType();
        if (facetType == ActionInvocationFacet.class) {
            final ActionInvocationFacet decoratedFacet = (ActionInvocationFacet) facet;
            final Facet decoratingFacet = new ActionInvocationFacetWrapTransaction(decoratedFacet);
            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }
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

    @Override
    public ObjectAdapter execute(final ObjectAdapter target, final ObjectAdapter[] arguments) {
        if(LOG.isDebugEnabled()) {
            LOG.debug("execute action " + target + "." + getId());
        }
        final ActionInvocationFacet facet = getFacet(ActionInvocationFacet.class);
        return facet.invoke(this, target, arguments);
    }
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

            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

        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

    @Override
    public Facet decorate(final Facet facet, final FacetHolder requiredHolder) {
        final Class<? extends Facet> facetType = facet.facetType();
        if (facetType == ActionInvocationFacet.class) {
            final ActionInvocationFacet decoratedFacet = (ActionInvocationFacet) facet;
            final Facet decoratingFacet = new ActionInvocationFacetWrapTransaction(decoratedFacet);
            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }
View Full Code Here

        return null;
    }

    @Override
    public ObjectSpecification getReturnType() {
        final ActionInvocationFacet facet = getActionInvocationFacet();
        return facet.getReturnType();
    }
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.