Interface ContentQueryRow
-
- All Known Subinterfaces:
ContentViewerRowModel
public interface ContentQueryRow
A row returned from a ContentQuery.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ContentQueryRow.STORAGE_TYPE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,Object>
getAction()
Returns a map of single value elements corresponding to the select-items of a query.Optional<ContentQueryActionDocumentReference>
getAction(DocumentReferenceExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.Optional<ContentQueryFile>
getAction(FileExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.Optional<ContentQueryActionObjectReference>
getAction(ObjectReferenceExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.Optional<ContentQueryActionUserReference>
getAction(UserReferenceExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.Optional<Object>
getAction(String externalKey)
Returns an Optional value of an item in the ContentQuery select-list.Map<String,List<Object>>
getActions()
Returns a map of value-lists corresponding to the select-items of a query.List<ContentQueryActionDocumentReference>
getActions(DocumentReferenceExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.List<ContentQueryFile>
getActions(FileExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.List<ContentQueryActionObjectReference>
getActions(ObjectReferenceExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.List<ContentQueryActionUserReference>
getActions(UserReferenceExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.List<Object>
getActions(String externalKey)
Returns a List of values of an item in the ContentQuery select-list.Optional<Object>
getAttribute(String name)
Returns the value of the named attribute, or Optional.empty() if no attribute of the given name exists.Map<String,Object>
getAttributes()
Returns an immutable map with all the attributes set for this row.Optional<ContentQueryAction>
getContentLink()
Returns an Optional action for retrieving the document content.ContentLinkBuilder
getContentLinkBuilder()
Returns a builder for generating content link based on build parameters.Optional<ContentQueryAction>
getDeleteAction()
Returns an Optional action for deleting the document.Document
getDocument()
Returns the underlying document.int
getDocumentId()
Returns the document id of the underlying document.int
getDocumentLevel()
Returns the traversal level of the row.Optional<ContentQueryAction>
getDocumentLink()
Returns an Optional action for viewing the document "in context".Optional<ContentQueryAction>
getEditAction()
Returns an Optional action for editing the document.EditActionBuilder
getEditActionBuilder()
Returns a builder for generating edit document link based on build parameters.Optional<ContentQueryAction>
getEditWebdavAction()
Returns an Optional action for editing the document using WebDAV.Optional<ContentQueryItemDate>
getItem(DateExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.Optional<ContentQueryItemDocumentReference>
getItem(DocumentReferenceExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.Optional<ContentQueryItemFile>
getItem(FileExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.Optional<ContentQueryItemNumber>
getItem(NumberExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.<T> Optional<ContentQueryItemObject<T>>
getItem(ObjectExpressionType<T> expression)
Returns an Optional of an item in the ContentQuery select-list.Optional<ContentQueryItemObjectReference>
getItem(ObjectReferenceExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.Optional<ContentQueryItemString>
getItem(StringExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.Optional<ContentQueryItemUserReference>
getItem(UserReferenceExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.Optional<ContentQueryItemXml>
getItem(XmlExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.Optional<ContentQueryItem>
getItem(String externalKey)
Returns an Optional of an item in the ContentQuery select-list.Map<String,? extends ContentQueryItem>
getItems()
Returns a map of items specified in the ContentQuery select-list.ContentQueryRowSet
getNextLevelRowSet()
Traverse to next level and return the row set for that level.ContentQueryRow.STORAGE_TYPE
getStorageType()
Returns the storage type of the underlying document.RowTransformationClient
getTransformationClient()
Returns a builder for performing transformations on file-based content.Map<String,Object>
getValue()
Returns a map of single value elements corresponding to the select-items of a query.Optional<Instant>
getValue(DateExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.Optional<DocumentReference>
getValue(DocumentReferenceExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.Optional<javax.activation.DataSource>
getValue(FileExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.Optional<Number>
getValue(NumberExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.<T> Optional<T>
getValue(ObjectExpressionType<T> expression)
Returns an Optional value of an item in the ContentQuery select-list.Optional<ObjectReference>
getValue(ObjectReferenceExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.Optional<String>
getValue(StringExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.Optional<UserReference>
getValue(UserReferenceExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.Optional<Document>
getValue(XmlExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.Optional<Object>
getValue(String externalKey)
Returns an Optional value of an item in the ContentQuery select-list.Map<String,List<Object>>
getValues()
Returns a map of value-lists corresponding to the select-items of a query.List<Instant>
getValues(DateExpressionType expression)
Returns a list of values of an item in the ContentQuery select-list.List<DocumentReference>
getValues(DocumentReferenceExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.List<javax.activation.DataSource>
getValues(FileExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.List<Number>
getValues(NumberExpressionType expression)
Returns a list of values of an item in the ContentQuery select-list.<T> List<T>
getValues(ObjectExpressionType<T> expression)
Returns a list of values of an item in the ContentQuery select-list.List<ObjectReference>
getValues(ObjectReferenceExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.List<String>
getValues(StringExpressionType expression)
Returns a list of values of an item in the ContentQuery select-list.List<UserReference>
getValues(UserReferenceExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.List<Document>
getValues(XmlExpressionType expression)
Returns a list of values of an item in the ContentQuery select-list.List<Object>
getValues(String externalKey)
Returns a List of values of an item in the ContentQuery select-list.void
setAttribute(String name, Object o)
Stores an attribute in this row.<T> T
toBean(Class<T> clazz)
Returns a view of this ContentQueryRow as a bean with the given type<T> T
toBean(Class<T> clazz, Object... autowireObjects)
Returns a view of this ContentQueryRow as a bean with the given type<T> T
toBean(Class<T> clazz, BiConsumer<ContentQueryRow,T> beanPostProcessor)
Returns a view of this ContentQueryRow as a bean with the given type
-
-
-
Method Detail
-
getDocumentLevel
int getDocumentLevel()
Returns the traversal level of the row. If the query has no traversal specified, always returns 1.- Returns:
- traversal level of the document
-
getNextLevelRowSet
ContentQueryRowSet getNextLevelRowSet()
Traverse to next level and return the row set for that level.Applicable if you've included either traverseUp or traverseDown in the query configuration.
Next level means further into the returned result set:
- When using traverseUp you will get the ancestors of the current document.
- When using traverseDown you will get the descendants of the current document.
-
getDocumentId
int getDocumentId()
Returns the document id of the underlying document.- Returns:
- the document id of the underlying document
-
getDocument
Document getDocument()
Returns the underlying document.- Returns:
- the underlying document
-
getStorageType
ContentQueryRow.STORAGE_TYPE getStorageType()
Returns the storage type of the underlying document.- Returns:
- the storage type of the underlying document
-
getItems
Map<String,? extends ContentQueryItem> getItems()
Returns a map of items specified in the ContentQuery select-list. Multiple calls to this method will always return the same map.- Returns:
- a map of items specified in the ContentQuery select-list
-
getItem
Optional<ContentQueryItem> getItem(String externalKey)
Returns an Optional of an item in the ContentQuery select-list. Multiple calls to this method will return distinct Optionals, but any underlying item will be the same.- Parameters:
externalKey
- name of item to get- Returns:
- an Optional of an item in the ContentQuery select-list
-
getItem
<T> Optional<ContentQueryItemObject<T>> getItem(ObjectExpressionType<T> expression)
Returns an Optional of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional of an item in the ContentQuery select-list
- See Also:
getItem(String)
-
getItem
Optional<ContentQueryItemString> getItem(StringExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional of an item in the ContentQuery select-list
- See Also:
getItem(String)
-
getItem
Optional<ContentQueryItemNumber> getItem(NumberExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional of an item in the ContentQuery select-list
- See Also:
getItem(String)
-
getItem
Optional<ContentQueryItemDate> getItem(DateExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional of an item in the ContentQuery select-list
- See Also:
getItem(String)
-
getItem
Optional<ContentQueryItemXml> getItem(XmlExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional of an item in the ContentQuery select-list
- See Also:
getItem(String)
-
getItem
Optional<ContentQueryItemFile> getItem(FileExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional of an item in the ContentQuery select-list
- See Also:
getItem(String)
-
getItem
Optional<ContentQueryItemUserReference> getItem(UserReferenceExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional of an item in the ContentQuery select-list
- See Also:
getItem(String)
-
getItem
Optional<ContentQueryItemDocumentReference> getItem(DocumentReferenceExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional of an item in the ContentQuery select-list
- See Also:
getItem(String)
-
getItem
Optional<ContentQueryItemObjectReference> getItem(ObjectReferenceExpressionType expression)
Returns an Optional of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional of an item in the ContentQuery select-list
- See Also:
getItem(String)
-
getValue
Map<String,Object> getValue()
Returns a map of single value elements corresponding to the select-items of a query. If an item is multi-valued, accessing it through this map will cause an error The method returns the same map every time it is called for the same row.- Returns:
- a map of value-lists corresponding to the select-items of a query
-
getValues
Map<String,List<Object>> getValues()
Returns a map of value-lists corresponding to the select-items of a query. The method returns the same map every time it is called for the same row.- Returns:
- a map of value-lists corresponding to the select-items of a query
-
getValue
Optional<Object> getValue(String externalKey)
Returns an Optional value of an item in the ContentQuery select-list. This is the equivalent of calling getItem(externalKey).getValue().- Parameters:
externalKey
- name of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getItem(String)
-
getValues
List<Object> getValues(String externalKey)
Returns a List of values of an item in the ContentQuery select-list. This is the equivalent of calling getItem(externalKey).getValues().- Parameters:
externalKey
- name of item to get- Returns:
- a List of values of an item in the ContentQuery select-list
- See Also:
getItem(String)
-
getValue
<T> Optional<T> getValue(ObjectExpressionType<T> expression)
Returns an Optional value of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getValue(String)
-
getValues
<T> List<T> getValues(ObjectExpressionType<T> expression)
Returns a list of values of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- List of values for the item; may be empty.
- See Also:
getValues(String)
-
getValue
Optional<Instant> getValue(DateExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getValue(String)
-
getValues
List<Instant> getValues(DateExpressionType expression)
Returns a list of values of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- List of values for the item; may be empty.
- See Also:
getValues(String)
-
getValue
Optional<Number> getValue(NumberExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getValue(String)
-
getValues
List<Number> getValues(NumberExpressionType expression)
Returns a list of values of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- List of values for the item; may be empty.
- See Also:
getValues(String)
-
getValue
Optional<String> getValue(StringExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getValue(String)
-
getValues
List<String> getValues(StringExpressionType expression)
Returns a list of values of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- List of values for the item; may be empty.
- See Also:
getValues(String)
-
getValue
Optional<Document> getValue(XmlExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getValue(String)
-
getValues
List<Document> getValues(XmlExpressionType expression)
Returns a list of values of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- List of values for the item; may be empty.
- See Also:
getValues(String)
-
getValue
Optional<javax.activation.DataSource> getValue(FileExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list. If there is no such item, the returned optional will be empty.- Parameters:
expression
- expression of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getValue(String)
-
getValues
List<javax.activation.DataSource> getValues(FileExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- a List of values of an item in the ContentQuery select-list
- See Also:
getValues(String)
-
getValue
Optional<ObjectReference> getValue(ObjectReferenceExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list. If there is no such item, the returned optional will be empty.- Parameters:
expression
- expression of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getValue(String)
-
getValues
List<ObjectReference> getValues(ObjectReferenceExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- a List of values of an item in the ContentQuery select-list
- See Also:
getValues(String)
-
getValue
Optional<DocumentReference> getValue(DocumentReferenceExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getValue(String)
-
getValues
List<DocumentReference> getValues(DocumentReferenceExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- a List of values of an item in the ContentQuery select-list
- See Also:
getValues(String)
-
getValue
Optional<UserReference> getValue(UserReferenceExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getValue(String)
-
getValues
List<UserReference> getValues(UserReferenceExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- a List of values of an item in the ContentQuery select-list
- See Also:
getValues(String)
-
getAction
Map<String,Object> getAction()
Returns a map of single value elements corresponding to the select-items of a query. If an item is multi-valued, accessing it through this map will cause an error The method returns the same map every time it is called for the same row.- Returns:
- a map of value-lists corresponding to the select-items of a query
-
getActions
Map<String,List<Object>> getActions()
Returns a map of value-lists corresponding to the select-items of a query. The method returns the same map every time it is called for the same row.- Returns:
- a map of value-lists corresponding to the select-items of a query
-
getAction
Optional<Object> getAction(String externalKey)
Returns an Optional value of an item in the ContentQuery select-list. This is the equivalent of calling getItem(externalKey).getAction().- Parameters:
externalKey
- name of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getItem(String)
-
getActions
List<Object> getActions(String externalKey)
Returns a List of values of an item in the ContentQuery select-list. This is the equivalent of calling getItem(externalKey).getAction().- Parameters:
externalKey
- name of item to get- Returns:
- a List of values of an item in the ContentQuery select-list
- See Also:
getItem(String)
-
getAction
Optional<ContentQueryFile> getAction(FileExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getAction(String)
-
getActions
List<ContentQueryFile> getActions(FileExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- a List of values of an item in the ContentQuery select-list
- See Also:
getAction(String)
-
getAction
Optional<ContentQueryActionObjectReference> getAction(ObjectReferenceExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getAction(String)
-
getActions
List<ContentQueryActionObjectReference> getActions(ObjectReferenceExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- a List of values of an item in the ContentQuery select-list
- See Also:
getAction(String)
-
getAction
Optional<ContentQueryActionDocumentReference> getAction(DocumentReferenceExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getAction(String)
-
getActions
List<ContentQueryActionDocumentReference> getActions(DocumentReferenceExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- a List of values of an item in the ContentQuery select-list
- See Also:
getAction(String)
-
getAction
Optional<ContentQueryActionUserReference> getAction(UserReferenceExpressionType expression)
Returns an Optional value of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- an Optional value of an item in the ContentQuery select-list
- See Also:
getAction(String)
-
getActions
List<ContentQueryActionUserReference> getActions(UserReferenceExpressionType expression)
Returns a List of values of an item in the ContentQuery select-list.- Parameters:
expression
- expression of item to get- Returns:
- a List of values of an item in the ContentQuery select-list
- See Also:
getAction(String)
-
setAttribute
void setAttribute(String name, Object o)
Stores an attribute in this row.- Parameters:
name
- name of the attribute to storeo
- the value to be stored
-
getAttribute
Optional<Object> getAttribute(String name)
Returns the value of the named attribute, or Optional.empty() if no attribute of the given name exists. Attributes can be set using thesetAttribute(java.lang.String, java.lang.Object)
call.- Parameters:
name
- name of the attribute- Returns:
- the value of the attribute.
-
getAttributes
Map<String,Object> getAttributes()
Returns an immutable map with all the attributes set for this row.- Returns:
- an immutable map of attributes.
-
getEditActionBuilder
EditActionBuilder getEditActionBuilder()
Returns a builder for generating edit document link based on build parameters. The builder is an customizable alternative to using the editAction directly- Returns:
- a builder for edit action
-
getEditAction
Optional<ContentQueryAction> getEditAction()
Returns an Optional action for editing the document. The optional will be empty if there is no such action, for example when the user does not have the required permissions. The returned action is an indirect action, pointing at a URL which will redirect to the actual editing URL. The action does therefore not support target-specific window options and the like.- Returns:
- an Optional action for editing the document
-
getEditWebdavAction
Optional<ContentQueryAction> getEditWebdavAction()
Returns an Optional action for editing the document using WebDAV. The optional will be empty if there is no such action, for example when the document type does not support it, or when the user does not have the required permissions.- Returns:
- an Optional action for editing the document using WebDAV
-
getDeleteAction
Optional<ContentQueryAction> getDeleteAction()
Returns an Optional action for deleting the document. The optional will be empty if there is no such action, for example when the user does not have the required permissions.For versioned documents: Usage of this action requires that "IKB$VERSION_STATUS" has been selected in the content query.
- Returns:
- an Optional action for deleting the document
- Throws:
RuntimeException
- if "IKB$VERSION_STATUS" is missing for versioned documents
-
getDocumentLink
Optional<ContentQueryAction> getDocumentLink()
Returns an Optional action for viewing the document "in context". The returned action is an indirect action, pointing at a URL which will redirect to the actual editing URL. The action does therefore not support target-specific window options and the like.- Returns:
- an Optional action for viewing the document
-
getContentLinkBuilder
ContentLinkBuilder getContentLinkBuilder()
Returns a builder for generating content link based on build parameters. The builder is an customizable alternative to using the contentLink directly- Returns:
- a builder for content link
-
getTransformationClient
RowTransformationClient getTransformationClient()
Returns a builder for performing transformations on file-based content.- Returns:
- a builder for transformation.
-
getContentLink
Optional<ContentQueryAction> getContentLink()
Returns an Optional action for retrieving the document content.- Returns:
- an Optional action for retrieving the document content.
-
toBean
<T> T toBean(Class<T> clazz)
Returns a view of this ContentQueryRow as a bean with the given type- Parameters:
clazz
- Java class to map into- Returns:
- ContentQueryRow mapped into new instance of clazz
-
toBean
<T> T toBean(Class<T> clazz, Object... autowireObjects)
Returns a view of this ContentQueryRow as a bean with the given typeSupports @Autowired fields using the specified autowireObjects and a @PostConstruct annotated method will be called afterwards if present.
- Parameters:
clazz
- Java class to map intoautowireObjects
- add any additional objects you wish to autowire. ContentQueryRow is always available for autowiring.- Returns:
- ContentQueryRow mapped into new instance of clazz
-
toBean
<T> T toBean(Class<T> clazz, BiConsumer<ContentQueryRow,T> beanPostProcessor)
Returns a view of this ContentQueryRow as a bean with the given type- Parameters:
clazz
- Java class to map intobeanPostProcessor
- BiConsumer allowing additional processing using ContentQueryRow and the mapped bean.- Returns:
- ContentQueryRow mapped into new instance of clazz
-
-