Brightspot CMS Developer Guide

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:

Previous Topic
How the view generator creates view classes
Next Topic
Was this topic helpful?
Thanks for your feedback.
Our robust, flexible Design System provides hundreds of pre-built components you can use to build the presentation layer of your dreams.

Asset types
Module types
Page types
Brightspot is packaged with content types that get you up and running in a matter of days, including assets, modules and landing pages.

Content types
Landing pages
Everything you need to know when creating, managing, and administering content within Brightspot CMS.

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

Field types
Content modeling
Rich-text elements
A guide to configuring Brightspot's library of integrations, including pre-built options and developer-configured extensions.

Google Analytics
Apple News