Package org.g4studio.core.mvc.xstruts.config

Examples of org.g4studio.core.mvc.xstruts.config.ModuleConfig


   * :TODO The Action class' dependency on having its "servlet" property set
   * requires this API-dependent subclass of AbstractCreateAction.
   */
  protected synchronized Action getAction(ActionContext context, String type, ActionConfig actionConfig)
      throws Exception {
    ModuleConfig moduleConfig = actionConfig.getModuleConfig();
    String actionsKey = Constants.ACTIONS_KEY + moduleConfig.getPrefix();
    Map actions = (Map) context.getApplicationScope().get(actionsKey);

    if (actions == null) {
      actions = new HashMap();
      context.getApplicationScope().put(actionsKey, actions);
View Full Code Here


      extension = true;
    }

    // Strip the module prefix and extension (if any)
    ModuleConfig moduleConfig = saContext.getModuleConfig();
    String prefix = moduleConfig.getPrefix();

    if (!path.startsWith(prefix)) {
      throw new IllegalArgumentException("Path does not start with '" + prefix + "'");
    }
View Full Code Here

   * @return <code>true</code> so that processing completes
   * @throws Exception
   *             if thrown by the <code>Action</code>
   */
  public boolean execute(ActionContext actionCtx) throws Exception {
    ModuleConfig moduleConfig = actionCtx.getModuleConfig();

    // Is there an include to be performed?
    String include = actionCtx.getInclude();

    if (include == null) {
      return (false);
    }

    // Determine the currect uri
    String uri = moduleConfig.getPrefix() + include;

    // Perform the appropriate processing on this include uri
    perform(actionCtx, uri);

    return (true);
View Full Code Here

   * @throws Exception
   *             if thrown by the Action class
   */
  public boolean execute(ActionContext actionCtx) throws Exception {
    // Retrieve the ModuleConfig instance
    ModuleConfig moduleConfig = actionCtx.getModuleConfig();

    // If the module is configured for no caching, request no caching
    if (moduleConfig.getControllerConfig().getNocache()) {
      requestNoCache(actionCtx);
    }

    return (false);
  }
View Full Code Here

      return (false);
    }

    // Acquire configuration objects that we need
    ActionConfig actionConfig = actionCtx.getActionConfig();
    ModuleConfig moduleConfig = actionConfig.getModuleConfig();

    // Cache an ForwardConfig back to our input page
    ForwardConfig forwardConfig;
    String input = actionConfig.getInput();

    if (moduleConfig.getControllerConfig().getInputForward()) {
      if (LOG.isTraceEnabled()) {
        LOG.trace("Finding ForwardConfig for '" + input + "'");
      }

      forwardConfig = actionConfig.findForwardConfig(input);

      if (forwardConfig == null) {
        forwardConfig = moduleConfig.findForwardConfig(input);
      }
    } else {
      if (LOG.isTraceEnabled()) {
        LOG.trace("Delegating to forward() for '" + input + "'");
      }
View Full Code Here

  }

  private String resolveModuleRelativePath(ForwardConfig forwardConfig, ServletContext servletContext,
      HttpServletRequest request) {
    String prefix = forwardConfig.getModule();
    ModuleConfig moduleConfig = ModuleUtils.getInstance().getModuleConfig(prefix, request, servletContext);
    return RequestUtils.forwardURL(request, forwardConfig, moduleConfig);
  }
View Full Code Here

    }

    MessageResources resources = (MessageResources) request.getAttribute(bundle);

    if (resources == null) {
      ModuleConfig moduleConfig = ModuleUtils.getInstance().getModuleConfig(request, application);

      resources = (MessageResources) application.getAttribute(bundle + moduleConfig.getPrefix());
    }

    if (resources == null) {
      resources = (MessageResources) application.getAttribute(bundle);
    }
View Full Code Here

TOP

Related Classes of org.g4studio.core.mvc.xstruts.config.ModuleConfig

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.