Modifying properties
The Controller SPI allows you to modify properties resources.
To modify properties of a resource, proceed by the following steps:
- Obtain the appropriate controller for the model of which you want to modify a resource.
- Obtain a modifiable instance of the resource from that controller.
- Invoke the appropriate methods of the modifiable instance to perform the modifications.
- Persist the modifications by using the commit() method of the controller.
- Set titles and descriptions
You can set the titles and descriptions of a resource.
- Set unique names
You can set unique names for resources.
- Set metadata
You can set metadata on all modifiable instances that implement the ModifiableMetaDataProvider interface.
- Set supported markups
You can set supported markups on modifiable instances that implement the ModifiableMarkupCapable interface.
- Set the orientation for layout containers
You can set the orientation for modifiable instances of LayoutContainer nodes.
- Set portlet preferences
You can set the portlet preferences for portlet definitions and portlet entities.
- Set 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.
- Set themes
The Controller SPI allows you to set themes on modifiable instances that implement the ThemeSetter interface, for example ContentPage and ContentLabel.
- Set URLs
You can set URLs to point to external content (ExternalContentURL) or to internal content, that is to nodes in the portal (InternalContentURL).
Parent topic: Making modifications by using the Controller SPI
Related information
Modifying portal resources and topologies
|
|
|