Support and Documentation

Restricting fields

The properties key field.<fieldName>.groups specifies the following:

The following conditions are required to use this property:

  • The property's key <fieldname> must be of type Record (or one of its subclasses).

  • The content types listed in the property's value are subclasses of the key's content type.

  1. Following the procedure in Creating properties files, create or open open the appropriate .properties file.

  2. In the properties file, add a line of the form field.<fieldName>.groups=className[,className ...]. Ensure the class name is fully qualified.

The following snippets describe how to use this property.

Step 1: Create model

Example 32. Model for restricting fields
public class Article extends Content {

    private Media media; 1



Declares a field media of type Media (which itself is a subclass of Record).

Step 2: Create subclasses

public class HiResImage extends Media {


public class LowResImage extends Media {


In the previous snippet, the classes HiResImage and LowResImage are subclasses of the content type Media in the snippet Model for restricting fields.

Step 3: Create property file,brightspot.core.article.LowResImage

In the previous snippet, the property limits the selection field and the content picker to types of HiResImage and LowResImage—as well as to type Media.

Table 47. Effect of groups key on selection field and content picker