Package com.emc.documentum.rest.view.impl

# 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 from `PersistentObject`

@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

  Constructors
  Constructor
  Description
  `PersistentLinkableView(T persistentObject, UriInfo uriInfo, String repositoryName, Boolean returnLinks, Map<String,Object> others)`
  The parameterized constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `customize()`
  This method does nothing with the persistent object.
  `List<Link>`
  `entryLinks()`
  The returning value of this method is to resolve the value of the atom entry links for the persistent object.
  `protected String`
  `idUri(String resource)`
  `protected ResourceUriBuilder`
  `idUriBuilder(String resource)`
  `protected void`
  `makeDefaultCustomization()`
  Make default customization and set type definition for the persistent object.
  `protected void`
  `makeLinkByType(String rel, BasicType type, String id, SortedMap<String,String> params)`
  `protected Map<String,Object>`
  `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`
  `setTypeDefUri()`
  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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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 serialized
      `uriInfo` - the URI info of the request. This is typically obtained from the resource controller where the controller method has an annotated parameter for `RequestUri`
      `repositoryName` - the repository name
      `returnLinks` - indicates whether to return links for this model instance
      `others` - other parameters

- ## Method Details

  - ### resolveUriTemplateVariables

    protected Map<String,Object> resolveUriTemplateVariables(Map<String,String> variableMapping)
    This method returns the resolved map of variable mappings for the URI template defined from the YAML file.
    Specified by:
      `resolveUriTemplateVariables` in class `LinkableView<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:
      - `LinkableView.handleCustomYamlLinks()`

  - ### makeDefaultCustomization

    protected void makeDefaultCustomization()
    Make default customization and set type definition for the persistent object.
    Overrides:
      `makeDefaultCustomization` in class `LinkableView<T extends PersistentObject>`

  - ### setTypeDefUri

    protected void setTypeDefUri()
    Set type definition URI for the persistent object.

  - ### entryLinks

    public List<Link> 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 class `EntryableView<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 class `LinkableView<T extends PersistentObject>`

  - ### idUri

    protected String idUri(String resource)

  - ### idUriBuilder

    protected ResourceUriBuilder idUriBuilder(String resource)

  - ### makeLinkByType

    protected void makeLinkByType(String rel, BasicType type, String id, SortedMap<String,String> params)