public static class RepresentationModel.Builder
extends java.lang.Object
| Constructor and Description | 
|---|
Builder()  | 
| Modifier and Type | Method and Description | 
|---|---|
RepresentationModel.Builder | 
accepted()
Set the http status saying 'accepted'. 
 | 
RepresentationModel.Builder | 
additionalState(java.lang.String pKey,
               java.lang.Object pState)
Add additional state with the given key field. 
 | 
RepresentationModel | 
build()
Create a RepresentationModel using the data already stored in the builder. 
 | 
RepresentationModel.Builder | 
created(java.net.URI pLocation)
Set the location http header to the location passed in and the
 status to 'created'. 
 | 
RepresentationModel.Builder | 
crossRegistryURIs(boolean pCrossRegistryURIs)  | 
RepresentationModel.Builder | 
embedded(java.lang.String pRel,
        java.lang.String... pEmbedded)
Add embedded resources. 
 | 
RepresentationModel.Builder | 
excludeLinkRelations(java.lang.String... pLinkRelations)
Add link relations to exclude. 
 | 
RepresentationModel.Builder | 
extraParameter(java.lang.String pKey,
              java.lang.Object pValue)
Adds an extra parameter to the map. 
 | 
static RepresentationModel.Builder | 
fromModel(RepresentationModel pRepresentationModel)
Static utility method to create a new builder from a given model. 
 | 
java.util.Map<java.lang.String,java.util.List<java.lang.String>> | 
getEmbedded()
Get the embedded resources. 
 | 
java.util.Set<java.lang.String> | 
getExcludeLinkRelations()
Get the links to exclude. 
 | 
java.util.Map<java.lang.String,java.lang.Object> | 
getExtraParameters()
Get the map of extra parameters. 
 | 
<any> | 
getHeaders()
Get the http headers. 
 | 
java.util.Map<java.lang.String,java.util.List<Link>> | 
getLinks()
Get the links. 
 | 
ListingResponse | 
getListingResponse()
Get the listing response 
 | 
java.util.List<Link> | 
getMembers()
Get the members. 
 | 
java.lang.String | 
getOverrideFilterId()
Get the filter override id. 
 | 
java.util.Map<java.lang.String,java.lang.String> | 
getProperties()
Get the properties. 
 | 
java.lang.String | 
getResourceId()
Get the resource id. 
 | 
atg.service.jaxrs.ResourceType | 
getResourceType()
Get the resource type. 
 | 
java.net.URI | 
getResponseURI()
Get the response uri. 
 | 
java.lang.Object | 
getState()
Get the state. 
 | 
int | 
getStatus()
Get the current http status. 
 | 
int | 
getVersion()
Get the resource version. 
 | 
boolean | 
hasCrossRegistryURIs()
Get whether the model has cross registry uri references. 
 | 
RepresentationModel.Builder | 
header(java.lang.String pName,
      java.lang.Object pValue)
Set a header in the http headers. 
 | 
RepresentationModel.Builder | 
language(java.util.Locale pLanguage)
Set the language header in the http headers. 
 | 
RepresentationModel.Builder | 
links(Link... pLinks)
Method to add the links provided to the map of links. 
 | 
RepresentationModel.Builder | 
listingResponse(ListingResponse pListingResponse)
Sets the listing response to use for a collection resource representation. 
 | 
RepresentationModel.Builder | 
location(java.net.URI pLocation)
Set the location header in the http headers. 
 | 
RepresentationModel.Builder | 
members(Link... pMemberLinks)
Add links to the collection of members. 
 | 
RepresentationModel.Builder | 
overrideFilterId(java.lang.String pOverrideFilterId)
Set the Override Filter Id 
 | 
RepresentationModel.Builder | 
properties(java.util.Map<java.lang.String,java.lang.String> pProperties)
Add a map of properties. 
 | 
RepresentationModel.Builder | 
property(java.lang.String pKey,
        java.lang.String pValue)
Store a key-value property. 
 | 
RepresentationModel.Builder | 
removeAdditionalState(java.lang.String pKey)
Remove the additional state for the given key 
 | 
