cancel
Showing results for 
Search instead for 
Did you mean: 
resplin
Elite Collaborator
Elite Collaborator

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



4.0Developer GuideAlfresco Share






IMPORTANT
This article is for Share v4.x only and should not be used for earlier versions.

Document Library Predefined Evaluators


The following is a list of the evaluators defined within the core Share code, as of the v4.0 release. They are all defined in slingshot-documentlibrary-context.xml and can be reused in customizations as required.


Evaluators


These evaluators may need extra configuration before they can be used and form the basis of all metadata and action evaluators via the bean configuration 'parent' attribute.

































evaluator.doclib.action.hasAspect
Properties



aspects
List of aspects the node must have
evaluator.doclib.action.isMimetype
Properties



mimetypes
The node must match one of the mimetypes
evaluator.doclib.action.propertyNotNull
Properties



property
The node property must not be null for this evaluator to return true
evaluator.doclib.action.chainedMatchAll
Properties



evaluators
List of evaluators that are run in turn until one returns false or the end is reached.
evaluator.doclib.action.chainedMatchOne
Properties



evaluators
List of evaluators that are run in turn until one returns true.
evaluator.doclib.action.disableAction
Always returns false.
evaluator.doclib.action.sitePreset
Properties



presets
Current site must match of the listed presets
evaluator.doclib.action.siteBased
Returns true if the current node is located within a Share site and the Site Document Library is being used.
evaluator.doclib.action.containerType
Properties



types
Current documentLibrary container folder must match one of the listed types.
evaluator.doclib.action.nodeType
Properties





allowSubtypes
Whether subtypes of the node are also allowed
types
Node must match one of the listed types
evaluator.doclib.action.value
This evaluator is described in further detail below.

Properties







accessor
jsNode property to be tested
comparator
Bean definition of class implementing the Comparator interface.
evaluator.doclib.action.metadataValue
This evaluator is described in further detail below.

Properties







accessor
metadata property to be tested
comparator
Bean definition of class implementing the Comparator interface.
evaluator.doclib.action.isBrowser
Properties



regex
Regular expression to match against browser userAgent string
evaluator.doclib.action.isPortlet
Returns true if the application is currently deployed within a portlet environment.
evaluator.doclib.action.notPortlet
Returns the inverse of 'isPortlet'

Comparators


The evaluator.doclib.action.value and evaluator.doclib.action.metadataValue evaluators use comparator helper beans in order to test a value against certain conditions. The following comparators are available in a standard install.







org.alfresco.web.evaluator.StringEqualsComparator
Properties





value
Value to test string against
caseInsensitive
Defaults to true
org.alfresco.web.evaluator.NullValueComparator
Properties



value
Boolean to indicate if null should be the pass or fail case

Evaluator Instances


The lists below describe each of the evaluators currently defined for the v4.0 release.


Status Indicator Evaluators

























evaluator.doclib.indicator.editing
The current user is editing this node (working copy).
evaluator.doclib.indicator.lockOwner
The current user is the lock owner (original of a working copy pair)
evaluator.doclib.indicator.locked
The node is locked by another user.
evaluator.doclib.indicator.googleDocsEditing
The node is being edited via Google Docs.
evaluator.doclib.indicator.googleDocsOwner
The current user is editing the node is Google Docs
evaluator.doclib.indicator.googleDocsLocked
Another user is editing the node via Google Docs
evaluator.doclib.indicator.activeWorkflows
The node is involved in one or more active (advanced) workflows
evaluator.doclib.indicator.simpleWorkflow
The node is part of a simple workflow process
evaluator.doclib.indicator.rules
The node has rules applied.
evaluator.doclib.indicator.exifMetadata
The node has the EXIF metadata aspect applied.
evaluator.doclib.indicator.geographicMetadata
The node has the Geographic aspect applied.

Metadata Template Evaluators







evaluator.doclib.metadata.hasCategories
The node has the classifiable aspect applied.
evaluator.doclib.metadata.isWorkingCopy
The node is a working copy.

Action Evaluators































evaluator.doclib.action.simpleApprove
Uses simpleWorkflowAspect and simpleApproveProperty to check for the simple workflow 'Approve' action validity.
evaluator.doclib.action.simpleReject
Uses simpleWorkflowAspect and simpleRejectProperty to check for the simple workflow 'Reject' action validity.
evaluator.doclib.action.locateAction
Checks the current filter is 'path'
evaluator.doclib.action.inlineEdit
Uses the inlineEditAspect and inlineEditMimetype evaluators to determine if a content node can be edited inline.
evaluator.doclib.action.onlineEdit
Uses onlineEditVtiServer, onlineEditBrowser and onlineEditMimetype evaluators to determine if the 'Edit Online' action is valid.
evaluator.doclib.action.hasLockableAspect
Used in an inverted state for the 'Edit Offline', 'Copy', 'Move' and 'Publish' actions
evaluator.doclib.action.siteBased
Enables the site-based permissions dialog. Used in inverted state for the repository-based permissions page action.
evaluator.doclib.action.isWorkingCopy
Tests whether a node is a working copy.
evaluator.doclib.action.viewInExplorer
Reads the 'repository-url' config value to determine the validity of the 'View in Explorer' action
evaluator.doclib.action.googleDocsEditable
Enables 'Check out to Google Docs' action
evaluator.doclib.action.googleDocsCheckIn
Tests for the validity of the 'Check in from Google Docs' action.
evaluator.doclib.action.googleDocsView
Tests whether a node has been checked out to Google Docs
evaluator.doclib.action.googleMaps
Checks for the cm:geographic aspect
evaluator.doclib.action.transferred
Tests for the trx:transferred action for the 'View in Source Repository' action