|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xins.common.spec.APISpec
Specification of an API. This class gets the specification of the API as defined in the api.xml file.
Constructor Summary | |
APISpec(Class reference,
String baseURL)
Creates a new instance of APISpec . |
Method Summary | |
String |
getDescription()
Gets the description of the API. |
FunctionSpec |
getFunction(String functionName)
Gets the specification of the given function. |
Map |
getFunctions()
Gets the function specifications defined in the API. |
String |
getName()
Gets the name of the API. |
String |
getOwner()
Gets the owner of the API. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public APISpec(Class reference, String baseURL) throws IllegalArgumentException, InvalidSpecificationException
APISpec
.
reference
- the reference class used to get the type of the parameters, cannot be null
.baseURL
- the base URL path where are located the specifications, cannot be null
.
IllegalArgumentException
- if reference == null || baseURL == null
.
InvalidSpecificationException
- if the result code file cannot be found or is incorrect.Method Detail |
public String getName()
null
.public String getOwner()
null
if no owner is defined.public String getDescription()
null
.public Map getFunctions()
Map
is the name of the function and the
value is the FunctionSpec
object. The values in the Map
are never null
.
null
.public FunctionSpec getFunction(String functionName) throws IllegalArgumentException, EntityNotFoundException
functionName
- The name of the function, can not be null
null
.
IllegalArgumentException
- if functionName == null
.
EntityNotFoundException
- If the API does not define any function for the given name.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |