Generating Java view interfaces from data files

At run time, Brightspot runs a view model that retrieves all the required items and injects them into a template. The following snippet is a simplified declaration for a view model.

public class ArticleViewModel extends ViewModel<Article> implements PageEntryView, ArticleView {


You generate the interface ArticleView from your theme project.

To generate view interfaces:

  1. Ensure your project has a complete set of data and corresponding templates.
  2. Ensure your project has a configuration file _config.json.
  3. In your project’s installation directory (the directory above theme/), run ./gradlew build.

The generated interface files are in the directory frontend/build/generated-sources/styleguide/com/psddev/styleguide/.

See also:

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