Examples of SimpleAction


Examples of aim.domain.logging.SimpleAction

    @After("Pointcuts.securityPointcut()")
    public void logSecurityOperation(JoinPoint joinPoint) {
        final String userName = ((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername();
        final PosibleOperations method = PosibleOperations.getMethod(joinPoint.getSignature().getName());

        final SimpleAction action = new SimpleAction(method, userName);
        final String additionalInfo = getAdditionalInfo(method, joinPoint.getArgs());
        if (!additionalInfo.isEmpty()) {
            action.setAdditionalInfo(additionalInfo);
        }
        logService.addLog(action);
    }
View Full Code Here

Examples of com.liferay.portal.struts.SimpleAction

          catch (Exception e) {
            throw new ActionException(e);
          }
        }
        else if (obj instanceof SimpleAction) {
          SimpleAction sa = (SimpleAction)obj;

          try {
            sa.run(ids);
          }
          catch (Exception e) {
            throw new ActionException(e);
          }
        }
View Full Code Here

Examples of com.opensymphony.xwork2.SimpleAction

    Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put(sb.toString(), "");
    parameters.put("huuhaa", "");

    Action action = new SimpleAction();
    parametersInterceptor.setParameters(action, stack, parameters);
    assertEquals(1, actual.size());
  }
View Full Code Here

Examples of com.opensymphony.xwork2.SimpleAction

        ParametersInterceptor pi =(ParametersInterceptor) config.getInterceptors().get(0).getInterceptor();
        pi.setExcludeParams("name");

        proxy.execute();

        SimpleAction action = (SimpleAction) proxy.getAction();
        assertNull(action.getName());
        assertEquals("This is blah", (action).getBlah());
    }
View Full Code Here

Examples of com.opensymphony.xwork2.SimpleAction

        ParametersInterceptor pi =(ParametersInterceptor) config.getInterceptors().get(0).getInterceptor();
        pi.setAcceptParamNames("blah, baz");

        proxy.execute();

        SimpleAction action = (SimpleAction) proxy.getAction();
        assertNull(action.getName());
        assertEquals("This is blah", (action).getBlah());
        assertEquals(123, action.getBaz());
    }
View Full Code Here

Examples of com.opensymphony.xwork2.SimpleAction

        HashMap<String, Object> extraContext = new HashMap<String, Object>();
        extraContext.put(ActionContext.PARAMETERS, params);

        ActionProxy proxy = actionProxyFactory.createActionProxy("", MockConfigurationProvider.PARAM_INTERCEPTOR_ACTION_NAME, extraContext);
        proxy.execute();
        SimpleAction action = (SimpleAction) proxy.getAction();
        assertEquals(1, action.getTheProtectedMap().size());
        assertNotNull(action.getTheProtectedMap().get("boo"));
        assertNull(action.getTheProtectedMap().get("foo"));
    }
View Full Code Here

Examples of com.opensymphony.xwork2.SimpleAction

        HashMap<String, Object> extraContext = new HashMap<String, Object>();
        extraContext.put(ActionContext.PARAMETERS, params);

        ActionProxy proxy = actionProxyFactory.createActionProxy("", MockConfigurationProvider.PARAM_INTERCEPTOR_ACTION_NAME, extraContext);
        proxy.execute();
        SimpleAction action = (SimpleAction) proxy.getAction();
        assertEquals(1, action.getTheProtectedMap().size());
        assertNotNull(action.getTheProtectedMap().get("boo"));
        assertNull(action.getTheProtectedMap().get("foo"));
    }
View Full Code Here

Examples of com.opensymphony.xwork2.SimpleAction

        HashMap<String, Object> extraContext = new HashMap<String, Object>();
        extraContext.put(ActionContext.PARAMETERS, params);

        ActionProxy proxy = actionProxyFactory.createActionProxy("", MockConfigurationProvider.PARAM_INTERCEPTOR_ACTION_NAME, extraContext);
        proxy.execute();
        @SuppressWarnings("unused")
        SimpleAction action = (SimpleAction) proxy.getAction();
        File pwn = new File("/tmp/PWNAGE");
        boolean dirExists = pwn.exists();
        @SuppressWarnings("unused")
        boolean deleted = pwn.delete();
View Full Code Here

Examples of com.opensymphony.xwork2.SimpleAction

        HashMap<String, Object> extraContext = new HashMap<String, Object>();
        extraContext.put(ActionContext.PARAMETERS, params);

        ActionProxy proxy = actionProxyFactory.createActionProxy("", MockConfigurationProvider.PARAM_INTERCEPTOR_ACTION_NAME, extraContext);
        proxy.execute();
        SimpleAction action = (SimpleAction) proxy.getAction();
        assertEquals(1, action.getTheExistingMap().size());
        assertNotNull(action.getTheExistingMap().get("boo"));
        assertNull(action.getTheExistingMap().get("existingKey"));
    }
View Full Code Here

Examples of com.opensymphony.xwork2.SimpleAction

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("user.address.city", "London");
        parameters.put("user.name", "Superman");

        Action action = new SimpleAction();
        pi.setParameters(action, stack, parameters);

        assertEquals("ordered should be false by default", false, pi.isOrdered());
        assertEquals(2, actual.size());
        assertEquals("London", actual.get("user.address.city"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.