Package com.emc.documentum.rest.view

# Class EntryableView<T extends Linkable>

java.lang.Object
com.emc.documentum.rest.view.LegacyLinkableView
com.emc.documentum.rest.view.LinkableView<T>
com.emc.documentum.rest.view.EntryableView<T>

Type Parameters:
  `T` - resource model class extended from `Linkable`, e.g. `PersistentObject`

Direct Known Subclasses:
  `PersistentLinkableView`

public abstract class EntryableView<T extends Linkable> extends LinkableView<T>
Abstract class for resource representation views that could be represented as atom entry. This class extends `LinkableView`. The implementation class must define an annotation `DataViewBinding`.

- ## 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
  `EntryableView(T serializableData, UriInfo uriInfo, String repositoryName, Boolean returnLinks, Map<String,Object> others)`
  Constructor of the entryable view.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `customizeEntry(AtomEntry atomEntry)`
  Override this method to additionally customize the atom entry, especially for custom atom entry attributes.
  `AtomEntry`
  `entry(boolean inline)`
  Build the atom entry from this view instance.
  `abstract List<AtomAuthor>`
  `entryAuthors()`
  The returning value of this method is to resolve the value of the atom entry authors.
  `T`
  `entryContent()`
  The returning value of this method is to resolve the value of the inline atom entry content when it is inline.
  `String`
  `entryId()`
  The returning value of this method is to resolve the value of the atom entry ID.
  `abstract List<Link>`
  `entryLinks()`
  The returning value of this method is to resolve the value of the atom entry links.
  `abstract Date`
  `entryPublished()`
  The returning value of this method is to resolve the value of the atom entry published time.
  `String`
  `entrySrc()`
  The returning value of this method is to resolve the value of the atom entry src link on behalf of the entry content when it is not inline.
  `abstract String`
  `entrySummary()`
  The returning value of this method is to resolve the value of the atom entry summary.
  `abstract String`
  `entryTitle()`
  The returning value of this method is to resolve the value of the atom entry title.
  `abstract Date`
  `entryUpdated()`
  The returning value of this method is to resolve the value of the atom entry updated time.
  `protected AtomAuthor`
  `getAtomAuthor(String author)`
  Build the atom author by the author name.
  `protected String`
  `getAtomId()`
  Build the atom feed ID by removing URL extension name from the canonical URI, defined by `LinkableView.canonical()`.
  `protected List<Link>`
  `getDefaultEntryLinks()`
  Build default atom entry links.

  ### Methods inherited from class com.emc.documentum.rest.view.LinkableView

  `canonical, canonicalResourceUri, canonicalResourceUri, clearLinks, currentRequestUri, customize, data, getDataInternal, getOtherParams, getWorkingController, handleCustomYamlLinks, idUri, idUriBuilder, inFeed, makeDefaultCustomization, makeLink, makeLink, makeLinkIf, makeLinkIf, makeLinkTemplate, makeLinkTemplateIf, nameUri, nameUriBuilder, postFromCollection, removeLink, resolveUriTemplateVariables, 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

  - ### EntryableView

    public EntryableView(T serializableData, UriInfo uriInfo, String repositoryName, Boolean returnLinks, Map<String,Object> others)
    Constructor of the entryable view.
    Parameters:
      `serializableData` - the resource data model extended from by `Linkable`
      `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

  - ### entryId

    public String entryId()
    The returning value of this method is to resolve the value of the atom entry ID. The default atom ID will be the canonical resource URI defined by `LinkableView.canonicalResourceUri(boolean)`
    Returns:
      the atom entry ID

  - ### entryTitle

    public abstract String entryTitle()
    The returning value of this method is to resolve the value of the atom entry title.
    Returns:
      the atom entry title

  - ### entrySummary

    public abstract String entrySummary()
    The returning value of this method is to resolve the value of the atom entry summary.
    Returns:
      the atom entry summary

  - ### entryUpdated

    public abstract Date entryUpdated()
    The returning value of this method is to resolve the value of the atom entry updated time.
    Returns:
      the atom entry updated time

  - ### entryPublished

    public abstract Date entryPublished()
    The returning value of this method is to resolve the value of the atom entry published time.
    Returns:
      the atom entry published time

  - ### entryAuthors

    public abstract List<AtomAuthor> entryAuthors()
    The returning value of this method is to resolve the value of the atom entry authors.
    Returns:
      the atom entry authors

  - ### entryLinks

    public abstract List<Link> entryLinks()
    The returning value of this method is to resolve the value of the atom entry links.
    Returns:
      the atom entry links

  - ### entryContent

    public T entryContent()
    The returning value of this method is to resolve the value of the inline atom entry content when it is inline. The default is to return the parent class method `LinkableView.data()`.
    Returns:
      the inline atom entry content

  - ### entrySrc

    public String entrySrc()
    The returning value of this method is to resolve the value of the atom entry src link on behalf of the entry content when it is not inline.
    Returns:
      the atom entry src link on behalf of the entry content

  - ### entry

    public AtomEntry entry(boolean inline)
    Build the atom entry from this view instance.
    Parameters:
      `inline` - indicate whether the model instance is inline with the atom content.
    Returns:
      the atom entry

  - ### getAtomId

    protected String getAtomId()
    Build the atom feed ID by removing URL extension name from the canonical URI, defined by `LinkableView.canonical()`.
    Returns:
      the atom feed ID

  - ### getAtomAuthor

    protected AtomAuthor getAtomAuthor(String author)
    Build the atom author by the author name.
    Parameters:
      `author` - the author name
    Returns:
      the atom author model

  - ### getDefaultEntryLinks

    protected List<Link> getDefaultEntryLinks()
    Build default atom entry links. The default entry links contains the 'edit' link relation.
    Returns:
      the list of links for the atom entry

  - ### customizeEntry

    protected void customizeEntry(AtomEntry atomEntry)
    Override this method to additionally customize the atom entry, especially for custom atom entry attributes. By default this method does nothing with the entry.
    Parameters:
      `atomEntry` - the entry