Package org.apache.wss4j.dom.engine
Class WSSConfig
- java.lang.Object
-
- org.apache.wss4j.dom.engine.WSSConfig
-
public final class WSSConfig extends Object
WSSConfig Carries configuration data so the WSS4J spec compliance can be modified in runtime. Configure an instance of this object only if you need WSS4J to emulate certain industry clients or previous OASIS specifications for WS-Security interoperability testing purposes. The default settings follow the latest OASIS and changing anything might violate the OASIS specs. WARNING: changing the default settings will break the compliance with the latest specs. Do this only if you know what you are doing.
-
-
Field Summary
Fields Modifier and Type Field Description static DatatypeFactory
DATATYPE_FACTORY
static WsuIdAllocator
DEFAULT_ID_ALLOCATOR
protected WsuIdAllocator
idAllocator
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
cleanUp()
Action
getAction(int action)
Lookup actionWSTimeSource
getCurrentTime()
WsuIdAllocator
getIdAllocator()
static WSSConfig
getNewInstance()
Processor
getProcessor(QName el)
Validator
getValidator(QName el)
static void
init()
static boolean
isAddJceProviders()
Class<?>
setAction(int code, Class<?> clazz)
Associate an action instance with a specific action code.Class<?>
setAction(int code, Action action)
Associate an action instance with a specific action code.static void
setAddJceProviders(boolean addJceProviders)
void
setCurrentTime(WSTimeSource currentTime)
void
setIdAllocator(WsuIdAllocator idAllocator)
Class<?>
setProcessor(QName el, Class<?> clazz)
Associate a SOAP processor name with a specified SOAP Security header element QName.Class<?>
setProcessor(QName el, Processor processor)
Associate a SOAP processor name with a specified SOAP Security header element QName.Class<?>
setValidator(QName el, Class<?> clazz)
Associate a SOAP validator name with a specified SOAP Security header element QName.Class<?>
setValidator(QName el, Validator validator)
Associate a SOAP validator name with a specified SOAP Security header element QName.
-
-
-
Field Detail
-
DATATYPE_FACTORY
public static final DatatypeFactory DATATYPE_FACTORY
-
DEFAULT_ID_ALLOCATOR
public static final WsuIdAllocator DEFAULT_ID_ALLOCATOR
-
idAllocator
protected WsuIdAllocator idAllocator
-
-
Method Detail
-
init
public static void init()
-
cleanUp
public static void cleanUp()
-
getNewInstance
public static WSSConfig getNewInstance()
- Returns:
- a new WSSConfig instance configured with the default values
-
getIdAllocator
public WsuIdAllocator getIdAllocator()
- Returns:
- Returns the WsuIdAllocator used to generate wsu:Id attributes
-
setIdAllocator
public void setIdAllocator(WsuIdAllocator idAllocator)
-
setAction
public Class<?> setAction(int code, Action action)
Associate an action instance with a specific action code. This operation allows applications to supply their own actions for well-known operations. Please note that the Action object does NOT get class-loaded per invocation, and so it is up to the implementing class to ensure that it is thread-safe.
-
setAction
public Class<?> setAction(int code, Class<?> clazz)
Associate an action instance with a specific action code. This operation allows applications to supply their own actions for well-known operations.
-
getAction
public Action getAction(int action) throws WSSecurityException
Lookup action- Parameters:
action
-- Returns:
- An action class to create a security token
- Throws:
WSSecurityException
-
setProcessor
public Class<?> setProcessor(QName el, Processor processor)
Associate a SOAP processor name with a specified SOAP Security header element QName. Processors registered under this QName will be called when processing header elements with the specified type. Please note that the Processor object does NOT get class-loaded per invocation, and so it is up to the implementing class to ensure that it is thread-safe.
-
setProcessor
public Class<?> setProcessor(QName el, Class<?> clazz)
Associate a SOAP processor name with a specified SOAP Security header element QName. Processors registered under this QName will be called when processing header elements with the specified type.
-
setValidator
public Class<?> setValidator(QName el, Validator validator)
Associate a SOAP validator name with a specified SOAP Security header element QName. Validators registered under this QName will be called when processing header elements with the specified type. Please note that the Validator object does NOT get class-loaded per invocation, and so it is up to the implementing class to ensure that it is thread-safe.
-
setValidator
public Class<?> setValidator(QName el, Class<?> clazz)
Associate a SOAP validator name with a specified SOAP Security header element QName. validator registered under this QName will be called when processing header elements with the specified type.
-
getValidator
public Validator getValidator(QName el) throws WSSecurityException
- Returns:
- the SOAP Validator associated with the specified QName. The QName is intended to refer to an element in a SOAP security header. This operation returns null if there is no Validator associated with the specified QName.
- Throws:
WSSecurityException
-
getProcessor
public Processor getProcessor(QName el) throws WSSecurityException
- Returns:
- the SOAP processor associated with the specified QName. The QName is intended to refer to an element in a SOAP security header. This operation returns null if there is no processor associated with the specified QName.
- Throws:
WSSecurityException
-
getCurrentTime
public WSTimeSource getCurrentTime()
-
setCurrentTime
public void setCurrentTime(WSTimeSource currentTime)
-
isAddJceProviders
public static boolean isAddJceProviders()
-
setAddJceProviders
public static void setAddJceProviders(boolean addJceProviders)
-
-