Class D2FeedableView<T extends com.emc.documentum.rest.model.Linkable>

java.lang.Object
com.emc.documentum.rest.view.FeedableView<T>
com.emc.documentum.d2.core.resource.view.D2FeedableView<T>
Type Parameters:
T - resource model class extended from Linkable, e.g. PersistentObject

public abstract class D2FeedableView<T extends com.emc.documentum.rest.model.Linkable> extends com.emc.documentum.rest.view.FeedableView<T>
Abstract class for resource representation views that could be represented as atom feed
  • Field Summary

    Fields inherited from class com.emc.documentum.rest.view.FeedableView

    otherParams, repositoryName, returnLinks, uriInfo
  • Constructor Summary

    Constructors
    Constructor
    Description
    D2FeedableView(com.emc.documentum.rest.paging.Page<T> page, com.emc.documentum.rest.http.UriInfo uriInfo, String repositoryName, Boolean returnLinks, Map<String,Object> others)
    Constructor of the feedable view for paginated resource model instances to be serialized
    D2FeedableView(List<T> serializableData, com.emc.documentum.rest.http.UriInfo uriInfo, String repositoryName, Boolean returnLinks, Map<String,Object> others)
    Constructor of the feedable view for list of resource model instances to be serialized
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    customizeFeed(com.emc.documentum.rest.model.AtomFeed feed)
    Override this method to additionally customize the atom feed, especially for custom atom feed attributes.
    <E extends com.emc.documentum.rest.model.AtomEntry>
    com.emc.documentum.rest.model.AtomFeed<E>
    feed(boolean inline)
    Build the atom feed from this view instance.
    List<com.emc.documentum.rest.model.Link>
    The returning value of this method is to resolve the value of the atom feed links.
    The returning value of this method is to resolve the value of the atom feed updated for objects.
    The returning value of this method is to resolve the value of the atom feed items.

    Methods inherited from class com.emc.documentum.rest.view.FeedableView

    feedAuthors, feedId, feedItemsPerPage, feedPageNumber, feedTitle, feedTotalNumber, getAtomId, getOtherParams, getRepositoryName, getUriFactory, getUriInfo, getWorkingController, pageItems, pageTotalForEach, returnLinks, uriBuilder

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • D2FeedableView

      public D2FeedableView(List<T> serializableData, com.emc.documentum.rest.http.UriInfo uriInfo, String repositoryName, Boolean returnLinks, Map<String,Object> others)
      Constructor of the feedable view for list of resource model instances to be serialized
      Parameters:
      serializableData - the list of resource model instances 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
    • D2FeedableView

      public D2FeedableView(com.emc.documentum.rest.paging.Page<T> page, com.emc.documentum.rest.http.UriInfo uriInfo, String repositoryName, Boolean returnLinks, Map<String,Object> others)
      Constructor of the feedable view for paginated resource model instances to be serialized
      Parameters:
      page - the page of resource model instances 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

    • feedLinks

      public List<com.emc.documentum.rest.model.Link> feedLinks()
      The returning value of this method is to resolve the value of the atom feed links. Implementation class should extend this method for additional link rendering.
      Overrides:
      feedLinks in class com.emc.documentum.rest.view.FeedableView<T extends com.emc.documentum.rest.model.Linkable>
      Returns:
      the atom feed links
    • items

      public List<T> items()
      The returning value of this method is to resolve the value of the atom feed items.
      Returns:
      the atom feed items
    • feed

      public <E extends com.emc.documentum.rest.model.AtomEntry> com.emc.documentum.rest.model.AtomFeed<E> feed(boolean inline)
      Build the atom feed from this view instance.
      Overrides:
      feed in class com.emc.documentum.rest.view.FeedableView<T extends com.emc.documentum.rest.model.Linkable>
      Type Parameters:
      E - extended atom entry type
      Parameters:
      inline - whether inline the entry
      Returns:
      the rendered atom feed
    • customizeFeed

      protected void customizeFeed(com.emc.documentum.rest.model.AtomFeed feed)
      Override this method to additionally customize the atom feed, especially for custom atom feed attributes. By default this method does nothing with the feed.
      Overrides:
      customizeFeed in class com.emc.documentum.rest.view.FeedableView<T extends com.emc.documentum.rest.model.Linkable>
      Parameters:
      feed - the feed
    • feedUpdated

      public Date feedUpdated()
      The returning value of this method is to resolve the value of the atom feed updated for objects. The value is current system date.
      Specified by:
      feedUpdated in class com.emc.documentum.rest.view.FeedableView<T extends com.emc.documentum.rest.model.Linkable>
      Returns:
      the objects feed updated