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, uriInfoFields inherited from class com.emc.documentum.rest.view.LegacyLinkableView
uriFactory, uriFactoryNoValidation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis 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 Stringprotected ResourceUriBuilderidUriBuilder(String resource) protected voidMake default customization and set type definition for the persistent object.protected voidresolveUriTemplateVariables(Map<String, String> variableMapping) This method returns the resolved map of variable mappings for the URI template defined from the YAML file.protected voidSet 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, getDefaultEntryLinksMethods 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, uriBuilderMethods 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 forRequestUrirepositoryName- 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:
resolveUriTemplateVariablesin 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:
makeDefaultCustomizationin 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:
entryLinksin classEntryableView<T extends PersistentObject>- Returns:
- the persistent object entry links
-
customize
public void customize()This method does nothing with the persistent object.- Specified by:
customizein classLinkableView<T extends PersistentObject>
-
idUri
-
idUriBuilder
-
makeLinkByType
-