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

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

      All Methods Instance Methods Concrete Methods 
      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.
      java.util.List<com.emc.documentum.rest.model.Link> feedLinks()
      The returning value of this method is to resolve the value of the atom feed links.
      java.util.Date feedUpdated()
      The returning value of this method is to resolve the value of the atom feed updated for objects.
      java.util.List<T> items()
      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 Detail

      • D2FeedableView

        public D2FeedableView​(java.util.List<T> serializableData,
                              com.emc.documentum.rest.http.UriInfo uriInfo,
                              java.lang.String repositoryName,
                              java.lang.Boolean returnLinks,
                              java.util.Map<java.lang.String,​java.lang.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,
                              java.lang.String repositoryName,
                              java.lang.Boolean returnLinks,
                              java.util.Map<java.lang.String,​java.lang.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 Detail

      • feedLinks

        public java.util.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 java.util.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 java.util.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