public abstract class AbstractCAPICallRequest extends Object implements Serializable
This class should not be subclassed manually. It is only intended to be subclassed by classes generated by XINS.
Modifier | Constructor and Description |
---|---|
protected |
AbstractCAPICallRequest(String functionName)
Creates a new
AbstractCAPICallRequest . |
Modifier and Type | Method and Description |
---|---|
protected void |
add(Element element)
Add a new Element to the data element.
|
abstract UnacceptableRequestException |
checkParameters()
Validates whether this request is considered acceptable.
|
XINSCallConfig |
configuration()
Retrieves the call configuration currently associated with this request.
|
void |
configure(XINSCallConfig config)
Assigns the specified call configuration to this request.
|
boolean |
equals(Object obj) |
String |
functionName()
Gets the name of the function to call.
|
protected Element |
getDataElement()
Gets the data section.
|
protected DataElementBuilder |
getDataElementBuilder()
Gets the data section builder.
|
protected String |
getParameter(String parameterName)
Gets the value of a parameter or
null if this parameter
is not set. |
int |
hashCode() |
protected void |
parameterValue(String name,
String value)
Sets the specified parameter to the specified value.
|
protected void |
putDataSection(Element dataSection)
Sets the data section.
|
protected AbstractCAPICallRequest(String functionName) throws IllegalArgumentException
AbstractCAPICallRequest
.functionName
- the name of the function used with this request.IllegalArgumentException
- if functionName == null
.protected final void parameterValue(String name, String value) throws IllegalArgumentException
name
- the name of the parameter to set, cannot be null
.value
- the character string representation of the value of the parameter,
can be null
.IllegalArgumentException
- if name == null
.public final void configure(XINSCallConfig config)
config
- the call configuration to apply when executing this request, or
null
if no specific call configuration should be
associated with this request.public final XINSCallConfig configuration()
null
if
no specific call configuration is associated with this request.protected final String getParameter(String parameterName)
null
if this parameter
is not set.parameterName
- The name of the parameter, can be null
.null
if this parameter
is not set.protected final void putDataSection(Element dataSection)
null
any previous data section set is removed.
If a previous value was entered, the value will be overridden by this new
value.dataSection
- The data section.public final String functionName()
null
.protected void add(Element element)
putDataSection(org.w3c.dom.Element)
,
will be removed.element
- the new element to add to the result, cannot be null
.protected DataElementBuilder getDataElementBuilder()
null
.protected Element getDataElement()
null
if there is no data section.public abstract UnacceptableRequestException checkParameters()
UnacceptableRequestException
is returned.
This method is called automatically when this request is executed, so it typically does not need to be called manually in advance.
UnacceptableRequestException
instance if this request is
considered unacceptable, otherwise null
.See http://www.xins.org/.