|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xins.common.spec.ErrorCodeSpec
Specification of a error code (also known as result code).
Nested Class Summary | |
static class |
ErrorCodeSpec.Type
Type of an error code. |
Field Summary | |
static ErrorCodeSpec.Type |
FUNCTIONAL
Type indicating that the error code is functional. |
static ErrorCodeSpec.Type |
TECHNICAL
Type indicating that the error code is technical. |
Constructor Summary | |
ErrorCodeSpec(String name,
Class reference,
String baseURL)
Creates a new instance of ErrorCodeSpec . |
Method Summary | |
String |
getDescription()
Gets the description of the error code. |
String |
getName()
Gets the name of the error code. |
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. |
ParameterSpec |
getOutputParameter(String parameterName)
Gets the output parameter for the specified name. |
Map |
getOutputParameters()
Gets the output parameter specifications defined in the error code. |
ErrorCodeSpec.Type |
getType()
Gets the type of the error code. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final ErrorCodeSpec.Type FUNCTIONAL
public static final ErrorCodeSpec.Type TECHNICAL
Constructor Detail |
public ErrorCodeSpec(String name, Class reference, String baseURL) throws IllegalArgumentException, InvalidSpecificationException
ErrorCodeSpec
.
name
- the name of the error code, cannot be null
.reference
- the reference class used to get the type of the parameters, cannot be null
.baseURL
- the base URL used to located the specifications, cannot be null
.
IllegalArgumentException
- if name == null || reference == null || baseURL == null
.
InvalidSpecificationException
- if the result code file cannot be found or is incorrect.Method Detail |
public String getName()
null
.public String getDescription()
null
.public ParameterSpec getOutputParameter(String parameterName) throws EntityNotFoundException, IllegalArgumentException
parameterName
- the name of the parameter, cannot be null
.
null
.
EntityNotFoundException
- if the error code does not contain any output parameter with the specified name.
IllegalArgumentException
- if parameterName == null
.public Map getOutputParameters()
ParameterSpec
object.
null
.public DataSectionElementSpec getOutputDataSectionElement(String elementName) throws EntityNotFoundException, IllegalArgumentException
elementName
- the name of the element, cannot be null
.
null
.
EntityNotFoundException
- if the error code does not define any output data element with the specified name.
IllegalArgumentException
- if elementName == null
.public Map getOutputDataSectionElements()
DataSectionElementSpec
object.
null
.public ErrorCodeSpec.Type getType()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |