Class PersistentLinkableView<T extends PersistentObject>
java.lang.Object
com.emc.documentum.rest.view.LegacyLinkableView
com.emc.documentum.rest.view.LinkableView<T>
com.emc.documentum.rest.view.EntryableView<T>
com.emc.documentum.rest.view.impl.PersistentLinkableView<T>
- Type Parameters:
T
- the model class extends fromPersistentObject
@DataViewBinding(modelType=PersistentObject.class)
public abstract class PersistentLinkableView<T extends PersistentObject>
extends EntryableView<T>
Default implementation of persistent data view.
-
Field Summary
Fields inherited from class com.emc.documentum.rest.view.LinkableView
linkBuilder, otherParams, repositoryName, returnLinks, serializableData, uriInfo
Fields inherited from class com.emc.documentum.rest.view.LegacyLinkableView
uriFactory, uriFactoryNoValidation
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method does nothing with the persistent object.The returning value of this method is to resolve the value of the atom entry links for the persistent object.protected String
protected ResourceUriBuilder
idUriBuilder
(String resource) protected void
Make default customization and set type definition for the persistent object.protected void
resolveUriTemplateVariables
(Map<String, String> variableMapping) This method returns the resolved map of variable mappings for the URI template defined from the YAML file.protected void
Set type definition URI for the persistent object.Methods inherited from class com.emc.documentum.rest.view.EntryableView
customizeEntry, entry, entryAuthors, entryContent, entryId, entryPublished, entrySrc, entrySummary, entryTitle, entryUpdated, getAtomAuthor, getAtomId, getDefaultEntryLinks
Methods inherited from class com.emc.documentum.rest.view.LinkableView
canonical, canonicalResourceUri, canonicalResourceUri, clearLinks, currentRequestUri, data, getDataInternal, getOtherParams, getWorkingController, handleCustomYamlLinks, idUri, idUriBuilder, inFeed, makeLink, makeLink, makeLinkIf, makeLinkIf, makeLinkTemplate, makeLinkTemplateIf, nameUri, nameUriBuilder, postFromCollection, removeLink, selfLinks, uriBuilder
Methods inherited from class com.emc.documentum.rest.view.LegacyLinkableView
getUriFactory, getUriFactory, getUriFactoryWithoutValidation
-
Constructor Details
-
PersistentLinkableView
public PersistentLinkableView(T persistentObject, UriInfo uriInfo, String repositoryName, Boolean returnLinks, Map<String, Object> others) The parameterized constructor.- Parameters:
persistentObject
- the persistent object to be serializeduriInfo
- the URI info of the request. This is typically obtained from the resource controller where the controller method has an annotated parameter forRequestUri
repositoryName
- the repository namereturnLinks
- indicates whether to return links for this model instanceothers
- other parameters
-
-
Method Details
-
resolveUriTemplateVariables
This method returns the resolved map of variable mappings for the URI template defined from the YAML file.- Specified by:
resolveUriTemplateVariables
in classLinkableView<T extends PersistentObject>
- Parameters:
variableMapping
- variable to property name mapping where the key is a URI path variable and the value is the property name- Returns:
- the mapping of variable to object property value
- See Also:
-
makeDefaultCustomization
protected void makeDefaultCustomization()Make default customization and set type definition for the persistent object.- Overrides:
makeDefaultCustomization
in classLinkableView<T extends PersistentObject>
-
setTypeDefUri
protected void setTypeDefUri()Set type definition URI for the persistent object. -
entryLinks
The returning value of this method is to resolve the value of the atom entry links for the persistent object.- Specified by:
entryLinks
in classEntryableView<T extends PersistentObject>
- Returns:
- the persistent object entry links
-
customize
public void customize()This method does nothing with the persistent object.- Specified by:
customize
in classLinkableView<T extends PersistentObject>
-
idUri
-
idUriBuilder
-
makeLinkByType
-