public interface RESTMethod extends CentraSiteRegistryObject
RESTMethod
represents the method(s) of a REST resource.
Modifier and Type | Method and Description |
---|---|
RESTStatusCode |
createScratchStatuscode()
Creates a new status code object which can be used to set on the method object with appropriate filled in values.
|
java.util.Collection<RESTCallbacks> |
getCallbacks() |
Category |
getHTTPMethod()
Retrieves the underlying HTTP method supported for the designated REST method.
|
java.util.Collection<RESTParameter> |
getParameters()
Gets the parameters of the method which can be used during invocation of the method with appropriate values.
|
java.util.Collection<Category> |
getRequestContentTypes()
Retrieves the request content types defined in the designated REST method.
|
java.util.Collection<RESTPayload> |
getRequestPayloads()
Gets request payloads
RESTPayload of the method object. |
java.util.Collection<Category> |
getResponseContentTypes()
Retrieves the response content types defined in the designated REST method.
|
java.util.Collection<RESTPayload> |
getResponsePayloads()
Gets response payloads
RESTPayload of the method object. |
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getSampleRequestsResponses()
Gets the sample requests and sample responses of the REST method.
|
AbstractXMLService |
getService()
Gets the REST service.
|
java.util.Collection<RESTStatusCode> |
getStatusCodes()
Deprecated.
Please use
RESTPayload.getStatusCode() instead. |
boolean |
isDeprecated()
Tells whether the
RESTMethod object is deprecated or not |
void |
setCallbacks(java.util.Collection<RESTCallbacks> restCallbacks) |
void |
setDeprecated(boolean isDeprecated)
Sets the
RESTMethod object as deprecated or not. |
void |
setHTTPMethod(Category httpMethod)
Defines the category of the HTTP method in accordance to the W3C specification.
|
void |
setParameters(java.util.Collection<RESTParameter> parameters)
Sets list of parameters which can be used for the method invocation with appropriate values.
|
void |
setRequestContentTypes(java.util.Collection<Category> requestContentTypes)
Defines the request content types that are supported by the designated REST method
|
void |
setRequestPayloads(java.util.Collection<RESTPayload> requestPayloads)
Sets the request payload objects of type
RESTPayload for the RESTMethod object |
void |
setResponseContentTypes(java.util.Collection<Category> responseContentTypes)
Defines the response content types that are supported by the designated REST method.
|
void |
setResponsePayloads(java.util.Collection<RESTPayload> responsePayloads)
Sets response payloads of type
RESTPayload for RESTMethod object. |
void |
setSampleRequestsResponses(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> sampleRequestsAndResponses)
Sets the sample requests and sample responses for the REST method.
|
void |
setService(AbstractXMLService service)
Sets the REST service .
|
void |
setStatusCodes(java.util.Collection<RESTStatusCode> statusCodes)
Deprecated.
Please use
RESTPayload.setStatusCode() instead. |
getConsumedAssets, getConsumers, getDescription, getDescription, getDisplayVersion, getInitialVirtualAssetName, getLastModifiedTimeStamp, getLCMAssignment, getLocalName, getMandatoryAttributeProfiles, getName, getName, getNameSpace, getNextVersion, getNextVersions, getOrganization, getOwner, getPendingApprovals, getPreviousVersion, getPreviousVersions, getRegistryObject, getRelationShipValueMap, getRequestedUser, getSubscribers, getSystemVersion, getTitle, getType, getUserVersion, getVisiblePrimaryProfiles, getVisibleProfile, isDeployedOn, isLatestVersionObject, isPropagatePermissions, isPropagateProfilePermissions, removeConsumedAssets, removeConsumers, setDescription, setDescription, setDisplayVersion, setLCMState, setLocalName, setName, setName, setNameSpace, setOrganization, setOwner, setPropagatePermissions, setPropagateProfilePermissions, setRelationShipValueMap, setUserVersion
delete, getAttributeLink, getAttributeValue, getAttributeValue, getAttributeValue, getId, isModified, isPredefined, isReadOnly, save, setAttributeValue, setAttributeValue, setAttributeValue
Category getHTTPMethod() throws CLLException
Category
CLLException
- If an error occurs when retrieving the category from CentraSite.void setHTTPMethod(Category httpMethod) throws CLLException
httpMethod
- The Category
that represents the HTTP Method in CentraSite.CLLException
- If CentraSite fails to define the category of the HTTP method.void setRequestContentTypes(java.util.Collection<Category> requestContentTypes) throws CLLException
requestContentTypes
- The Collection
of Category
that represents the content types in CentraSite.CLLException
- If an error occurs while fetching the HTTP Method category of the method from CentraSite.java.util.Collection<Category> getRequestContentTypes() throws CLLException
Collection
of Category
represents content types in CentraSite.CLLException
- If an error occurs while setting the request content types of the method object in CentraSite.void setResponseContentTypes(java.util.Collection<Category> responseContentTypes) throws CLLException
responseContentTypes
- The Collection
of Category
that represents content types in CentraSite.CLLException
- If an error occurs while fetching the request content types of the method object.java.util.Collection<Category> getResponseContentTypes() throws CLLException
Collection
of Category
represents content types in CentraSite.CLLException
- If an error occurs while setting the response content types of the method object.void setRequestPayloads(java.util.Collection<RESTPayload> requestPayloads) throws CLLException
RESTPayload
for the RESTMethod
objectrequestPayloads
- CLLException
- If an error occurs while setting request payloads for the method object.java.util.Collection<RESTPayload> getRequestPayloads() throws CLLException
RESTPayload
of the method object.RESTPayload
of the RESTMethod
object.CLLException
void setResponsePayloads(java.util.Collection<RESTPayload> responsePayloads) throws CLLException
RESTPayload
for RESTMethod
object.responsePayloads
- CLLException
java.util.Collection<RESTPayload> getResponsePayloads() throws CLLException
RESTPayload
of the method object.CLLException
java.util.Collection<RESTStatusCode> getStatusCodes() throws CLLException
RESTPayload.getStatusCode()
instead.Collection
of RESTStatusCode
of the method object.CLLException
- If an error occurs while setting the status codes on method.void setStatusCodes(java.util.Collection<RESTStatusCode> statusCodes) throws CLLException
RESTPayload.setStatusCode()
instead.statusCodes
- The Collection
of RESTStatusCode
objects described for the method.CLLException
- If an error occurs while fetching the status codes of the method.void setParameters(java.util.Collection<RESTParameter> parameters) throws CLLException
parameters
- The Collection
of RESTParameter
to be set for the method.CLLException
- If an error occurs while setting the parameters on the method.java.util.Collection<RESTParameter> getParameters() throws CLLException
Collection
of RESTParameter
CLLException
- If an error occurs while getting the parameters of the method.RESTStatusCode createScratchStatuscode() throws CLLException
RESTStatusCode
for the REST method.CLLException
- If an error occurs while constructing the instance of RESTStatuscode.java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getSampleRequestsResponses() throws CLLException
Map
in the form of {Request, {Responses}} where the requests are in the method's request content type format and responses are
in the method's response content type format.CLLException
- If an error occurs while constructing the requests and responses.void setSampleRequestsResponses(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> sampleRequestsAndResponses) throws CLLException
sampleRequestsAndResponses
- The Map
of where Key is the sample request and the value are the sample responses of a request.
CLLException
- If an error occurs while setting the sample requests and responses for the REST method.void setDeprecated(boolean isDeprecated) throws CLLException
RESTMethod
object as deprecated or not.isDeprecated
- true if deprecated otherwise falseCLLException
- If an error occurs while setting the deprecation information to the method objectboolean isDeprecated() throws CLLException
RESTMethod
object is deprecated or notCLLException
- If an error occurs while fetching the deprecation information from the method objectjava.util.Collection<RESTCallbacks> getCallbacks() throws CLLException
CLLException
void setCallbacks(java.util.Collection<RESTCallbacks> restCallbacks) throws CLLException
CLLException
void setService(AbstractXMLService service)
service
- The AbstractXMLService
.AbstractXMLService getService()
AbstractXMLService
of the resource.