Skip to content

Modifying Properties

The Controller SPI enables the modification of properties resources.

  1. Obtain the appropriate controller for the model of which you want to modify a resource.

  2. Obtain a modifiable instance of the resource from that controller.

  3. Start the appropriate methods of the modifiable instance to run the modifications.

  4. Persist the modifications by using the commit() method of the controller.

  5. Setting titles and descriptions
    You can set the titles and descriptions of a resource.

  6. Setting unique names
    You can set unique names for resources.
  7. Setting metadata
    You can set metadata on all modifiable instances that implement the ModifiableMetaDataProvider interface.
  8. Setting supported markups
    You can set supported markups on modifiable instances that implement the ModifiableMarkupCapable interface.
  9. Setting the orientation for layout containers
    You can set the orientation for modifiable instances of LayoutContainer nodes.
  10. Setting portlet preferences
    You can set the portlet preferences for portlet definitions and portlet entities.
  11. Setting flags
    The Controller SPI allows you to set flags for resources. For example, you can set a flag for a page so that portal users can bookmark the page.
  12. Setting themes
    The Controller SPI enables the setting of themes on modifiable instances that implement the ThemeSetter interface, for example ContentPage and ContentLabel.
  13. Setting URLs
    You can set URLs to point to external content (ExternalContentURL) or to internal content, that is to nodes in the portal (InternalContentURL).