Package de.iritgo.aktera.ui

Examples of de.iritgo.aktera.ui.UIController


      UserEnvironment userEnvironment = getUserEnvironment(request);

      uiRequest.setUserEnvironment(userEnvironment);

      UIController controller = (UIController) KeelContainer.defaultContainer().getSpringBean(controllerId);

      AuthorizationManager authorizationManager = (AuthorizationManager) KeelContainer.defaultContainer()
              .getSpringBean(AuthorizationManager.ID);

      if (! authorizationManager.allowed(controller, controllerId, userEnvironment))
      {
        throw new SecurityException("Controller '" + controllerId + "' not authorized");
      }

      BeanResponse uiResponse = new BeanResponse();

      controller.execute(uiRequest, uiResponse);
      createDynaBean(controller, uiResponse, request, response, controllerId);
      handleErrors(controller, uiResponse, request, response, controllerId);

      String forward = uiResponse.getForward();

      if (forward == null)
      {
        forward = controller.getForward();

        if (forward == null)
        {
          forward = "default";
        }
View Full Code Here


  }

  public static void execute(UIRequest request, UIResponse response)
    throws AuthorizationException, UIControllerException
  {
    UIController controller = (UIController) KeelContainer.defaultContainer().getSpringBean(request.getBean());

    AuthorizationManager authorizationManager = (AuthorizationManager) KeelContainer.defaultContainer()
            .getSpringBean(AuthorizationManager.ID);

    if (! authorizationManager.allowed(controller, request.getBean(), request.getUserEnvironment()))
    {
      throw new SecurityException("Controller '" + request.getBean() + "' not authorized");
    }

    controller.execute(request, response);

    if (response.getForward() == null)
    {
      response.setForward(controller.getForward());

      if (response.getForward() == null)
      {
        response.setForward("default");
      }
View Full Code Here

      if (ue.getGroups().contains("root"))
      {
        return true;
      }

      UIController controller = (UIController) service;

      switch (controller.getSecurity())
      {
        case NONE:
          return true;

        case COMPONENT:
View Full Code Here

  public void execute(UIRequest request, UIResponse response) throws UIControllerException
  {
    for (String controllerId : controllerIds)
    {
      UIController controller = (UIController) SpringTools.getBean(controllerId);

      try
      {
        if (! authorizationManager.allowed(controller, controllerId, request.getUserEnvironment()))
        {
          throw new SecurityException("Controller '" + controllerId + "' not authorized");
        }
      }
      catch (AuthorizationException x)
      {
        throw new SecurityException("Controller '" + controllerId + "' not authorized", x);
      }

      Properties props = controllerParams.get(controllerId);
      if (props != null)
      {
        for (Entry<Object, Object> param : props.entrySet())
        {
          request.getParameters().put(param.getKey().toString(), param.getValue());
        }
      }

      controller.execute(request, response);
    }
  }
View Full Code Here

    security = Security.NONE;
  }

  public void execute(UIRequest request, UIResponse response) throws UIControllerException
  {
    UIController controller = (UIController) SpringTools.getBean(request.getParameterAsString("_cmodel"));
    BeanRequest newRequest = new BeanRequest();

    newRequest.setBean(request.getParameterAsString("_cmodel"));
    newRequest.setLocale(request.getLocale());
    newRequest.setUserEnvironment(request.getUserEnvironment());

    for (Object entry : request.getParameters().entrySet())
    {
      String key = (String) ((Map.Entry) entry).getKey();

      if (key.startsWith("_cp") && ! "_cmodel".equals(key))
      {
        newRequest.setParameter(key.substring(3), ((Map.Entry) entry).getValue());
      }
    }

    controller.execute(newRequest, response);
  }
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.ui.UIController

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.