Package net.sourceforge.stripes.action

Examples of net.sourceforge.stripes.action.ActionBean


        }
        else {
            try {
                // Collect the things needed to grab a type converter
                String stringKey = evaluation.getNode().getStringValue();
                ActionBean bean = (ActionBean) evaluation.getExpressionEvaluation().getBean();
                Locale locale = bean.getContext().getLocale();
                Collection errors = new ArrayList<ValidationError>();

                TypeConverter tc = StripesFilter.getConfiguration()
                        .getTypeConverterFactory().getTypeConverter(declaredType, locale);
View Full Code Here


     */
    @Test(groups="fast")
    public void testValidateRequiredAndIgnored() throws Exception {
        MockRoundtrip trip = new MockRoundtrip(getMockServletContext(), getClass());
        trip.execute("validateRequiredAndIgnored");
        ActionBean actionBean = trip.getActionBean(getClass());
        Assert.assertEquals(actionBean.getContext().getValidationErrors().size(), 0);
    }
View Full Code Here

     */
    @Test(groups="fast")
    public void testValidatePublicField() throws Exception {
        MockRoundtrip trip = new MockRoundtrip(getMockServletContext(), getClass());
        trip.execute("validatePublicField");
        ActionBean actionBean = trip.getActionBean(getClass());
        Assert.assertEquals(actionBean.getContext().getValidationErrors().size(), 1);
    }
View Full Code Here

        Resolution resolution = context.proceed();

        // A null resolution here indicates a normal flow to the next stage
        boolean authed = ((BugzookyActionBeanContext) context.getActionBeanContext()).getUser() != null;
        if (!authed && resolution == null) {
            ActionBean bean = context.getActionBean();
            if (bean != null && !bean.getClass().isAnnotationPresent(Public.class)) {
                log.warn("Thwarted attempted to access ", bean.getClass().getSimpleName());
                return new RedirectResolution(LoginActionBean.class).addParameter("targetUrl", url);
            }
        }

        log.debug("Allowing public access to ", context.getActionBean().getClass().getSimpleName());
View Full Code Here

   *
   * @see net.sourceforge.stripes.controller.Interceptor#intercept(net.sourceforge.stripes.controller.ExecutionContext)
   */
  public Resolution intercept(ExecutionContext execContext) throws Exception {
    Resolution resolution = execContext.proceed();
    ActionBean actionBean = execContext.getActionBean();
    EsimsBaseActionBeanContext esimsBaseActionBeanContext = (EsimsBaseActionBeanContext) actionBean
        .getContext();
    if (isPermitted(esimsBaseActionBeanContext)) {
      return resolution;
    } else if (isLoggedIn(esimsBaseActionBeanContext)) {
      return new ForwardResolution(
View Full Code Here

TOP

Related Classes of net.sourceforge.stripes.action.ActionBean

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.