Andy Stark 4b68c98007 [ADF-3801] Added source linking tool and updated content services docs (#4037)
* [ADF-3801] Added source linking tool

* [ADF-3801] Added source links to doc files
2018-11-30 11:59:36 +00:00

2.8 KiB

Title, Added, Status, Last reviewed
Title Added Status Last reviewed
Tag service v2.0.0 Active 2018-11-13

Tag service

Manages tags in Content Services.

Class members

Methods

  • addTag(nodeId: string, tagName: string): any
    Adds a tag to a node.
    • nodeId: string - ID of the target node
    • tagName: string - Name of the tag to add
    • Returns any - TagEntry object (defined in JS-API) with details of the new tag
  • getAllTheTags(opts?: any): Observable<TagPaging>
    Gets a list of all the tags already defined in the repository.
    • opts: any - (Optional) Options supported by JS-API
    • Returns Observable<TagPaging> - TagPaging object (defined in JS-API) containing the tags
  • getTagsByNodeId(nodeId: string): any
    Gets a list of tags added to a node.
    • nodeId: string - ID of the target node
    • Returns any - TagPaging object (defined in JS-API) containing the tags
  • removeTag(nodeId: string, tag: string): any
    Removes a tag from a node.
    • nodeId: string - ID of the target node
    • tag: string - Name of the tag to remove
    • Returns any - Null object when the operation completes

Details

Content Services supports tagging of file and folder nodes to assist with searches. A tag is a short text string added to an item, rather like a hashtag in social media.

Usually, it is wise to let the user see a list of existing tags and let them choose one by clicking. If they type a tag name with incorrect spelling then it will be treated as a new tag, even though that was not intended. Use getAllTheTags to find all tags in the repository when you need to construct a list like this.

See the Tags API in the Alfresco JS API for more information about the types returned by Tag service methods and for the implementation of the REST API the service is based on.

See also