RepresentationModel.Builder | 
removeEmbedded(java.lang.String pRel)
Method to remove the embedded uris for the given rel. 
 | 
RepresentationModel.Builder | 
removeExtraParameter(java.lang.String pKey)
Removes an entry from the extra parameters map for the given key 
 | 
RepresentationModel.Builder | 
removeHeader(java.lang.String pName)
Remove all headers for the given name 
 | 
RepresentationModel.Builder | 
removeLinks(Link... pLinks)
Method to remove the links specified from the map of links. 
 | 
RepresentationModel.Builder | 
removeProperty(java.lang.String pKey)
Remove the property for the given key 
 | 
RepresentationModel.Builder | 
replaceEmbedded(java.util.Map<java.lang.String,java.util.List<java.lang.String>> pEmbedded)
Replace the map of embedded uris with the given map 
 | 
RepresentationModel.Builder | 
replaceExcludeLinkRelations(java.util.Set<java.lang.String> pLinkRelations)
Replace the collection of excluded link relations with the given collection 
 | 
RepresentationModel.Builder | 
replaceExtraParameters(java.util.Map<java.lang.String,java.lang.Object> pExtraParameters)
Replaces the extra parameters map with the given map 
 | 
RepresentationModel.Builder | 
replaceHeaders(<any> pHeaders)
Replace the map of headers with the given map. 
 | 
RepresentationModel.Builder | 
replaceLinks(java.util.Map<java.lang.String,java.util.List<Link>> pLinks)
Add links to the collection of links in the builder. 
 | 
RepresentationModel.Builder | 
replaceMembers(java.util.List<Link> pMemberLinks)
Replace the collection of member links with the given collection. 
 | 
RepresentationModel.Builder | 
replaceProperties(java.util.Map<java.lang.String,java.lang.String> pProperties)
Replace the map of properties with the given map 
 | 
RepresentationModel.Builder | 
resourceId(java.lang.String pResourceId)
Set the resource id. 
 | 
RepresentationModel.Builder | 
resourceType(atg.service.jaxrs.ResourceType pResourceType)
Set the resource type. 
 | 
RepresentationModel.Builder | 
responseURI(java.lang.String pURIPath)
Set the response uri with a uri string. 
 | 
RepresentationModel.Builder | 
responseURI(java.net.URI pURI)
Set the response ur. 
 | 
RepresentationModel.Builder | 
self(Link pSelf)
Set a self link. 
 | 
RepresentationModel.Builder | 
serverError()
Set the http status saying there was a server error. 
 | 
RepresentationModel.Builder | 
state(java.lang.Object pState)
Set the state object to the object passed in. 
 | 
RepresentationModel.Builder | 
status(int pStatus)
Set the http status to the status passed in. 
 | 
RepresentationModel.Builder | 
status(Response.Status pStatus)
Set the http status to the status passed in. 
 | 
RepresentationModel.Builder | 
version(int pVersion)
Set the resource version. 
 | 
