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 fromLinkable, 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
-
-
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 serializedD2FeedableView(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 voidcustomizeFeed(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.DatefeedUpdated()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
-
-
-
-
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 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
-
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 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 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:
feedLinksin classcom.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:
feedin classcom.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:
customizeFeedin classcom.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:
feedUpdatedin classcom.emc.documentum.rest.view.FeedableView<T extends com.emc.documentum.rest.model.Linkable>- Returns:
- the objects feed updated
-
-