Site Manager Developer Manual / Version 2304
Table Of Contents<Filter name="deleted-filter"> <Predicate class="DeletedPredicate"/> . </Filter>
Example 5.5. Example for the use of a filter
Predicate classes enable selective display of objects. Depending on the context in which the
<Predicate>
element is used, different object types can be selected:
<Filter>
If the
<Predicate>
element is used in a<Filter>
element, the documents shown in the document overview of the Site Manager can be filtered, due to different conditions. Thus, the objects to be filtered are documents of the type hox.corem.editor.proxy.DocumentTypeModel.<Treefilter>
If the
<Predicate>
element is used in a<Treefilter>
element, the folders shown in the folder view of the Site Manager can be filtered. The objects to be filtered are folders of the type hox.corem.editor.proxy.ResourceHolder.<DocumentTypes>
If a
<Predicate>
or<DocumentTypePredicate>
element is used in a<DocumentTypes>
element, the document types which can be created, moved, copied or selected in the document choosers of the Site Manager are filtered. Thus, the objects to be filtered are document types hox.corem.editor.proxy.DocumentTypeModel.<Processes>
If the
<Predicate>
element is used in a<Processes>
element, the workflows offered for initiating in the Menu File|New workflow... are filtered. The objects to be filtered are workflows of the typecom.coremedia.workflow.WfProcess.
<Workflow>
If the
<Predicate>
element is used in a<Workflow>
element, the workflows and tasks shown in the sub views My tasks, Offered tasks and My workflows of the Workflow window can be filtered, if the<Predicate>
element is used in a<Workflow>
element. The objects to be filtered are com.coremedia.workflow.WfProcess and com.coremedia.workflow.WfTask.
Filtering can occur on both the client side and the server side. The predefined filters only run on the server
side, while customized filters must run on the client side. This is determined by the remote
attribute of the <Filter>
element. The default value "true" indicates server-side selection.
Predicates for filtering document types
Default Predicate | Filtered objects | Description |
---|---|---|
GenericDocumentTypePredicate |
Document types: | The default predicate filters the document types which are passed to the
predicate class and sorts the remaining document types in alphabetic order. Own
predicates must implement the interface java.util.function.Predicate<Object>
|
Table 5.15. Predicate classes for filtering documents types.
Predicates for filtering folders
Default predicate | Filtered objects | Description |
---|---|---|
GenericTreePredicate |
Folders: | The default comparator filters without read rights. Own predicates must
implement java.util.function.Predicate<Object> .
|
Table 5.16. Predicate classes for filtering folders
Predicates for filtering workflows and tasks
Default predicate | Sorted objects | Description |
---|---|---|
GenericProcessPredicate |
Workflows: | The default predicate filters workflows for which no creation right is granted
to the user. Own predicates must implement java.util.function.Predicate<Object> .
|
DefaultWorklistPredicate |
Workflows: com.coremedia.workflow.WfProcess Tasks: |
The default predicate filters tasks and workflows by the three categories: my tasks, offered tasks and my workflows
Own predicates must implement |
Table 5.17. Predicate classes for filtering workflows
Predicates for filtering documents
The following filters are predefined and can be configured without stating the appropriate package. They can
only be used for <Predicate>
elements within the <Filter>
element. For
each predicate, you need to define an attribute name
in the <Filter>
element.
Otherwise, no name for the filter will be shown in the View|Filter menu. You
will find the names to use in the next table.
Class |
Description |
---|---|
|
Filters out documents which are older than the current date minus an offset which can be set, using
the attribute Example:
|
|
Filters out specially defined documents. To do so, two sub elements of
In this element, the attribute
In this element, the attribute Example:
All documents of type "Article" with exactly the string "Sports" in the property
If you define a name for this filter in the |
|
Filters deleted documents.
You need to set the attribute |
|
Only displays published documents.
You need to set the attribute |
|
Displays documents which have been neither published nor approved.
You need to set the attribute |
|
Displays documents which have been moved, renamed, marked for deletion or where the latest version has not been approved.
You need to set the attribute |
|
Displays documents which have been moved, renamed, marked for deletion or for which a new version exists. This has been approved but not published yet.
You need to set the attribute |
Table 5.18. Predicate classes for filtering documents
Own Predicates for filtering documents
Default predicate | Sorted objects | Description |
---|---|---|
None |
Documents: | Own predicates must implement java.util.function.Predicate<Object> . |
Table 5.19. Programming own predicates