org.xins.common.spec
Class FunctionSpec

java.lang.Object
  extended byorg.xins.common.spec.FunctionSpec

public final class FunctionSpec
extends Object

Specification of a function.

Since:
XINS 1.3.0
Version:
$Revision: 1.15 $ $Date: 2006/08/28 09:12:34 $
Author:
Anthony Goubard

Method Summary
 String getDescription()
          Gets the description of the function.
 ErrorCodeSpec getErrorCode(String errorCodeName)
          Gets the error code specification for the specified error code.
 Map getErrorCodes()
          Gets the error code specifications defined in the function.
 DataSectionElementSpec getInputDataSectionElement(String elementName)
          Gets the specification of the element of the input data section with the specified name.
 Map getInputDataSectionElements()
          Gets the specification of the elements of the input data section.
 List getInputParamCombos()
          Gets the input param combo specifications.
 ParameterSpec getInputParameter(String parameterName)
          Gets the input parameter for the specified name.
 Map getInputParameters()
          Gets the input parameter specifications defined in the function.
 String getName()
          Gets the name of the function.
 DataSectionElementSpec getOutputDataSectionElement(String elementName)
          Gets the specification of the element of the output data section with the specified name.
 Map getOutputDataSectionElements()
          Gets the specification of the elements of the output data section.
 List getOutputParamCombos()
          Gets the output param combo specifications.
 ParameterSpec getOutputParameter(String parameterName)
          Gets the output parameter of the specified name.
 Map getOutputParameters()
          Gets the output parameter specifications defined in the function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public String getName()
Gets the name of the function.

Returns:
the name of the function, never null.

getDescription

public String getDescription()
Gets the description of the function.

Returns:
the description of the function, never null.

getInputParameter

public ParameterSpec getInputParameter(String parameterName)
                                throws EntityNotFoundException,
                                       IllegalArgumentException
Gets the input parameter for the specified name.

Parameters:
parameterName - the name of the parameter, cannot be null.
Returns:
the parameter, never null.
Throws:
EntityNotFoundException - if the function does not contain any input parameter with the specified name.
IllegalArgumentException - if parameterName == null.

getInputParameters

public Map getInputParameters()
Gets the input parameter specifications defined in the function. The key is the name of the parameter, the value is the ParameterSpec object.

Returns:
the input parameters, never null.

getOutputParameter

public ParameterSpec getOutputParameter(String parameterName)
                                 throws IllegalArgumentException,
                                        EntityNotFoundException
Gets the output parameter of the specified name.

Parameters:
parameterName - the name of the parameter, cannot be null.
Returns:
the parameter, never null.
Throws:
IllegalArgumentException - if parameterName == null.
EntityNotFoundException - if the function does not contain any output parameter with the specified name.

getOutputParameters

public Map getOutputParameters()
Gets the output parameter specifications defined in the function. The key is the name of the parameter, the value is the ParameterSpec object.

Returns:
the output parameters, never null.

getErrorCode

public ErrorCodeSpec getErrorCode(String errorCodeName)
                           throws IllegalArgumentException,
                                  EntityNotFoundException
Gets the error code specification for the specified error code.

Parameters:
errorCodeName - the name of the error code, cannot be null.
Returns:
the error code specifications, never null.
Throws:
IllegalArgumentException - if errorCodeName == null.
EntityNotFoundException - if the function does not define any error code with the specified name.

getErrorCodes

public Map getErrorCodes()
Gets the error code specifications defined in the function. The standard error codes are not included. The key is the name of the error code, the value is the ErrorCodeSpec object.

Returns:
The error code specifications, never null.

getInputDataSectionElement

public DataSectionElementSpec getInputDataSectionElement(String elementName)
                                                  throws IllegalArgumentException,
                                                         EntityNotFoundException
Gets the specification of the element of the input data section with the specified name.

Parameters:
elementName - the name of the element, cannot be null.
Returns:
the specification of the input data section element, never null.
Throws:
IllegalArgumentException - if elementName == null.
EntityNotFoundException - if the function does not define any input data element with the specified name.

getInputDataSectionElements

public Map getInputDataSectionElements()
Gets the specification of the elements of the input data section. The key is the name of the element, the value is the DataSectionElementSpec object.

Returns:
the input data section elements, never null.

getOutputDataSectionElement

public DataSectionElementSpec getOutputDataSectionElement(String elementName)
                                                   throws IllegalArgumentException,
                                                          EntityNotFoundException
Gets the specification of the element of the output data section with the specified name.

Parameters:
elementName - the name of the element, cannot be null.
Returns:
The specification of the output data section element, never null.
Throws:
IllegalArgumentException - if elementName == null.
EntityNotFoundException - if the function does not define any output data element with the specified name.

getOutputDataSectionElements

public Map getOutputDataSectionElements()
Gets the specification of the elements of the output data section. The key is the name of the element, the value is the DataSectionElementSpec object.

Returns:
the output data section elements, never null.

getInputParamCombos

public List getInputParamCombos()
Gets the input param combo specifications.

Returns:
the list of the input param combos specification (ParamComboSpec), never null.

getOutputParamCombos

public List getOutputParamCombos()
Gets the output param combo specifications.

Returns:
the list of the output param combos specification (ParamComboSpec), never null.


See http://www.xins.org/.