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.

  1. Perform one of these steps.

    1. Execute the GetPortalRegistry method on the PeopleSoft session object to get a PortalRegistry object, or

    2. Use the FindPortalRegistries method on a session object to get a collection of all PortalRegistries. Select a PortalRegistry from the collection.

  2. Open the PortalRegistry, using the portal name.

  3. 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.

  4. 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.

    See Saving Content Considerations.

  5. 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.

Image: Life cycle of a PortalRegistry object

The following diagram provides an understanding of the Life Cycle of a PortalRegistry Object.

Life cycle of a PortalRegistry object

Examples of using the PortalRegistry objects are provided at the end of this topic.