Package org.auraframework.instance

Examples of org.auraframework.instance.Action


    @ThreadHostileTest("TestLoggingAdapter not thread-safe")
    public void testParamLogging_NoParams() throws Exception {
        ControllerDef controller = getJavaController("java://org.auraframework.impl.java.controller.TestController");
        Map<String, Object> params = Maps.newHashMap();
        Action nonLoggableStringAction = controller.createAction("getString", params);
        List<Map<String, Object>> logs = runActionsAndReturnLogs(Lists.newArrayList(nonLoggableStringAction));
        assertEquals(1, logs.size());
        assertTrue(
                "Failed to log a server action",
                logs.get(0).containsKey(
View Full Code Here


    public void testParamLogging_SelectParameters() throws Exception {
        ControllerDef controller = getJavaController("java://org.auraframework.impl.java.controller.JavaTestController");
        Map<String, Object> params = Maps.newHashMap();
        params.put("strparam", "BoogaBoo");
        params.put("intparam", 1);
        Action selectParamLoggingAction = controller.createAction("getSelectedParamLogging", params);
        List<Map<String, Object>> logs = runActionsAndReturnLogs(Lists.newArrayList(selectParamLoggingAction));
        assertEquals(1, logs.size());
        assertTrue(
                "Failed to log a server action and selected parameter assignment",
                logs.get(0)
View Full Code Here

    public void testParamLogging_MultipleParameters() throws Exception {
        ControllerDef controller = getJavaController("java://org.auraframework.impl.java.controller.JavaTestController");
        Map<String, Object> params = Maps.newHashMap();
        params.put("we", "we");
        params.put("two", "two");
        Action selectParamLoggingAction = controller.createAction("getMultiParamLogging", params);
        List<Map<String, Object>> logs = runActionsAndReturnLogs(Lists.newArrayList(selectParamLoggingAction));
        assertEquals(1, logs.size());
        assertTrue(
                "Failed to log a server action and multiple params",
                logs.get(0)
View Full Code Here

    @ThreadHostileTest("TestLoggingAdapter not thread-safe")
    public void testParamLogging_NullValuesForParameters() throws Exception {
        ControllerDef controller = getJavaController("java://org.auraframework.impl.java.controller.JavaTestController");
        Map<String, Object> params = Maps.newHashMap();
        Action selectParamLoggingAction = controller.createAction("getLoggableString", params);
        List<Map<String, Object>> logs = runActionsAndReturnLogs(Lists.newArrayList(selectParamLoggingAction));
        assertEquals(1, logs.size());
        assertTrue(
                "Failed to log a server action and param with null value",
                logs.get(0)
View Full Code Here

    @ThreadHostileTest("TestLoggingAdapter not thread-safe")
    public void testParamLogging_ParametersOfCustomDataType() throws Exception {
        ControllerDef controller = getJavaController("java://org.auraframework.impl.java.controller.JavaTestController");
        Map<String, Object> params = Maps.newHashMap();
        params.put("param", new JavaTestController.CustomParamType());
        Action selectParamLoggingAction = controller.createAction("getCustomParamLogging", params);
        List<Map<String, Object>> logs = runActionsAndReturnLogs(Lists.newArrayList(selectParamLoggingAction));
        assertEquals(1, logs.size());
        assertTrue(
                "Logging custom action param time failed to call toString() of the custom type",
                logs.get(0)
View Full Code Here

        params.put("a", 1);
        params.put("b", 1);
        params.put(
                "actions",
                "{\"actions\":[{\"descriptor\":\"java://org.auraframework.java.controller.ActionChainingController/ACTION$multiply\",\"params\":{\"a\":2}}]}");
        Action selectParamLoggingAction = controller.createAction("add", params);
        List<Map<String, Object>> logs = runActionsAndReturnLogs(Lists.newArrayList(selectParamLoggingAction));
        assertEquals(1, logs.size());
        assertTrue(
                "Failed to log server action",
                logs.get(0).containsKey(
View Full Code Here

            // The bootstrap action cannot not have a CSRF token so we let it
            // through
            boolean isBootstrapAction = false;
            if (message.getActions().size() == 1) {
                Action action = message.getActions().get(0);
                String name = action.getDescriptor().getQualifiedName();
                if (name.equals("aura://ComponentController/ACTION$getApplication")
                        || (name.equals("aura://ComponentController/ACTION$getComponent") && !isProductionMode(context
                                .getMode()))) {
                    isBootstrapAction = true;
                }
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.