Package net.diegomaia.vraptor.saci.exception

Examples of net.diegomaia.vraptor.saci.exception.PageException


  private void definePagesURLs(PagesMethods pagesMethods, Class<?> type) {

    if (pagesMethods.getLoginPageMethod() != null) {
      if (this.loginPageURLClass != null) {
        throw new PageException("Multiple login pages not allowed.");
      } else {
        this.loginPageURLClass = type;
        this.loginPageURLMethod = pagesMethods.getLoginPageMethod();
        this.logger.info("Login page >> " + this.loginPageURLMethod);
      }
    }
   
    if (pagesMethods.getAccessDeniedPageMethod() != null) {
      if (this.accessDeniedPageURLClass != null) {
        throw new PageException("Multiple access denied pages not allowed.");
      } else {
        this.accessDeniedPageURLClass = type;
        this.accessDeniedPageURLMethod = pagesMethods.getAccessDeniedPageMethod();
        this.logger.info("Access denied page >> " + this.accessDeniedPageURLClass);
      }
View Full Code Here


   
    for (Method method : resource.getMethods()) {
      if (method.isAnnotationPresent(LoginPage.class)) {
        if (loginPageMethod == null) {
          if (this.hasParameters(method)) {
            throw new PageException("Login page method cannot have parameters.");
          } else {
            loginPageMethod = method;
          }
        } else {
          throw new PageException("Multiple login pages not allowed.");
        }
      }
      if (method.isAnnotationPresent(AccessDeniedPage.class)) {
        if (accessDeniedPageMethod == null) {
          if (this.hasParameters(method)) {
            throw new PageException("Access denied page method cannot have parameters.");
          } else {
            accessDeniedPageMethod = method;
          }
        } else {
          throw new PageException("Multiple access denied pages not allowed.");
        }
      }
     
    }
   
View Full Code Here

TOP

Related Classes of net.diegomaia.vraptor.saci.exception.PageException

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.