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

Examples of org.apache.isis.core.metamodel.facets.actions.notcontributed.NotContributedFacet


        }
        final Method actionMethod = findMethod(CustomerRepository.class, "someAction");

        facetFactory.process(new ProcessMethodContext(CustomerRepository.class, null, null, actionMethod, methodRemover, facetedMethod));

        final NotContributedFacet facet = facetedMethod.getFacet(NotContributedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof NotContributedFacetAbstract);
        assertThat(facet.value(), is(As.EITHER));

        assertNoMethodsRemoved();
    }
View Full Code Here


        }
        final Method actionMethod = findMethod(CustomerRepository.class, "someAction");
       
        facetFactory.process(new ProcessMethodContext(CustomerRepository.class, null, null, actionMethod, methodRemover, facetedMethod));
       
        final NotContributedFacet facet = facetedMethod.getFacet(NotContributedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof NotContributedFacetAbstract);
        assertThat(facet.value(), is(As.ASSOCIATION));
       
        assertNoMethodsRemoved();
    }
View Full Code Here

        }
        final Method actionMethod = findMethod(CustomerRepository.class, "someAction");
       
        facetFactory.process(new ProcessMethodContext(CustomerRepository.class, null, null, actionMethod, methodRemover, facetedMethod));
       
        final NotContributedFacet facet = facetedMethod.getFacet(NotContributedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof NotContributedFacetAbstract);
        assertThat(facet.value(), is(As.ACTION));
       
        assertNoMethodsRemoved();
    }
View Full Code Here

        final List<ObjectActionImpl> contributedActions = Lists.newArrayList();
        for (final ObjectAction serviceAction : serviceActions) {
            if (isAlwaysHidden(serviceAction)) {
                continue;
            }
            final NotContributedFacet notContributed = serviceAction.getFacet(NotContributedFacet.class);
            if(notContributed != null && notContributed.toAssociations()) {
                continue;
            }
            if(!serviceAction.hasReturn()) {
                continue;
            }
View Full Code Here

        final List<ObjectAction> serviceActions = specification.getObjectActions(ActionType.ALL, Contributed.INCLUDED, Filters.<ObjectAction>any());
        for (final ObjectAction serviceAction : serviceActions) {
            if (isAlwaysHidden(serviceAction)) {
                continue;
            }
            final NotContributedFacet notContributed = serviceAction.getFacet(NotContributedFacet.class);
            if(notContributed != null && notContributed.toActions()) {
                continue;
            }
            if(!(serviceAction instanceof ObjectActionImpl)) {
                continue;
            }
View Full Code Here

    private void addMenuItemForAction(
            final CssMenuItem parent,
            final ObjectAction action) {
       
        final NotContributedFacet notContributed = action.getFacet(NotContributedFacet.class);
        if (notContributed != null && notContributed.toActions()) {
            // skip if is an action that has been annotated to not be contributed
            return;
        }

        Builder subMenuItemBuilder = null;
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.actions.notcontributed.NotContributedFacet

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.