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

Examples of org.apache.isis.core.metamodel.facets.actions.executed.ExecutedFacet$Where


        facetFactory.process(new ProcessMethodContext(Customer.class, method, methodRemover, facetedMethod));

        Facet facet = facetedMethod.getFacet(ExecutedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof ExecutedFacet);
        final ExecutedFacet executedFacet = (ExecutedFacet) facet;
        assertEquals(ExecutedFacet.Where.LOCALLY, executedFacet.value());

        facet = facetedMethod.getFacet(NamedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof NamedFacet);
        final NamedFacet namedFacet = (NamedFacet) facet;
View Full Code Here


        facetFactory.process(new ProcessMethodContext(Customer.class, method, methodRemover, facetedMethod));

        Facet facet = facetedMethod.getFacet(ExecutedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof ExecutedFacet);
        final ExecutedFacet executedFacet = (ExecutedFacet) facet;
        assertEquals(ExecutedFacet.Where.REMOTELY, executedFacet.value());

        facet = facetedMethod.getFacet(NamedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof NamedFacet);
        final NamedFacet namedFacet = (NamedFacet) facet;
View Full Code Here

            getMessageBroker().addMessage(message);
        }
    }

    private boolean isToBeExecutedRemotely(final ObjectAdapter targetAdapter) {
        final ExecutedFacet facet = objectAction.getFacet(ExecutedFacet.class);

        final boolean localOverride = (facet.value() == Where.LOCALLY);
        if (localOverride) {
            return false;
        }

        final boolean remoteOverride = (facet.value() == Where.REMOTELY);
        if (remoteOverride) {
            return true;
        }

        if (targetAdapter.getSpecification().isService()) {
View Full Code Here

    // Target, Type, IsContributed
    // /////////////////////////////////////////////////////////////

    @Override
    public Target getTarget() {
        final ExecutedFacet facet = getFacet(ExecutedFacet.class);
        final Where executeWhere = facet.value();
        if (executeWhere == Where.LOCALLY) {
            return Target.LOCAL;
        } else if (executeWhere == Where.REMOTELY) {
            return Target.REMOTE;
        } else if (executeWhere == Where.DEFAULT) {
View Full Code Here

            getMessageBroker().addMessage(message);
        }
    }

    private boolean isToBeExecutedRemotely(final ObjectAdapter targetAdapter) {
        final ExecutedFacet facet = objectAction.getFacet(ExecutedFacet.class);

        final boolean localOverride = (facet.value() == Where.LOCALLY);
        if (localOverride) {
            return false;
        }

        final boolean remoteOverride = (facet.value() == Where.REMOTELY);
        if (remoteOverride) {
            return true;
        }

        if (targetAdapter.getSpecification().isService()) {
View Full Code Here

        facetFactory.process(new ProcessMethodContext(Customer.class, method, methodRemover, facetedMethod));

        Facet facet = facetedMethod.getFacet(ExecutedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof ExecutedFacet);
        final ExecutedFacet executedFacet = (ExecutedFacet) facet;
        assertEquals(ExecutedFacet.Where.LOCALLY, executedFacet.value());

        facet = facetedMethod.getFacet(NamedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof NamedFacet);
        final NamedFacet namedFacet = (NamedFacet) facet;
View Full Code Here

        facetFactory.process(new ProcessMethodContext(Customer.class, method, methodRemover, facetedMethod));

        Facet facet = facetedMethod.getFacet(ExecutedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof ExecutedFacet);
        final ExecutedFacet executedFacet = (ExecutedFacet) facet;
        assertEquals(ExecutedFacet.Where.REMOTELY, executedFacet.value());

        facet = facetedMethod.getFacet(NamedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof NamedFacet);
        final NamedFacet namedFacet = (NamedFacet) facet;
View Full Code Here

    // Target, Type, IsContributed
    // /////////////////////////////////////////////////////////////

    @Override
    public Target getTarget() {
        final ExecutedFacet facet = getFacet(ExecutedFacet.class);
        final Where executeWhere = facet.value();
        if (executeWhere == Where.LOCALLY) {
            return Target.LOCAL;
        } else if (executeWhere == Where.REMOTELY) {
            return Target.REMOTE;
        } else if (executeWhere == Where.DEFAULT) {
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.actions.executed.ExecutedFacet$Where

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.