Class PolicyUtils.ConfigFile
java.lang.Object
com.sun.xml.ws.policy.privateutil.PolicyUtils.ConfigFile
- Enclosing class:
- PolicyUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateFullName(String configFileIdentifier) Generates a config file resource name from provided config file identifier.static URLloadFromClasspath(String configFileName) Returns a URL pointing to the given config file.static URLloadFromContext(String configFileName, Object context) Returns a URL pointing to the given config file.
-
Method Details
-
generateFullName
Generates a config file resource name from provided config file identifier. The generated file name can be transformed into a URL instance usingloadFromContext(String, Object)orloadFromClasspath(String)method.- Parameters:
configFileIdentifier- the string used to generate the config file URL that will be parsed. Each WSIT config file is in form ofwsit-{configFileIdentifier}.xml. Must not benull.- Returns:
- generated config file resource name
- Throws:
PolicyException- If configFileIdentifier is null.
-
loadFromContext
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 resourcecontext- A ServletContext object. May not be null.
-
loadFromClasspath
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 benull.
-