| java.lang.Object org.xins.server.FunctionResult
All known Subclasses: org.xins.server.InvalidMessageResult, org.xins.server.frontend.ErrorResult, org.xins.server.frontend.ControlResult,
FunctionResult | public class FunctionResult (Code) | | Result from a function call. Defines an error code, parameters and output
data section. All are optional.
version: $Revision: 1.43 $ $Date: 2007/09/18 08:45:05 $ author: Anthony Goubard author: Ernst de Haan since: XINS 1.0.0 See Also: FunctionRequest |
FunctionResult | public FunctionResult()(Code) | | Creates a new successful FunctionResult instance with no
parameters.
|
FunctionResult | public FunctionResult(String code)(Code) | | Creates a new FunctionResult instance with no parameters.
Parameters: code - the error code, can be null if the result is successful. |
FunctionResult | public FunctionResult(String code, BasicPropertyReader parameters)(Code) | | Creates a new FunctionResult instance with a specified set
of parameters.
Parameters: code - the error code, can be null if the result is successful. Parameters: parameters - the parameters for the result, can be null if there areno parameters. |
checkOutputParameters | public InvalidResponseResult checkOutputParameters()(Code) | | Checks that the output parameters are set as specified. If a parameter
is missing or if the value for it is invalid, then an
InvalidResponseResult is returned. Otherwise the parameters
are considered valid, and null is returned.
The implementation of this method in class
FunctionResult always returns null .
an InvalidResponseResult instance if at least one outputparameter is missing or invalid, or null otherwise. since: XINS 2.0. |
getDataElement | public Element getDataElement()(Code) | | Gets the data element from this result.
the data element of the result, can be null . |
getErrorCode | public String getErrorCode()(Code) | | Returns the result code.
the result code or null if no code was returned. |
getParameter | public String getParameter(String name) throws IllegalArgumentException(Code) | | Gets the value of the specified parameter.
Parameters: name - the parameter element name, cannot be null .string containing the value of the parameter element,or null if the value is not set. throws: IllegalArgumentException - if name == null . |
getParameters | public PropertyReader getParameters()(Code) | | Gets all parameters.
a PropertyReader containing all parameters, never null ;the keys will be the names of the parameters(String objects, cannot be null ),the values will be the parameter values(String objects as well, cannot be null ). |
param | protected void param(String name, String value) throws IllegalArgumentException(Code) | | Adds an output parameter to the result. The name and the value must
both be specified.
Parameters: name - the name of the output parameter, not null and not anempty string. Parameters: value - the value of the output parameter, not null and not anempty string. throws: IllegalArgumentException - if name == null || "".equals(name)|| value == null || "".equals(value) . |
|
|