55 Working with Global Attributes Across Portals

This chapter describes how a system administrator can manage global attributes, which can be used by any portal in WebCenter Portal.

This chapter includes the following topics:

Permissions:

To perform the tasks in this chapter, you must have the WebCenter Portal Administrator role or a custom role that grants at least the following permission:
  • Portal Server-Manage Configuration

For more information about permissions, see Section 49.3, "About Application Roles and Permissions."

55.1 About Global Attributes

Every portal includes built-in attributes such as name, description, date created, icon, and so on. In addition to these built-in attributes, portal moderators can add custom attributes that are unique to the portal and its characteristics to specify additional portal information (metadata). Custom attributes are propagated throughout a portal. For information about working with attributes unique to a specific portal, see the "Administering Attributes in a Portal" chapter in Building Portals with Oracle WebCenter Portal.

In addition to portal-specific attributes, system administrators can add and manage global attributes from the Attributes page (Figure 55-1) in Portal Builder administration. Global attributes are available for use by any portal.

Figure 55-1 Portal Builder Administration: Attributes

Description of Figure 55-1 follows
Description of ''Figure 55-1 Portal Builder Administration: Attributes''

A custom attribute is simply a name value pair (such as customerId=400, orderId=11, or userName=Smith). A custom attribute name is unique within a particular portal. For example, you can use a global attribute in a portal for customer analysis purposes with several custom task flows that take the parameter customerId as an input: task flows such as Customer Sales History, Customer Satisfaction Rating, Future Sales Prospects, or Customer Contact Information. With a custom attribute defined named customerId with an appropriate value, all the task flows that can accept a customerId can display information specific to that customer.

A custom attribute can also be retrieved using Expression Language (EL) expressions. For example, an EL expression may read a value that is passed in through the URL that displays a portal (for example, customerid=10). Any portal pages, task flows, or portlets that deliver customized content based on parameter values can accept global custom attribute values and display content accordingly using the following Expression Language (EL) syntax to access the global custom attribute value:

#{WCAppContext.application.applicationConfig.customAttributes[attributeName]

If you need EL assistance, an application developer can provide an EL expression; see the "Expression Language Expressions" appendix in Developing Portals with Oracle WebCenter Portal and Oracle JDeveloper.

55.2 Adding a Global Attribute

To add a new global attribute for use by any portal:

  1. On the Administration page (see Section 47.2, "Accessing the Portal Builder Administration Page"), click Attributes.

    You can also enter the following URL in your browser to navigate directly to the Attributes page:

    http://host:port/webcenter/portal/builder/attributes
    
  2. Click Add Attribute (Figure 55-2).

    Figure 55-2 WebCenter Portal Administration - Add Attribute

    Description of Figure 55-2 follows
    Description of ''Figure 55-2 WebCenter Portal Administration - Add Attribute''

    The Add Attribute dialog opens (Figure 55-3).

    Figure 55-3 Entering Custom Attribute Name and Value

    Description of Figure 55-3 follows
    Description of ''Figure 55-3 Entering Custom Attribute Name and Value''

  3. Enter a unique Name for the attribute. Valid names start with an alphabetic character and contain only alphanumeric characters

  4. Optionally, enter a Value for the custom attribute. The value you type is treated as a string value.

  5. Click Add to save the custom attribute and display it in the list on the Attributes page.

55.3 Editing a Global Attribute

To edit a global attribute:

  1. On the Administration page (see Section 47.2, "Accessing the Portal Builder Administration Page"), click Attributes.

    You can also enter the following URL in your browser to navigate directly to the Attributes page:

    http://host:port/webcenter/portal/builder/attributes
    
  2. Click the Actions icon for the attribute and select Edit Attribute.

  3. In the Edit Attribute dialog, modify the attribute Value. The value you type is treated as a string value.

  4. Click OK to save your changes.

55.4 Deleting a Global Attribute

To delete a global attribute:

  1. On the Administration page (see Section 47.2, "Accessing the Portal Builder Administration Page"), click Attributes.

    You can also enter the following URL in your browser to navigate directly to the Attributes page:

    http://host:port/webcenter/portal/builder/attributes
    
  2. Click the Actions icon for the attribute and select Delete Attribute.

  3. In the confirmation dialog, click Delete.