public class ResourceInfo extends DocumentedInfo
| Constructor and Description |
|---|
ResourceInfo()
Constructor.
|
ResourceInfo(DocumentationInfo documentation)
Constructor with a single documentation element.
|
ResourceInfo(List<DocumentationInfo> documentations)
Constructor with a list of documentation elements.
|
ResourceInfo(String documentation)
Constructor with a single documentation element.
|
| Modifier and Type | Method and Description |
|---|---|
ApplicationInfo |
createApplication()
Creates an application descriptor that wraps this resource descriptor.
|
static void |
describe(ApplicationInfo applicationInfo,
ResourceInfo info,
Object resource,
String path)
Returns a JSON description of the current resource.
|
List<ResourceInfo> |
getChildResources()
Returns the list of child resources.
|
String |
getIdentifier()
Returns the identifier for that element.
|
List<MethodInfo> |
getMethods()
Returns the list of supported methods.
|
List<ParameterInfo> |
getParameters()
Returns the list of parameters.
|
String |
getPath()
Returns the URI template for the identifier of the resource.
|
org.restlet.data.MediaType |
getQueryType()
Returns the media type for the query component of the resource URI.
|
List<org.restlet.data.Reference> |
getType()
Returns the list of references to resource type elements.
|
void |
setChildResources(List<ResourceInfo> resources)
Sets the list of child resources.
|
void |
setIdentifier(String identifier)
Sets the identifier for that element.
|
void |
setMethods(List<MethodInfo> methods)
Sets the list of supported methods.
|
void |
setParameters(List<ParameterInfo> parameters)
Sets the list of parameters.
|
void |
setPath(String path)
Sets the URI template for the identifier of the resource.
|
void |
setQueryType(org.restlet.data.MediaType queryType)
Sets the media type for the query component of the resource URI.
|
void |
setType(List<org.restlet.data.Reference> type)
Sets the list of references to resource type elements.
|
String |
toString() |
void |
updateNamespaces(Map<String,String> namespaces)
Completes the given map of namespaces with the namespaces used in the
documentation elements.
|
getDocumentations, resolveNamespaces, setDocumentation, setDocumentation, setDocumentationspublic ResourceInfo()
public ResourceInfo(DocumentationInfo documentation)
documentation - A single documentation element.public ResourceInfo(List<DocumentationInfo> documentations)
documentations - The list of documentation elements.public ResourceInfo(String documentation)
documentation - A single documentation element.public static void describe(ApplicationInfo applicationInfo, ResourceInfo info, Object resource, String path)
public ApplicationInfo createApplication()
public List<ResourceInfo> getChildResources()
public String getIdentifier()
public List<MethodInfo> getMethods()
public List<ParameterInfo> getParameters()
public String getPath()
public org.restlet.data.MediaType getQueryType()
public List<org.restlet.data.Reference> getType()
public void setChildResources(List<ResourceInfo> resources)
resources - The list of child resources.public void setIdentifier(String identifier)
identifier - The identifier for that element.public void setMethods(List<MethodInfo> methods)
methods - The list of supported methods.public void setParameters(List<ParameterInfo> parameters)
parameters - The list of parameters.public void setPath(String path)
path - The URI template for the identifier of the resource.public void setQueryType(org.restlet.data.MediaType queryType)
queryType - The media type for the query component of the resource URI.public void setType(List<org.restlet.data.Reference> type)
type - The list of references to resource type elements.public void updateNamespaces(Map<String,String> namespaces)
DocumentedInfoupdateNamespaces in class DocumentedInfonamespaces - The given map of namespaces to complete.Copyright © 2011-2013. All Rights Reserved.