+

Search Tips   |   Advanced Search


Sample Policy XML configuration files

Use these samples with the XML configuration interface as an alternative to the Resource Policies portlet and the policy editor that are available from the Access section of the Administration page of your work site. Exporting and importing policy XML files is useful when deploying policies on multiple servers and when staging a portal from development and test servers to a production server. The policy XML configuration samples allow you to extend policy definitions and to create or customize policy types and policy settings for portal resources.

To work with the Policy Manager API, refer to the Java™doc information for the package com.ibm.policy.manager in the directory PortalServer_root/doc/Javadoc/api_docs.


Policy XML file

Before you work with the XML configuration samples for policies, you should become familiar with the policy XML file by examining an exported policy definition. To review a policy definition file...

  1. From the Administration page of your work site, go to the Access section and display the Resource Policies portlet.

  2. From the list of policies, display the menu for the Mail policy and export its definition.

  3. Open the exported policy definition file in an XML editor.

  4. Examine the structure of the policy type and its elements:

    • Node properties in the Policy branch of the content management repository

    • Policy type properties

    • Policy type editor

    • Default policy rule for the policy type

    • Policy settings: the collection of default policy value sets defined for the policy type

    • Lower-level nodes for child policies

Restriction: When you use the XML configuration interface to work with policies, some limitations apply:


Sample files

All sample Policy XML configuration files are located in the directory path PortalServer/installer/wp.config/config/templates.

createPolicyResourceType.xml

Defines the policy type for a portal resource type. Review this sample to see how the name/value pairs of policy attributes are set. Do not edit this XML sample. Do not attempt to use this XML sample with the XML configuration interface. This XML sample is provided for reference only.

createCompositeAppRootNode.xml

Defines the policy for Composite Applications. The policy definition specifies the values for the collection of attributes that includes the policy path in the content repository, the policy type (Composite Application), the policy node in the parent-child hierarchy that supports policy specialization, the policy editor, policy rules, policy settings, and policy version. The policy settings in this sample specify the choices available in the Composite Application policy editor for managing application size, application modification frequency, and application inactivity. Review this sample to see how the name/value pairs of Composite Application policy attributes are set.

createCompositeAppNode.xml

Imports the createCompositeAppNode.xml file and creates the Composite Application root policy. If your deployed portal does not have a main (root) policy for Composite Applications, you can create the main Composite Application policy type using this sample.

createRootMailNode.xml

Defines the policy for the Common Mail portlet. The policy definition specifies the values for the collection of attributes that includes the policy path in the content repository, the policy type (Mail), the policy node in the parent-child hierarchy that supports policy specialization, the policy editor, policy rules, policy settings, and policy version. The policy settings in this sample specify the choices available in the Mail policy editor for working with mail messages and attachments. Review this sample to see how the name/value pairs of Mail policy attributes are set.

createMailNode.xml

Imports the createMailNode.xml file and creates the Mail root policy. If your deployed portal does not have a main (root) policy for Mail, you can create the main Mail policy type using this sample.

createThemePolicyNode.xml

Defines Theme policies that can be applied to portal Web pages. If you export and examine this sample file, you will see that the policy list includes the policy sub-nodes for the predefined Theme policies for portal Web pages.

The policy sub-nodes for the predefined Theme policies for portal Web pages include the following:

  • Theme Node

  • Single Top Navigation Theme Policy

  • Single Top Navigation Minimal Theme Policy

  • Double Top Navigation Theme Policy

  • Double Top Navigation Minimal Theme Policy

  • Side Navigation Only Theme Policy

  • Side Navigation Only Minimal Theme Policy

  • No Theme Policy

  • Federation Theme Policy

  • Application Theme Policy

To understand the policy sub-nodes, compare the first policy definition, Theme Node, with the Double Top Navigation Theme Policy, to see how the name/value pairs of Theme policy attributes are set. Give particular attention to the Path attributes to understand how the policy path is specified relative to the nodes of the content repository tree. Review the complete sample in the exported file to see the additional Theme policy definitions for portal Web pages.

createWebPageNode.xml

Creates the Theme policy node for Web page theme policies. The Theme Policy Node does not appear in the Resource Policies portlet; it cannot be managed using the administration portlet or the policy editor. You work with Theme policies using the XML definition files.


Parent topic:

Manage portal resources with policies


Related concepts


Policy principles
Policy rules


Related tasks


Work with policies
Work with Mail policy definitions


Related reference


Policy settings for mail
Policy settings for composite applications
Mail policy attributes