Understanding the Life Cycle of a PortalRegistry Object
At runtime, there are certain things you want to do with a PortalRegistry object, like getting an instance of it, adding tabs, editing content references, and so on. The following is an overview of this process. These steps are expanded in other sections.
Perform one of these steps.
Execute the GetPortalRegistry method on the PeopleSoft session object to get a PortalRegistry object, or
Use the FindPortalRegistries method on a session object to get a collection of all PortalRegistries. Select a PortalRegistry from the collection.
Open the PortalRegistry, using the portal name.
After you have an open PortalRegistry object, you can do various actions such as:
Add content references to the existing folders.
Add folders and the content references for them.
Add or change Nodes.
Modify the PortalRegistry properties.
Modify the existing content references, folders, tabs, homepages, and so on.
After you make your changes, you must save your work. The Save method must be executed at the appropriate level, such as at the folder level for changes to a folder, at the PortalRegistry level for changes to the default template, and so on.
A property value change isn't committed to the database until the parent object is saved.
Some methods commit data to the database only when the parent object is saved. However, other methods cause data to be committed to the database as soon as they are executed, like DeleteItem on a folder. Methods that automatically make database changes are noted as such in their description.
When you finish all operations for a PortalRegistry, close the object.
Note: PeopleSoft recommends that you open and close every PortalRegistry in a single PeopleCode event. You shouldn't open a PortalRegistry object and keep it open across multiple events. You should also keep only one PortalRegistry object open at a time.
Examples of using the PortalRegistry objects are provided at the end of this topic.