public final class ErrorCodeSpec extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ErrorCodeSpec.Type
Type of an error code.
|
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ErrorCodeSpec(String name,
Class reference,
String baseURL)
Creates a new instance of
ErrorCodeSpec . |
Modifier and Type | Method and Description |
---|---|
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<String,ParameterSpec> |
getOutputParameters()
Gets the output parameter specifications defined in the error code.
|
ErrorCodeSpec.Type |
getType()
Gets the type of the error code.
|
public static final ErrorCodeSpec.Type FUNCTIONAL
public static final ErrorCodeSpec.Type TECHNICAL
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.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<String,ParameterSpec> 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()
See http://www.xins.org/.