In the standard Apache Isis Programming Model, corresponds to annotating the action method using @NotContributed.
555657585960616263646566
} 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(); }
737475767778798081828384
} 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(); }
919293949596979899100101102
} 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(); }
954955956957958959960961962963964965
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; }
103010311032103310341035103610371038103910401041
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; }
144145146147148149150151152153154155
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;
955956957958959960961962963964965966
102810291030103110321033103410351036103710381039
130131132133134135136137138139140141
private void addMenuItemForAction( final CssMenuItem parent, final ObjectAction action, final ActionPromptProvider actionPromptModalWindowProvider) { 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;
915916917918919920921922923924925926