Package org.apache.cayenne.util

Examples of org.apache.cayenne.util.WebApplicationResourceLocator


    /**
     * A helper method to create default ResourceLocator.
     */
    protected static ResourceLocator createLocator(ServletContext context) {
        WebApplicationResourceLocator locator = new WebApplicationResourceLocator();
        locator.setSkipAbsolutePath(true);
        locator.setSkipClasspath(false);
        locator.setSkipCurrentDirectory(true);
        locator.setSkipHomeDirectory(true);

        locator.setServletContext(context);
        String configurationPath = context.getInitParameter(CONFIGURATION_PATH_KEY);
        if (configurationPath != null && configurationPath.trim().length() > 0) {
            locator.addFilesystemPath(configurationPath.trim());
        }

        return locator;
    }
View Full Code Here


    /**
     * A helper method to create default ResourceLocator.
     */
    protected static ResourceLocator createLocator(ServletContext context) {
        WebApplicationResourceLocator locator = new WebApplicationResourceLocator();
        locator.setSkipAbsolutePath(true);
        locator.setSkipClasspath(false);
        locator.setSkipCurrentDirectory(true);
        locator.setSkipHomeDirectory(true);

        locator.setServletContext(context);
        String configurationPath = context.getInitParameter(CONFIGURATION_PATH_KEY);
        if (configurationPath != null && configurationPath.trim().length() > 0) {
            locator.addFilesystemPath(configurationPath.trim());
        }

        return locator;
    }
View Full Code Here

    /**
     * A helper method to create default ResourceLocator.
     */
    protected static ResourceLocator createLocator(ServletContext context) {
        WebApplicationResourceLocator locator = new WebApplicationResourceLocator();
        locator.setSkipAbsolutePath(true);
        locator.setSkipClasspath(false);
        locator.setSkipCurrentDirectory(true);
        locator.setSkipHomeDirectory(true);

        locator.setServletContext(context);
        String configurationPath = context.getInitParameter(CONFIGURATION_PATH_KEY);
        if (configurationPath != null && configurationPath.trim().length() > 0) {
            locator.addFilesystemPath(configurationPath.trim());
        }

        return locator;
    }
View Full Code Here

  public BasicServletConfiguration(ServletContext ctxt) {
    super();
    this.setServletContext(ctxt);

    ResourceLocator l = new WebApplicationResourceLocator(servletContext);
    l.setSkipAbsolutePath(true);
    l.setSkipClasspath(false);
    l.setSkipCurrentDirectory(true);
    l.setSkipHomeDirectory(true);

    // check for a configuration path in the context parameters
    String configurationPath =
      ctxt.getInitParameter(CONFIGURATION_PATH_KEY);
    if (configurationPath != null
      && configurationPath.trim().length() > 0) {
      l.addFilesystemPath(configurationPath);
    }

    this.setResourceLocator(l);
  }
View Full Code Here

    /**
     * A helper method to create default ResourceLocator.
     */
    protected static ResourceLocator createLocator(ServletContext context) {
        WebApplicationResourceLocator locator = new WebApplicationResourceLocator();
        locator.setSkipAbsolutePath(true);
        locator.setSkipClasspath(false);
        locator.setSkipCurrentDirectory(true);
        locator.setSkipHomeDirectory(true);

        locator.setServletContext(context);
        String configurationPath = context.getInitParameter(CONFIGURATION_PATH_KEY);
        if (configurationPath != null && configurationPath.trim().length() > 0) {
            locator.addFilesystemPath(configurationPath.trim());
        }

        return locator;
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.util.WebApplicationResourceLocator

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.