Package org.auraframework.instance

Examples of org.auraframework.instance.Action


     * @return the next id to use, the ordering must match exactly what is generated client side
     */
    private static String getNextGlobalId() {
        AuraContext context = Aura.getContextService().getCurrentContext();
        String num = Aura.getContextService().getCurrentContext().getNum();
        Action action = context.getCurrentAction();
        int id;
        String suffix;
        if (action != null) {
            id = action.getInstanceStack().getNextId();
            suffix = action.getId();
        } else {
            id = context.getNextId();
            suffix = num;
        }

View Full Code Here


            // FIXME: ints are getting translated into BigDecimals here.
            @SuppressWarnings("unchecked")
            Map<String, Object> params = (Map<String, Object>) map.get("params");

            Action instance = (Action) Aura.getInstanceService().getInstance((String) map.get("descriptor"),
                    ActionDef.class, params);
            instance.setId((String) map.get("id"));
            ret.add(instance);
        }
        return ret;
    }
View Full Code Here

                Map<?, ?> map = (Map<?, ?>) action;

                // FIXME: ints are getting translated into BigDecimals here.
                Map<String, Object> params = (Map<String, Object>) map.get("params");

                Action instance = (Action) Aura.getInstanceService().getInstance((String) map.get("descriptor"),
                        ActionDef.class, params);
                instance.setId((String) map.get("id"));

                actionList.add(instance);
            }
        }
View Full Code Here

            PropertyReference ref = (PropertyReference) expression;
            ref = ref.getStem();

            ControllerDef controllerDef = getControllerDef();
            ActionDef actionDef = controllerDef.getSubDefinition(ref.toString());
            Action action = Aura.getInstanceService().getInstance(actionDef);

            AuraContext context = Aura.getContextService().getCurrentContext();
            Action previous = context.setCurrentAction(action);
            try {
                action.run();
            } finally {
                context.setCurrentAction(previous);
            }
View Full Code Here

            if (logger != null) {
                action.logParams(logger);
            }
            String aap = actionAndParams.toString();
            loggingService.startAction(aap);
            Action oldAction = context.setCurrentAction(action);
            try {
                //
                // We clear out action centric references here.
                //
                json.clearReferences();
View Full Code Here

        this.contextPath = path;
    }

    @Override
    public Action setCurrentAction(Action nextAction) {
        Action old = currentAction;
        currentAction = nextAction;
        return old;
    }
View Full Code Here

        if (iStack.isUnprivileged()) {
            if (componentCount++ > MAX_COMPONENT_COUNT) {
                //
                // This is bad, try to give the poor user an idea of what happened.
                //
                Action tmp = getCurrentAction();
                StringBuffer sb = new StringBuffer();
                if (tmp != null) {
                    sb.append(tmp);
                    sb.append("(");
                    tmp.logParams(new SBKeyValueLogger(sb));
                    sb.append(")");
                } else {
                    sb.append("request");
                }
                throw new SystemErrorException("Too many components for "+sb.toString());
View Full Code Here

    public static int i = 0;

    @AuraEnabled
    public static int add(@Key("a") Integer a, @Key("b") Integer b, @Key("actions") String chainedActions)
            throws Exception {
        Action currentAction = Aura.getContextService().getCurrentContext().getCurrentAction();
        Collection<Action> actions = Aura.getSerializationService().readCollection(new StringReader(chainedActions),
                Action.class);
        currentAction.add(Lists.newArrayList(actions));
        i = a + b;
        return i;
    }
View Full Code Here

        return i;
    }

    @AuraEnabled
    public static void doNothing(@Key("actions") String chainedActions) throws Exception {
        Action currentAction = Aura.getContextService().getCurrentContext().getCurrentAction();
        Collection<Action> actions = Aura.getSerializationService().readCollection(new StringReader(chainedActions),
                Action.class);
        currentAction.add(Lists.newArrayList(actions));
    }
View Full Code Here

        currentAction.add(Lists.newArrayList(actions));
    }

    @AuraEnabled
    public static void infiniteChain() throws Exception {
        Action currentAction = Aura.getContextService().getCurrentContext().getCurrentAction();
        Action actions = Aura.getInstanceService().getInstance(
                "java://org.auraframework.java.controller.ActionChainingController/ACTION$infiniteChain",
                ActionDef.class, null);
        currentAction.add(Lists.newArrayList(actions));
    }
View Full Code Here

TOP

Related Classes of org.auraframework.instance.Action

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.