|
Sonic ESB API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XQParameters
XQParameters provide a generic mechanism for adding name, value like
information to other XQ components such as Services, Endpoints and
Connections.
The XQParameter uniquely identifies an entry by its name and its type where
type is either XQConstants.PARAM_STRING
, XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
.
The value for each parameter is defined either inline or as a reference.
The content for inline parameters is specified within the parameter.
The content for reference parameters is specified as a URL to a resource
stored either in the XQ Directory Service or at some external location.
A parameter can be retrieved in either its string form or in its Object
form. For example a XML parameter can be returned as either a String or
as a DOM Element.
Parameters can have a reference to a parent parameter object. If a parent
is defined then queries to get parameters will be propagated to the
parent instance if not found in this instance.
Method Summary | |
---|---|
boolean |
containsParameter(java.lang.String name,
int type)
Check if the specified parameter exists. |
java.util.Map<java.lang.String,XQParameterInfo> |
getAllInfo()
Get a Map of all parameters defined in this XQParameters object. |
java.util.Iterator<XQParameterInfo> |
getAllInfo(int type)
Get a list of XQParameterInfo structures for all parameters of the specified type. |
boolean |
getBooleanParameter(java.lang.String name,
int type)
Get a parameter as a boolean based on its name and type. |
byte |
getByteParameter(java.lang.String name,
int type)
Get a parameter as a byte based on its name and type. |
double |
getDoubleParameter(java.lang.String name,
int type)
Get a parameter as a double based on its name and type. |
float |
getFloatParameter(java.lang.String name,
int type)
Get a parameter as a float based on its name and type. |
XQParameterInfo |
getInfo(java.lang.String name,
int type)
Get the full information structure for the specified parameter. |
int |
getIntParameter(java.lang.String name,
int type)
Get a parameter as an int based on its name and type. |
long |
getLongParameter(java.lang.String name,
int type)
Get a parameter as a long based on its name and type. |
java.util.Iterator<java.lang.String> |
getNames(int type)
Get a list of the parameter names that are defined of the specified type. |
java.lang.String |
getParameter(java.lang.String name,
int type)
Get a parameter as a String based on its name and type. |
java.lang.String |
getParameter(java.lang.String name,
int type,
java.lang.String defVal)
Get a parameter as a String based on its name and type. |
java.lang.Object |
getParameterObject(java.lang.String name,
int type)
Get a parameter as an Object based on its name and type. |
java.lang.Object |
getParameterObject(java.lang.String name,
int type,
java.lang.Object defVal)
Get a parameter as an Object based on its name and type. |
XQParameters |
getParent()
Get a reference to a parent XQParameter object. |
short |
getShortParameter(java.lang.String name,
int type)
Get a parameter as a short based on its name and type. |
void |
removeAllParameters()
removes all parameters from the map |
void |
removeParameter(java.lang.String name,
int type)
removes a specified parameter from the map |
XQParameterInfo |
setBooleanParameter(java.lang.String name,
int type,
boolean value)
Set a parameter based on its name and type to the specified boolean value. |
XQParameterInfo |
setByteParameter(java.lang.String name,
int type,
byte value)
Set a parameter based on its name and type to the specified byte value. |
XQParameterInfo |
setDoubleParameter(java.lang.String name,
int type,
double value)
Set a parameter based on its name and type to the specified double value. |
XQParameterInfo |
setFloatParameter(java.lang.String name,
int type,
float value)
Set a parameter based on its name and type to the specified float value. |
XQParameterInfo |
setIntParameter(java.lang.String name,
int type,
int value)
Set a parameter based on its name and type to the specified int value. |
XQParameterInfo |
setLongParameter(java.lang.String name,
int type,
long value)
Set a parameter based on its name and type to the specified long value. |
XQParameterInfo |
setParameter(java.lang.String name,
int type,
java.lang.String value)
Set a parameter based on its name and type to the specified String value. |
XQParameterInfo |
setParameter(java.lang.String name,
int type,
java.lang.String value,
java.lang.String ref)
Set a parameter based on its name and type to the specified String value and the specified reference. |
XQParameterInfo |
setParameterObject(java.lang.String name,
int type,
java.lang.Object value)
Set a parameter based on its name and type to the specified Object value. |
XQParameterInfo |
setParameterObject(java.lang.String name,
int type,
java.lang.Object value,
java.lang.String ref)
Set a parameter based on its name and type to the specified Object value and the specified reference. |
void |
setParent(XQParameters parent)
Set a reference to a parent XQParameter object. |
XQParameterInfo |
setShortParameter(java.lang.String name,
int type,
short value)
Set a parameter based on its name and type to the specified short value. |
Methods inherited from interface com.sonicsw.xq.XQCloneable |
---|
clone |
Method Detail |
---|
java.lang.String getParameter(java.lang.String name, int type)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
int getIntParameter(java.lang.String name, int type) throws XQServiceException
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
XQServiceException
- thrown if the parameter value is not defined or cannot be converted to an intshort getShortParameter(java.lang.String name, int type) throws XQServiceException
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
XQServiceException
- thrown if the parameter value is not defined or cannot be converted to a shortlong getLongParameter(java.lang.String name, int type) throws XQServiceException
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
XQServiceException
- thrown if the parameter value is not defined or cannot be converted to a longdouble getDoubleParameter(java.lang.String name, int type) throws XQServiceException
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
XQServiceException
- thrown if the parameter value is not defined or cannot be converted to a doublefloat getFloatParameter(java.lang.String name, int type) throws XQServiceException
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
XQServiceException
- thrown if the parameter value is not defined or cannot be converted to a floatbyte getByteParameter(java.lang.String name, int type) throws XQServiceException
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
XQServiceException
- thrown if the parameter value is not defined or cannot be converted to a byteboolean getBooleanParameter(java.lang.String name, int type) throws XQServiceException
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
XQServiceException
- thrown if this parameter value cannot be converted to a booleanjava.lang.String getParameter(java.lang.String name, int type, java.lang.String defVal)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
defVal
- a default value to return if not found
java.lang.Object getParameterObject(java.lang.String name, int type)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
java.lang.Object getParameterObject(java.lang.String name, int type, java.lang.Object defVal)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
defVal
- a default value to return if not found
XQParameterInfo setParameter(java.lang.String name, int type, java.lang.String value)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
value
- the String value for this parameter
XQParameterInfo setIntParameter(java.lang.String name, int type, int value)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
value
- the String value for this parameter
XQParameterInfo setShortParameter(java.lang.String name, int type, short value)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
value
- the String value for this parameter
XQParameterInfo setLongParameter(java.lang.String name, int type, long value)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
value
- the String value for this parameter
XQParameterInfo setDoubleParameter(java.lang.String name, int type, double value)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
value
- the String value for this parameter
XQParameterInfo setFloatParameter(java.lang.String name, int type, float value)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
value
- the String value for this parameter
XQParameterInfo setByteParameter(java.lang.String name, int type, byte value)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
value
- the String value for this parameter
XQParameterInfo setBooleanParameter(java.lang.String name, int type, boolean value)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
value
- the String value for this parameter
XQParameterInfo setParameter(java.lang.String name, int type, java.lang.String value, java.lang.String ref)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
value
- the String value for this parameter or nullref
- the reference to a resource containing data for this parameter
or null.
XQParameterInfo setParameterObject(java.lang.String name, int type, java.lang.Object value)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
value
- the Object value for this parameter
XQParameterInfo setParameterObject(java.lang.String name, int type, java.lang.Object value, java.lang.String ref)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
value
- the Object value for this parameterref
- the reference to a resource containing data for this parameter
or null.
java.util.Iterator<java.lang.String> getNames(int type)
type
- The type of parameters to return. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
XQParameterInfo getInfo(java.lang.String name, int type)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
java.util.Iterator<XQParameterInfo> getAllInfo(int type)
type
- The type of parameters to return. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
java.util.Map<java.lang.String,XQParameterInfo> getAllInfo()
boolean containsParameter(java.lang.String name, int type)
name
- the name of the parametertype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
void setParent(XQParameters parent)
parent
- a reference to another XQParameter objectXQParameters getParent()
parent
- a reference to another XQParameter objectvoid removeParameter(java.lang.String name, int type)
name
- the name of the parameter to removetype
- the type of the parameter. The type can be either XQConstants.PARAM_STRING
,
XQConstants.PARAM_XML
or
XQConstants.PARAM_OBJECT
void removeAllParameters()
|
Sonic ESB API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |