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

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


public class ObjectActionImpl extends ObjectMemberAbstract implements ObjectAction {
    private final static Logger LOG = Logger.getLogger(ObjectActionImpl.class);

    public static ActionType getType(final String typeStr) {
        final ActionType type = ActionType.valueOf(typeStr);
        if (type == null) {
            throw new IllegalArgumentException();
        }
        return type;
    }
View Full Code Here


    @Override
    public ExecuteServerActionResponse executeServerAction(final ExecuteServerActionRequest request) {

        final AuthenticationSession session = request.getSession();
        final ActionType actionType = request.getActionType();
        final String actionIdentifier = request.getActionIdentifier();
        final ReferenceData targetData = request.getTarget();
        final Data[] parameterData = request.getParameters();

        if (LOG.isDebugEnabled()) {
View Full Code Here

        final List<ObjectSpecification> parameterSpecs = Lists.newArrayList();
        for (int i = 0; i < parameterSpecs.size(); i++) {
            parameterSpecs.add(getSpecification(parameterData[i].getType()));
        }

        final ActionType type = ObjectActionImpl.getType(actionType);

        final int pos = actionIdentifier.indexOf('#');

        final String methodName = actionIdentifier.substring(pos + 1);
View Full Code Here

    /**
     * Add the specified option if it is of the right type for this menu.
     */
    @Override
    public void add(final UserAction option) {
        final ActionType section = option.getType();
        if (section == ActionType.USER || (includeExploration && section == ActionType.EXPLORATION) || (includePrototype && section == ActionType.PROTOTYPE) || (includeDebug && section == ActionType.DEBUG)) {
            options.addElement(option);
        }
    }
View Full Code Here

    }

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

    // ////////////////////////////////////////////////////////////////

    @Override
    public ExecuteServerActionResponse executeServerAction(final ExecuteServerActionRequest request) {

        final ActionType actionType = request.getActionType();
        final String actionIdentifier = request.getActionIdentifier();
        final ReferenceData target = request.getTarget();
        final Data[] parameters = request.getParameters();

        log("execute action " + actionIdentifier + "/" + actionType + indentedNewLine() + "target: " + dump(target)
View Full Code Here

    @Override
    public ExecuteServerActionResponse executeServerAction(final ExecuteServerActionRequest request) {

        final AuthenticationSession session = request.getSession();
        final ActionType actionType = request.getActionType();
        final String actionIdentifier = request.getActionIdentifier();
        final ReferenceData targetData = request.getTarget();
        final Data[] parameterData = request.getParameters();

        if (LOG.isDebugEnabled()) {
View Full Code Here

        final List<ObjectSpecification> parameterSpecs = Lists.newArrayList();
        for (int i = 0; i < parameterSpecs.size(); i++) {
            parameterSpecs.add(getSpecification(parameterData[i].getType()));
        }

        final ActionType type = ObjectActionImpl.getType(actionType);

        final int pos = actionIdentifier.indexOf('#');

        final String methodName = actionIdentifier.substring(pos + 1);
View Full Code Here

    /**
     * Add the specified option if it is of the right type for this menu.
     */
    @Override
    public void add(final UserAction option) {
        final ActionType section = option.getType();
        if (section == ActionType.USER || (includeExploration && section == ActionType.EXPLORATION)
            || (includePrototype && section == ActionType.PROTOTYPE) || (includeDebug && section == ActionType.DEBUG)) {
            options.addElement(option);
        }
    }
View Full Code Here

        final String oidStr = concurrencyChecking == ConcurrencyChecking.CHECK?
                adapter.getOid().enString(getOidMarshaller()):
                adapter.getOid().enStringNoVersion(getOidMarshaller());
        PageParameterNames.OBJECT_OID.addStringTo(pageParameters, oidStr);

        final ActionType actionType = objectAction.getType();
        PageParameterNames.ACTION_TYPE.addEnumTo(pageParameters, actionType);
       
        final ObjectSpecification actionOnTypeSpec = objectAction.getOnType();
        if (actionOnTypeSpec != null) {
            PageParameterNames.ACTION_OWNING_SPEC.addStringTo(pageParameters, actionOnTypeSpec.getFullIdentifier());
View Full Code Here

TOP

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

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.