com.sun.xml.ws.policy.privateutil
Class PolicyUtils.ConfigFile

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

public static class PolicyUtils.ConfigFile
extends Object


Constructor Summary
PolicyUtils.ConfigFile()
           
 
Method Summary
static String generateFullName(String configFileIdentifier)
          Generates a config file resource name from provided config file identifier.
static URL loadFromClasspath(String configFileName)
          Returns a URL pointing to the given config file.
static URL loadFromContext(String configFileName, Object context)
          Returns a URL pointing to the given config file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyUtils.ConfigFile

public PolicyUtils.ConfigFile()
Method Detail

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

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.


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.