Class PolicyUtils.ConfigFile

java.lang.Object
com.sun.xml.ws.policy.privateutil.PolicyUtils.ConfigFile
Enclosing class:
PolicyUtils

public static class PolicyUtils.ConfigFile extends Object
  • Constructor Details

    • ConfigFile

      public ConfigFile()
  • Method Details

    • generateFullName

      public static String generateFullName(String configFileIdentifier) throws PolicyException
      Generates a config file resource name from provided config file identifier. The generated file name can be transformed into a URL instance using loadFromContext(String, Object) or loadFromClasspath(String) method.
      Parameters:
      configFileIdentifier - the string used to generate the config file URL that will be parsed. Each WSIT config file is in form of wsit-{configFileIdentifier}.xml. Must not be null.
      Returns:
      generated config file resource name
      Throws:
      PolicyException - If configFileIdentifier is null.
    • loadFromContext

      public static URL loadFromContext(String configFileName, Object context)
      Returns a URL pointing to the given config file. The file name is looked up as a resource from a ServletContext. May return null if the file can not be found.
      Parameters:
      configFileName - The name of the file resource
      context - A ServletContext object. May not be null.
    • loadFromClasspath

      public static URL loadFromClasspath(String configFileName)
      Returns a URL pointing to the given config file. The file is looked up as a resource on the classpath. May return null if the file can not be found.
      Parameters:
      configFileName - the name of the file resource. May not be null.