public class RepresentationModel
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RepresentationModel.Builder
Builder class used to create and validate representation models.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected java.util.Map<java.lang.String,java.lang.Object> |
mAdditionalState
Optional additional state that is stored under a given key
|
protected RepresentationModel.Builder |
mBuilder |
protected boolean |
mCrossRegistryURIs
Whether this model contains any uris that are for a registry other than the one currently in context.
|
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
mEmbedded
The map of embedded resource uri strings keyed by relation name.
|
protected java.util.Set<java.lang.String> |
mExcludeLinkRelations
The link relations to exclude in the representation model.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
mExtraParameters
Miscellaneous other parameters
|
protected java.lang.String |
mFilterUsed
Name of the actual filter used to output this model.
|
protected <any> |
mHeaders
HTTP Headers
|
protected java.util.Map<java.lang.String,java.util.List<Link>> |
mLinks
The link relations.
|
protected ListingResponse |
mListingResponse
Listing response
|
protected java.util.List<Link> |
mMembers
The list of member 'self' links of a collection.
|
protected java.lang.String |
mOverrideFilterId
The id of a filter override.
|
protected java.util.Map<java.lang.String,java.lang.String> |
mProperties
The properties in the representation model.
|
protected java.lang.String |
mResourceId
The resource id of the representation model.
|
protected atg.service.jaxrs.ResourceType |
mResourceType
The resource type of the representation model.
|
protected java.net.URI |
mResponseURI
If set, this is the uri that we will GET to respond to the current request.
|
protected java.lang.Object |
mState
The object being acted upon.
|
protected int |
mStatus
JAXRS Response status code
|
protected int |
mVersion
The resource version.
|
Modifier | Constructor and Description |
---|---|
protected |
RepresentationModel()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getAdditionalState()
Get any additional state.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getEmbedded()
Get the map of embedded resource uri strings keyed by relation name.
|
java.util.Set<java.lang.String> |
getExcludeLinkRelations()
Get the link relations to exclude in the representation model.
|
java.util.Map<java.lang.String,java.lang.Object> |
getExtraParameters()
Miscellaneous other parameters
|
java.lang.String |
getFilterUsed()
Gets the filter used to write out this model.
|
<any> |
getHeaders()
Get the headers.
|
java.util.Map<java.lang.String,java.util.List<Link>> |
getLinks()
Get the link relations.
|
ListingResponse |
getListingResponse()
Get the listing response for a collection resources to provide pagination links and properties.
|
java.util.List<Link> |
getMembers()
Get the members of the representation model.
|
java.lang.String |
getOverrideFilterId()
Returns the id for the filter to override the default filter for
the current resource
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Return the properties in the representation model.
|
java.lang.String |
getResourceId()
Return the resource id of the representation model.
|
atg.service.jaxrs.ResourceType |
getResourceType()
Return the resource type of the representation model.
|
java.net.URI |
getResponseURI()
Get the response uri.
|
Link |
getSelf()
Get the self link.
|
java.lang.Object |
getState()
Get the state object.
|
int |
getStatus()
Get the status code.
|
int |
getVersion()
Get the resource version.
|
boolean |
hasCrossRegistryURIs() |
boolean |
isSingular()
Utility method to determine if this representation is a singular or collection resource
|
void |
setFilterUsed(java.lang.String pFilterUsed)
Sets the filter used to write out this model.
|
java.lang.String |
toString()
Provide a user readable representation of the model.
|
public static java.lang.String CLASS_VERSION
protected RepresentationModel.Builder mBuilder
protected java.lang.Object mState
protected java.util.Map<java.lang.String,java.lang.Object> mAdditionalState
protected atg.service.jaxrs.ResourceType mResourceType
protected java.lang.String mResourceId
protected java.util.Set<java.lang.String> mExcludeLinkRelations
protected java.util.Map<java.lang.String,java.lang.String> mProperties
protected java.util.Map<java.lang.String,java.util.List<Link>> mLinks
protected java.net.URI mResponseURI
protected java.util.List<Link> mMembers
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> mEmbedded
protected java.lang.String mOverrideFilterId
protected int mStatus
protected int mVersion
protected <any> mHeaders
protected ListingResponse mListingResponse
protected java.util.Map<java.lang.String,java.lang.Object> mExtraParameters
protected java.lang.String mFilterUsed
protected boolean mCrossRegistryURIs
public java.lang.String getResourceId()
public atg.service.jaxrs.ResourceType getResourceType()
public boolean isSingular()
public java.util.Set<java.lang.String> getExcludeLinkRelations()
public java.util.Map<java.lang.String,java.lang.String> getProperties()
public Link getSelf()
public java.util.Map<java.lang.String,java.util.List<Link>> getLinks()
public boolean hasCrossRegistryURIs()
public java.util.List<Link> getMembers()
public java.lang.Object getState()
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalState()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getEmbedded()
public java.lang.String getOverrideFilterId()
public int getStatus()
public int getVersion()
public <any> getHeaders()
public java.net.URI getResponseURI()
For example, if a POST addItem endpoint wants to respond with the updated collection of items then it can set this response uri to the collection uri and the final response could be the GET of that collection but also with this POST uri as the self link uri, a 201 response code and the header would include the location header.
public ListingResponse getListingResponse()
public java.util.Map<java.lang.String,java.lang.Object> getExtraParameters()
public java.lang.String getFilterUsed()
public void setFilterUsed(java.lang.String pFilterUsed)
pFilterUsed
- filterpublic java.lang.String toString()
toString
in class java.lang.Object