Keywords (Component)

CommonSpot lets users assign keywords to pages so that they could be found more easily when a user looks for information. Also, CommonSpot can automatically assign keywords to pages. The Keywords object lets you manage these keywords. Like most objects, you can create, delete, and obtain information. Additional methods lets you associate keywords with subsites, make keywords permanent, and validate a user's rights to assign keywords. This object also contains a method that returns information about the pages that are associated with a keyword.

Methods marked below with [L] may be logged at the site level (if transaction logging is licensed and enabled by the administrator)

Methods marked below with [C] may be customized at the site level

Methods:

addPermanent [L] [C] Adds permanent keywords that can be used on the current subsite.
appendDefault [C] Returns a comma-delimited list of all of the current subsite's default keywords appended to the end of the list contained within the 'keywordList' argument. Keywords are case-sensitive and this method removes duplicate items. If the 'keywordList' argument is an empty string, the returned value is a list of the subsite's default keywords.
appendEnforced [C] Returns a comma-delimited list of all of the current subsite's enforced keywords appended to the end of the list contained within the 'keywordList' argument. The keywords are case-sensitive and this method removes duplicate items. If the 'keywordList' argument is an empty string, the returned value is a list of the subsite's enforced keywords.
delete [L] [C] Deletes a keyword from a subsite's scope. The scope is defined in this method's 'subsiteScope' argument.
deleteMultiple [C] Deletes one more keywords within the subsite's scope; for example, 'ALL', 'CURRENT', 'CURRENT_AND_ABOVE', and so on. The scope is defined in this method's 'subsiteScope' argument.
getAdminRightCounts [C] Returns a structure containing the number of subsites in a scope and the number for which the current user has keyword administration Rights.
getAllSubsiteSettings [C] Returns a structure with default and enforced keyword settings for all subsites where those are defined, keyed by each subsite's ID.
getAvailable [C] Returns zero or more records listing the keywords matching the specified criteria.
getDelimitedListForObject [C] Returns a comma-delimited list of the keywords associated with a page, image, page set, or XML publication. If the returned value is an empty string, no keywords are associated with this object.
getForObject [C] Returns zero or more structures, each containing information about keywords associated with a page, image, page set, or XML publication.
getPagesByKeywordsAndTags [C] Returns zero or more structures, each containing information about a page associated with a keyword or tag; for example, the page's description, file name, approvals, and so on.
getSubsiteDefaultSetting [C] Returns a comma-delimited list of the current subsite's default keywords.
getSubsiteEnforcedSetting [C] Returns a comma-delimited list of the current subsite's enforced keywords.
getUsageCounts [C] Returns zero or more structures, each containing information on usage counts for a keyword; for example, an image, subsite, and all usage counts.
removeOrphans [L] [C] Deletes any 'orphaned' keywords. These are keywords associated with objects that no longer exist. This method is used within CommonSpot and is not normally called by API users.
removePermanent [L] [C] Removes the specified keywords that were defined as permanent for the current subsite. After being removed, they can no longer be used.
replaceForObject [C]  
replaceWordList [L] [C] Changes the name of one or more keywords.
setForObject [L] [C] Adds one or more keywords to an object. If a keyword does not exist, CommonSpot creates and adds it. However, if the user does not have rights to add new keywords, this method returns a comma-delimited list of keywords that could not be added.
setPermanent [L] [C] Sets the state of a keyword so that it is either permanent or non-permanent. CommonSpot automatically deletes non-permanent keywords when the last association to it is removed. In contrast, it never deletes permanent keywords.
setSubsiteDefaultSetting [L] [C] Defines the keywords that will become the default for new pages created within the current subsite. It also sets how these keyword's affect descendant subsite settings.
setSubsiteEnforcedSetting [L] [C] Defines the keywords that are automatically added to new pages created within the current subsite. CommonSpot does not display these keywords when a user edits a page's keywords.
validateAssignRights [C] Returns a structure that contains lists of the keywords a user can and cannot assign. If a user has rights to create keywords, all words are allowed. If a user does not, the user can only add keywords that already exist to a page.