Modifying Properties
The Controller SPI enables the modification of properties resources.
-
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.
-
Start the appropriate methods of the modifiable instance to run the modifications.
-
Persist the modifications by using the
commit()
method of the controller. -
Setting titles and descriptions
You can set the titles and descriptions of a resource. - Setting unique names
You can set unique names for resources. - Setting metadata
You can set metadata on all modifiable instances that implement theModifiableMetaDataProvider
interface. - Setting supported markups
You can set supported markups on modifiable instances that implement the ModifiableMarkupCapable interface. - Setting the orientation for layout containers
You can set the orientation for modifiable instances ofLayoutContainer
nodes. - Setting portlet preferences
You can set the portlet preferences for portlet definitions and portlet entities. - 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. - Setting themes
The Controller SPI enables the setting of themes on modifiable instances that implement theThemeSetter
interface, for exampleContentPage
andContentLabel
. - Setting URLs
You can set URLs to point to external content (ExternalContentURL
) or to internal content, that is to nodes in the portal (InternalContentURL
).