public static RepresentationModel.Builder fromModel(RepresentationModel pRepresentationModel)
pRepresentationModel - model to base the new builder onpublic java.lang.Object getState()
public java.util.Map<java.lang.String,java.lang.String> getProperties()
public java.util.Map<java.lang.String,java.util.List<Link>> getLinks()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getEmbedded()
public atg.service.jaxrs.ResourceType getResourceType()
public java.lang.String getResourceId()
public java.util.Set<java.lang.String> getExcludeLinkRelations()
public java.lang.String getOverrideFilterId()
public int getStatus()
public int getVersion()
public <any> getHeaders()
public java.net.URI getResponseURI()
public java.util.List<Link> getMembers()
public boolean hasCrossRegistryURIs()
public ListingResponse getListingResponse()
public java.util.Map<java.lang.String,java.lang.Object> getExtraParameters()
public RepresentationModel build()
public RepresentationModel.Builder language(java.util.Locale pLanguage)
pLanguage - the language.public RepresentationModel.Builder location(java.net.URI pLocation)
pLocation - the location.public RepresentationModel.Builder header(java.lang.String pName, java.lang.Object pValue)
pName - the name of the header.pValue - the value of the header.public RepresentationModel.Builder removeHeader(java.lang.String pName)
pName - name of Headers to removepublic RepresentationModel.Builder replaceHeaders(<any> pHeaders)
pHeaders - Map to replace the headers withpublic RepresentationModel.Builder created(java.net.URI pLocation)
pLocation - the location of resource.public RepresentationModel.Builder serverError()
public RepresentationModel.Builder accepted()
public RepresentationModel.Builder status(int pStatus)
pStatus - the status.public RepresentationModel.Builder status(Response.Status pStatus)
pStatus - the status.public RepresentationModel.Builder state(java.lang.Object pState)
pState - the object to act upon.public RepresentationModel.Builder additionalState(java.lang.String pKey, java.lang.Object pState)
pKey - String key the additional state will be stored underpState - State objectpublic RepresentationModel.Builder removeAdditionalState(java.lang.String pKey)
pKey - key of the additional state to removepublic RepresentationModel.Builder version(int pVersion)
pVersion - the version.public RepresentationModel.Builder property(java.lang.String pKey, java.lang.String pValue)
pKey - the key.pValue - the value.public RepresentationModel.Builder removeProperty(java.lang.String pKey)
pKey - key of the property to removepublic RepresentationModel.Builder properties(java.util.Map<java.lang.String,java.lang.String> pProperties)
pProperties - the properties to add.public RepresentationModel.Builder replaceProperties(java.util.Map<java.lang.String,java.lang.String> pProperties)
pProperties - new map of properties to usepublic RepresentationModel.Builder replaceLinks(java.util.Map<java.lang.String,java.util.List<Link>> pLinks)
pLinks - the links to add.public RepresentationModel.Builder links(Link... pLinks)
pLinks - the links to add.public RepresentationModel.Builder removeLinks(Link... pLinks)
pLinks - the links to remove.public RepresentationModel.Builder self(Link pSelf)
pSelf - the self link.public RepresentationModel.Builder embedded(java.lang.String pRel, java.lang.String... pEmbedded)
pRel - the relation name to the embedded resource.pEmbedded - the embedded resource uri stringspublic RepresentationModel.Builder removeEmbedded(java.lang.String pRel)
pRel - relation name of embedded uris to removepublic RepresentationModel.Builder replaceEmbedded(java.util.Map<java.lang.String,java.util.List<java.lang.String>> pEmbedded)
pEmbedded - Map of embedded uris keyed by relation namepublic RepresentationModel.Builder resourceId(java.lang.String pResourceId)
pResourceId - the resource id.public RepresentationModel.Builder resourceType(atg.service.jaxrs.ResourceType pResourceType)
pResourceType - the resource type.public RepresentationModel.Builder excludeLinkRelations(java.lang.String... pLinkRelations)
pLinkRelations - the link relations to exclude.public RepresentationModel.Builder replaceExcludeLinkRelations(java.util.Set<java.lang.String> pLinkRelations)
pLinkRelations - new excluded link relations to usepublic RepresentationModel.Builder overrideFilterId(java.lang.String pOverrideFilterId)
pOverrideFilterId - override filter idpublic RepresentationModel.Builder responseURI(java.lang.String pURIPath)
pURIPath - string uri pathpublic RepresentationModel.Builder responseURI(java.net.URI pURI)
pURI - uripublic RepresentationModel.Builder crossRegistryURIs(boolean pCrossRegistryURIs)
public RepresentationModel.Builder members(Link... pMemberLinks)
pMemberLinks - the member self links.public RepresentationModel.Builder replaceMembers(java.util.List<Link> pMemberLinks)
pMemberLinks - new collection of self links for memberspublic RepresentationModel.Builder listingResponse(ListingResponse pListingResponse)
pListingResponse - ListingResponse to use.public RepresentationModel.Builder extraParameter(java.lang.String pKey, java.lang.Object pValue)
pKey - key of parameter to addpValue - value of parameter to addpublic RepresentationModel.Builder replaceExtraParameters(java.util.Map<java.lang.String,java.lang.Object> pExtraParameters)
pExtraParameters - new extra parameters map to usepublic RepresentationModel.Builder removeExtraParameter(java.lang.String pKey)
pKey - key of the entry to remove