Creating a Content Type

A Brightspot content type is a Java class that has specific properties describing an item. For example, the content type Article can have properties headline, body, reporter, and datePublished. A content type ReaderComment can have properties body, username, and datePosted.

The first step in creating any content type is to declare it as a Java class that extends the Brightspot class Content.

public class Article extends Content {

}

This declaration exposes all the static fields and methods you can review at Class Content. In addition, the class Content extends the Dari class Record; this class is a powerful abstraction layer for retrieving and adding content to a database. For details, see Class Record.