Package org.apache.isis.core.metamodel.spec

Examples of org.apache.isis.core.metamodel.spec.ObjectActionSet


            if (matchesId(member, memberId)) {
                return member;
            }
            // special handling for contributed actions.
            if (member instanceof ObjectActionSet) {
                final ObjectActionSet actionSet = (ObjectActionSet) member;
                for (final ObjectAction contributedAction : actionSet.getActions()) {
                    if (contributedAction.getId().equals(memberId)) {
                        return contributedAction;
                    }
                }
            }
View Full Code Here


    private List<ObjectAction> getFlattenedActions(final List<ObjectAction> objectActions, final ActionType type) {
        final List<ObjectAction> actions = Lists.newArrayList();
        for (final ObjectAction action : objectActions) {
            if (action.getType().isSet()) {
                final ObjectActionSet actionSet = (ObjectActionSet) action;
                final List<ObjectAction> subActions = actionSet.getActions();
                for (final ObjectAction subAction : subActions) {
                    if (type.matchesTypeOf(subAction)) {
                        actions.add(subAction);
                    }
                }
View Full Code Here

            for (final ObjectAction serviceAction : serviceActions) {
                addIfReturnsSubtype(serviceAction, matchingActionsToAppendTo);
            }
        }
        if (matchingActionsToAppendTo.size() > 0) {
            final ObjectActionSet set = new ObjectActionSet("id", serviceAdapter.titleString(), matchingActionsToAppendTo);
            relatedActionsToAppendTo.add(set);
        }
    }
View Full Code Here

        final List<ObjectAction> contributedActions = findContributedActions(specification, actionType);
        // only add if there are matching subactions.
        if (contributedActions.size() == 0) {
            return;
        }
        final ObjectActionSet contributedActionSet = new ObjectActionSet("id", serviceAdapter.titleString(), contributedActions);
        contributedActionSetsToAppendTo.add(contributedActionSet);
    }
View Full Code Here

            final Consent visibility = action.isVisible(getSession(), objectAdapter);
            if (!visibility.isAllowed()) {
                continue;
            }
            if (action.getType().isSet()) {
                final ObjectActionSet objectActionSet = (ObjectActionSet) action;
                final List<ObjectAction> subactions = objectActionSet.getActions();
                addActions(objectAdapter, subactions, members);

            } else {

                final RendererFactory factory = getRendererFactoryRegistry().find(RepresentationType.OBJECT_ACTION);
View Full Code Here

    private ObjectAction createAction(final FacetedMethod facetedMethod) {
        return new ObjectActionImpl(facetedMethod, objectMemberContext, getServicesProvider());
    }

    private ObjectActionSet createObjectActionSet(final OrderSet set) {
        return new ObjectActionSet("", set.getGroupFullName(), asObjectActions(set));
    }
View Full Code Here

            if (matchesId(member, memberId)) {
                return member;
            }
            // special handling for contributed actions.
            if (member instanceof ObjectActionSet) {
                final ObjectActionSet actionSet = (ObjectActionSet) member;
                for (final ObjectAction contributedAction : actionSet.getActions()) {
                    if (contributedAction.getId().equals(memberId)) {
                        return contributedAction;
                    }
                }
            }
View Full Code Here

    @Ignore("broken...")
    @Test
    public void whenSetActionWithNoChildrenThenNoMenuItem() throws Exception {

        setAction = new ObjectActionSet("customers", "Customers", Lists.<ObjectAction> newArrayList());

        new SystemFixtures(context).newLink(mockLinkBuilder, "linkId", mockAdapterMemento, setAction, fakeLink);

        new AdapterFixtures(context).getOid(mockAdapter, mockOid);
View Full Code Here

    @Ignore("broken...")
    @Test
    public void whenSetActionWithOneChildThenMenuItemForSetActionAndMenuItemUnderneath() throws Exception {

        setAction = new ObjectActionSet("customers", "Customers", Collections.singletonList(mockUserAction));

        new AdapterFixtures(context).getOid(mockAdapter, mockOid);

        new SystemFixtures(context).newLink(mockLinkBuilder, "linkId", mockAdapterMemento, setAction, fakeLink);
View Full Code Here

    public static List<ObjectAction> flattened(final List<ObjectAction> objectActions) {
        final List<ObjectAction> actions = Lists.newArrayList();
        for (final ObjectAction action : objectActions) {
            if (action.getType() == ActionType.SET) {
                final ObjectActionSet actionSet = (ObjectActionSet) action;
                final List<ObjectAction> subActions = actionSet.getActions();
                for (final ObjectAction subAction : subActions) {
                    actions.add(subAction);
                }
            } else {
                actions.add(action);
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.spec.ObjectActionSet

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.