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 fromLinkable
, e.g.PersistentObject
- Direct Known Subclasses:
PersistentLinkableView
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
customizeEntry
(AtomEntry atomEntry) Override this method to additionally customize the atom entry, especially for custom atom entry attributes.entry
(boolean inline) Build the atom entry from this view instance.abstract List<AtomAuthor>
The returning value of this method is to resolve the value of the atom entry authors.The returning value of this method is to resolve the value of the inline atom entry content when it is inline.entryId()
The returning value of this method is to resolve the value of the atom entry ID.The returning value of this method is to resolve the value of the atom entry links.abstract Date
The returning value of this method is to resolve the value of the atom entry published time.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
The returning value of this method is to resolve the value of the atom entry summary.abstract String
The returning value of this method is to resolve the value of the atom entry title.abstract Date
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
Build the atom feed ID by removing URL extension name from the canonical URI, defined byLinkableView.canonical()
.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
-
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 byLinkable
uriInfo
- 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
-
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 byLinkableView.canonicalResourceUri(boolean)
- Returns:
- the atom entry ID
-
entryTitle
The returning value of this method is to resolve the value of the atom entry title.- Returns:
- the atom entry title
-
entrySummary
The returning value of this method is to resolve the value of the atom entry summary.- Returns:
- the atom entry summary
-
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
The returning value of this method is to resolve the value of the atom entry published time.- Returns:
- the atom entry published time
-
entryAuthors
The returning value of this method is to resolve the value of the atom entry authors.- Returns:
- the atom entry authors
-
entryLinks
The returning value of this method is to resolve the value of the atom entry links.- Returns:
- the atom entry links
-
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 methodLinkableView.data()
.- Returns:
- the inline atom entry content
-
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
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
Build the atom feed ID by removing URL extension name from the canonical URI, defined byLinkableView.canonical()
.- Returns:
- the atom feed ID
-
getAtomAuthor
Build the atom author by the author name.- Parameters:
author
- the author name- Returns:
- the atom author model
-
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
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
-