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
-
Field Summary
Fields inherited from class com.emc.documentum.rest.view.FeedableView
otherParams, repositoryName, returnLinks, uriInfo
-
Constructor Summary
ConstructorDescriptionD2FeedableView
(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 serializedD2FeedableView
(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 TypeMethodDescriptionprotected 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.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 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 serializeduriInfo
- the URI info of the request. This is typically obtained from the resource controller where the controller method has an annotated parameter forRequestUri
repositoryName
- 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, 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 serializeduriInfo
- the URI info of the request. This is typically obtained from the resource controller where the controller method has an annotated parameter forRequestUri
repositoryName
- the repository namereturnLinks
- indicates whether to return links for this model instanceothers
- other parameters
-
-
Method Details
-
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 classcom.emc.documentum.rest.view.FeedableView<T extends com.emc.documentum.rest.model.Linkable>
- Returns:
- the atom feed links
-
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 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:
customizeFeed
in classcom.emc.documentum.rest.view.FeedableView<T extends com.emc.documentum.rest.model.Linkable>
- Parameters:
feed
- the feed
-
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 classcom.emc.documentum.rest.view.FeedableView<T extends com.emc.documentum.rest.model.Linkable>
- Returns:
- the objects feed updated
-