The official documentation is at: http://docs.alfresco.com
The Alfresco Repository has had built-in support for free-form tagging of any content (and folders) stored within the repository since version 3.0.
A tag scope is a designated container (i.e., a folder) for tagged content. The tag scope defines a set of aggregated data (tag scope data) on the number of occurences of each tag within the container. The repository tagging services are responsible for keeping the tag scope data up-to-date as tags are added and removed from files and folders within the container.
Two aspects are defined within the Data Dictionary Content Model to support tagging metadata.
This aspect can be applied to any item in the repository to allow tags to be applied to it.
Notice the type of the cm:taggable property defined by the aspect is actually a pointer to a category node, rather than an explicit string value. This reduces the storage overhead in the repository and allows tags to be renamed if required.
The repository stores the d:category nodes that represent categories in the workspace://SpacesStore store, under the path /cm:categoryRoot/cm:taggable. The Tags category in the Categories hierarchy stored under /cm:categoryRoot/cm:generalclassifiable is not used.
This aspect defines a tag scope container, which aggregates the occurence of tags applied to objects within the container.
The aspect defines a single d:content property containing the aggregated data in plain text. The structure of the content is as follows.
This is the data which is returned when API requests are made for tagging data.
Two Custom Actions are provided to allow tag scope data to be updated asyncronously. The update-tagscope action iterates through the existing tags listed in the tagscope data and updates the counts stored against each one, while the refresh-tagscopes action iterates through all descendant items below the tag scope and regenerates the data afresh.
Tagging capabilities are implemented within the org.alfresco.repo.tagging package of the Repository project. The following classes implement the core capabilities:
| TaggingServiceImpl || Tagging service implementation|
| TagScopeImpl || Represents the roll up of tags within the scope of a node tree|
| UpdateTagScopesActionExecuter || Update tag scopes action executer|
| RefreshTagScopesActionExecuter || Refresh tag scope action executer|
Content policies defined by TaggingServiceImpl are responsible for ensuring that the tag scope data of any parent folders is maintained when tags are added or removed.
Core Repository Services