+

Search Tips   |   Advanced Search

Portal Scripting Interface and project support

With the Portal Scripting Interface, we can create Jacl or Jython scripts to automate the management of projects.

Use the Project bean with the Portal Scripting Interface, we can perform the following actions on projects:

To run commands with the Project bean, we can use the Portal bean to set a project as the context for subsequent commands.


List projects

To retrieve a list of projects, use the listall method. This method returns the names of the projects.


Create projects

To create a project, use the create method.

If you create a project with the Portal Scripting Interface, the project is not listed with the recent projects in the project menu.


Delete projects

To delete a project, use the delete method.


Retrieve project details

Retrieve project details with the details method. This method returns the following information about the project: the Universally Unique Identifier (UUID), state, name, and title.


Retrieve translated attributes

If any project attributes are translated, such as the title or description, we can retrieve those attributes with the nlsget method. Specify the attribute with one of the following parameters:

If you do not specify a value for the locale parameter, the currently selected locale is used.


Approve projects

To approve the drafts in a project, use the approve method. This method approves all draft items in the project at the same time. Before we can publish a project, all items in the project must be approved.


Publish projects

To publish a project, use the publish method. Before we can publish a project, all items in the project must be approved.


Set active project

For commands to run within a project, use the setproject method of the Portal bean to specify the project. When invoking the setproject method, you identify the active project with the name of the project. If you invoke the setproject method without specifying a project name, the active project is cleared. When set the project during a session, the project is active immediately.

To set the active project, establish a user session with the portal using the login command of the Portal bean.


Examples

These examples demonstrate a typical command sequence to create a page within a specific project. Each example script performs the following operations:


Parent: Administer managed pages