Apache CXF API

org.apache.cxf.tools.common
Class ToolContext

java.lang.Object
  extended by org.apache.cxf.tools.common.ToolContext

public class ToolContext
extends Object


Field Summary
protected  JavaModel javaModel
           
 
Constructor Summary
ToolContext()
           
 
Method Summary
 void addExcludeNamespacePackageMap(String namespace, String pn)
           
 void addNamespacePackageMap(String namespace, String pn)
           
 void addParameters(Map<String,Object> map)
           
 boolean basicValidateWSDL()
           
 boolean containsKey(String key)
           
 boolean fullValidateWSDL()
           
<T> T
get(Class<T> key)
           
 Object get(String key)
           
<T> T
get(String key, Class<T> clazz)
          avoid need to suppress warnings on string->object cases.
<T> T
get(String key, Class<T> clazz, Object defaultValue)
           
 Object get(String key, Object defaultValue)
           
 String[] getArray(String key)
           
 boolean getBooleanValue(String key, String defaultValue)
           
 String getCustomizedNS(String ns)
           
 ToolErrorListener getErrorListener()
           
 List<String> getExcludeFileList()
           
 String getExcludePackageName(String ns)
           
 List<String> getExcludePkgList()
           
 JavaModel getJavaModel()
           
 List<InputSource> getJaxbBindingFile()
           
 Map<String,String> getNamespacePackageMap()
           
 String getPackageName()
           
 QName getQName(String key)
           
 QName getQName(String key, String defaultNamespace)
           
 boolean hasExcludeNamespace(String ns)
           
 boolean hasNamespace(String ns)
           
 boolean isExcludeNamespaceEnabled()
           
 boolean isPackageNameChanged()
           
 boolean isVerbose()
           
 void loadDefaultExcludes(InputStream ins)
           
 void loadDefaultNS2Pck(InputStream ins)
           
 ToolContext makeCopy()
          This method attempts to do a deep copy of items which may change in this ToolContext.
 String mapPackageName(String ns)
           
 boolean optionSet(String key)
           
<T> void
put(Class<T> key, T value)
           
 void put(String key, Object value)
           
 void remove(String key)
           
 void setErrorListener(ToolErrorListener e)
           
 void setJavaModel(JavaModel jModel)
           
 void setJaxbBindingFiles(List<InputSource> bindings)
           
 void setPackageName(String pkgName)
           
 void setParameters(Map<String,Object> map)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

javaModel

protected JavaModel javaModel
Constructor Detail

ToolContext

public ToolContext()
Method Detail

loadDefaultNS2Pck

public void loadDefaultNS2Pck(InputStream ins)

loadDefaultExcludes

public void loadDefaultExcludes(InputStream ins)

getJavaModel

public JavaModel getJavaModel()

setJavaModel

public void setJavaModel(JavaModel jModel)

addParameters

public void addParameters(Map<String,Object> map)

setParameters

public void setParameters(Map<String,Object> map)

containsKey

public boolean containsKey(String key)

get

public Object get(String key)

getArray

public String[] getArray(String key)

get

public Object get(String key,
                  Object defaultValue)

get

public <T> T get(String key,
                 Class<T> clazz)
avoid need to suppress warnings on string->object cases.

Type Parameters:
T -
Parameters:
key -
clazz -
Returns:

get

public <T> T get(String key,
                 Class<T> clazz,
                 Object defaultValue)

get

public <T> T get(Class<T> key)

put

public <T> void put(Class<T> key,
                    T value)

getBooleanValue

public boolean getBooleanValue(String key,
                               String defaultValue)

put

public void put(String key,
                Object value)

remove

public void remove(String key)

optionSet

public boolean optionSet(String key)

isVerbose

public boolean isVerbose()

fullValidateWSDL

public boolean fullValidateWSDL()

basicValidateWSDL

public boolean basicValidateWSDL()

addNamespacePackageMap

public void addNamespacePackageMap(String namespace,
                                   String pn)

hasNamespace

public boolean hasNamespace(String ns)

addExcludeNamespacePackageMap

public void addExcludeNamespacePackageMap(String namespace,
                                          String pn)

hasExcludeNamespace

public boolean hasExcludeNamespace(String ns)

getExcludePackageName

public String getExcludePackageName(String ns)

setPackageName

public void setPackageName(String pkgName)

getPackageName

public String getPackageName()

mapPackageName

public String mapPackageName(String ns)

getCustomizedNS

public String getCustomizedNS(String ns)

setJaxbBindingFiles

public void setJaxbBindingFiles(List<InputSource> bindings)

getJaxbBindingFile

public List<InputSource> getJaxbBindingFile()

isExcludeNamespaceEnabled

public boolean isExcludeNamespaceEnabled()

getExcludePkgList

public List<String> getExcludePkgList()

getExcludeFileList

public List<String> getExcludeFileList()

getQName

public QName getQName(String key)

getQName

public QName getQName(String key,
                      String defaultNamespace)

getErrorListener

public ToolErrorListener getErrorListener()

setErrorListener

public void setErrorListener(ToolErrorListener e)

getNamespacePackageMap

public Map<String,String> getNamespacePackageMap()

isPackageNameChanged

public boolean isPackageNameChanged()

makeCopy

public ToolContext makeCopy()
This method attempts to do a deep copy of items which may change in this ToolContext. The intent of this is to be able to take a snapshot of the state of the ToolContext after it's initialised so we can run a tool multiple times with the same setup while not having the state preserved between multiple runs. I didn't want to call this clone() as it neither does a deep nor shallow copy. It does a mix based on my best guess at what changes and what doesn't.


Apache CXF API

Apache CXF