Brightspot CMS User Guide

Implementing Auto-Watch

Auto-watch is a feature that automatically adds a user as a watcher after performing an action on that asset. For example, if an editor posts a comment to an article's conversation, that editor can automatically become a watcher on that article.

private static boolean processForm(ToolPageContext page, Recordable content) throws Exception {; 

    Record record = (Record) content; 
    record.sendMessage("watch.autoAdd", page.getUser()); 

/* Return true or false */
  • Commits the post associated with the content to the database.
  • Instantiates a record variable based on the passed content.
  • Establishes a watch on the passed content for the user who posted the conversation.

The first parameter for the sendMessage method is one of the following:

  • watch.autoAdd—Adds the user unless the user previously removed the watch.
  • watch.manualAdd—Adds the user regardless if user previously removed the watch.
  • watch.autoRemove—Removes the user unless the user manually created a watch.
  • watch.manualRemove—Adds a user regardless if user previously created a watch.
Previous Topic
Configuring Watch
Next Topic
Applying type-specific overrides
Was this topic helpful?
Thanks for your feedback.
The elements that get you up and running in a matter of days, from pre-built content types, to modules, to landing pages.

Content types
Landing pages
Everything you need to manage and administer content within Brightspot CMS.

Admin configurations
A guide for installing, supporting and administering code on the Brightspot platform.

Field types
Content modeling
Rich-text elements
A guide for configuring different integrations to support a multitude of use cases.

Google Analytics
Apple News