Skip Headers
Oracle® Fusion Middleware User's Guide for Oracle WebCenter Portal: Spaces
11g Release 1 (11.1.1.6.0)

Part Number E10149-11
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

10 Working with the Resources that Compose a Portal or Community

Out-of-the-box, Spaces provides a range of built-in resources that you can use to define and enrich your application and spaces. If these resources do not meet your specific requirements, you can create your own custom resources.

This chapter provides an introduction to Spaces resources and describes how you can create and manage them. It includes the following sections:

Note:

For detailed information about a particular resource, refer to the resource-specific chapter listed in Table 10-1.

10.1 What You Should Know About Resources

Though Spaces comes with an out-of-the-box application framework, it is a constantly evolving application. Users with appropriate privileges can continue to customize it by creating and applying various types of resources that define the structure, look and feel, and the content of the entire Spaces application or a particular space. Users can customize Spaces without redeploying resources or restarting the application.

This section provides an overview of the various resources and the permissions required to work with them, and describes how you can access resources. It includes the following subsections:

10.1.1 Introducing Resources

Spaces categorizes resources under the following categories: Structure, Look and Layout, and Mashups. Figure 10-4 shows the various types of resources available under each of these categories.

Figure 10-1 Resources Available in Spaces

Resources available in WebCenter Spaces
Description of "Figure 10-1 Resources Available in Spaces"

Table 10-1 describes the various types of resources, and provides links to the chapters where you can find more information about each resource.

Table 10-1 Resources Available in Spaces

Resource Description Documentation

Structure

Resources under this category help you define templates, navigation, and catalogs

 

Page Templates

Define how individual pages and groups of pages display on a user's screen.

See Chapter 12, "Working with Page Templates"

Navigations

Define how to link together information from multiple sources, such as spaces, pages, content repositories, and even external web pages.

See Chapter 11, "Working with Navigation"

Resource Catalogs

Define the components and connections that users can add to their pages, page templates, and task flows.

See Chapter 16, "Working with Resource Catalogs"

Look and Layout

Resources under this category help you define the appearance and layout

 

Skins

Define the appearance and look and feel, including colors and fonts, of a specific space or the entire application.

See Chapter 14, "Working with Skins"

Page Styles

Define the layout of a newly created page, and may also dictate the type of content the page supports.

See Chapter 15, "Working with Page Styles"

Content Presenter

Manage Content Presenter templates for presenting content.

See Chapter 40, "Publishing Content Using Content Presenter"

Mashup Styles

Manage the templates available for creating task flows.

See Section 26.3.4, "Managing Mashup Styles"

Mashups

Resources under this category help you define task flows and data controls

 

Data Controls

Create and manage data controls, which connect to and read data from external repositories, particularly for use in business mashups. Spaces does not provide any built-in data controls.

See Section 26.2, "Creating and Managing Data Controls"

Task Flows

Create and manage task flows based on a selected mashup style. Spaces does not provide any built-in task flows.

See Section 26.3, "Creating and Managing Task Flows"


10.1.2 Understanding Application-Level and Space-Level Resources

Out-of-the-box, Spaces provides various built-in resources at the application level and the space level (Home spaces or any other spaces). You cannot modify or download built-in resources.

To meet your business requirements, you can create custom resources at the application level or at the space level. At both these levels, the resources available and their functionality are the same. The difference between application- and space-level resources is that of scope:

  • Application-level resources are available for use to all spaces, unless a space has been specifically excluded.

  • Space-level resources are available for use only in the space in which they are created.

By default, application-level resource settings, such as the page template, skin, resource catalog, and navigation model, are applied to all spaces. However, in a space, you can choose to use the default application-level resource settings or specify your own resource settings. If your space uses application-level settings, any changes to an application-level setting are reflected in your space too. For example, consider that your application uses the Fusion FX skin, and there are two spaces in your application, SpaceA and SpaceB. By default, both your spaces will use the Fusion FX skin. Consider that you configure the application to use the skin named Dew, and SpaceB to use the Mist skin. Now, SpaceA, which is still using an application-level setting for its skin, is automatically updated to use the Dew skin; however SpaceB continues to use Mist.

When you create and publish a custom, application-level resource, it automatically becomes available to all spaces. However, an application-level resource can be edited only at the application level.

10.1.3 Permissions Required to Work with Resources

To create and manage resources, you require appropriate application-level and space-level permissions.

To create and manage application-level resources, you must be a Spaces administrator. Or, you must have either of the following permissions:

  • Application-Manage All (Figure 10-2)

  • Application-Manage Configuration and the permission to create, edit, and delete the required resource. For example, the Create, Edit, and Delete Page Styles permission for page styles (Figure 10-3).

Figure 10-2 Manage All Permission for Application

Manage All permission for the entire Spaces application
Description of "Figure 10-2 Manage All Permission for Application"

Figure 10-3 Permissions Required to Manage Resources at the Application Level

Permissions required to manage resources
Description of "Figure 10-3 Permissions Required to Manage Resources at the Application Level"

To create and manage a resource for a particular space, you must be granted the following permissions:

10.1.4 Accessing Resources

You use the Resources page to manage resources. This section describes how to access resources in your application and in a specific space. It includes the following subsections:

10.1.4.1 Accessing Application-Level Resources

To access the application-level Resources page:

  1. Log on to Spaces with administrative privileges.

  2. After you log on as the application administrator, you can access the Resources page in either of the following ways:

  3. In SpacesAdministration, click the Resources tab.

    The application-level Resources page opens, as shown in Figure 10-7.

    Figure 10-7 Application-Level Resources Page

    Resources page in Spaces Administration
    Description of "Figure 10-7 Application-Level Resources Page"

10.1.4.2 Accessing Space-Level Resources

To access the Resources page of a space:

  1. Log on to Spaces with space moderator privileges.

  2. You can access the space's Resources page in either of the following ways:

    • Use the following URL:

      http://host:port/webcenter/spaces/spaceName/admin/resources
      

      Where, host:port refer to the host name and the port number of the server where the Spaces application is deployed, and spaceName refers to the name of the space whose resources you want to access.

      See Also:

      For more information about the Spaces application's user interface URLs, see Appendix A, "Spaces User Interface URLs."

    • Use the Spaces navigation. For details, proceed to step 3.

  3. In your Home space, click Spaces.

    Tip:

    The way you access this page depends on the page template in use. For example, in a top navigation template, you may access it through a Spaces menu (Figure 10-8).

    See also Section 29.3.1, "Opening Spaces."

    Figure 10-8 Accessing a Space

    Accessing a Space
    Description of "Figure 10-8 Accessing a Space"

  4. On the Spaces page, select the required space.

  5. Display the space administration page.

    Tip:

    The way you access the space administration pages depends on the page template in use. For example, in a top navigation template, you may access space administration pages through a Manage menu (Figure 10-9).

    You can also navigate to these pages using the direct URL provided in Section A.4, "User Interface URLs for Space Pages."

    Figure 10-9 Manage Menu in a Top Navigation Template

    Manage Menu in a Top Navigation Template
    Description of "Figure 10-9 Manage Menu in a Top Navigation Template"

  6. Click the Resources tab.

    The Resources page for the selected space displays, as shown in Figure 10-10.

    Figure 10-10 Resources Page of a Space

    Resources page of a Space
    Description of "Figure 10-10 Resources Page of a Space"

10.1.5 Viewing Information About a Resource

Each resource has an associated About dialog that summarizes useful information about it. For information about the properties displayed in the About dialog, see Section 10.4.2.1, "What You Should Know About a Resource's Properties."

You cannot edit the properties displayed in the About dialog of a resource.

To access the About dialog of a resource:

  1. Navigate to the Resources page of the application or the desired space, as described in Section 10.1.4, "Accessing Resources."

  2. In the navigation panel on the left, select the resource type.

  3. From the list of resources displayed on the right, select the resource whose details you want to view.

  4. On the menu bar, click About.

    The About dialog displays, showing the properties related to the selected resource (Figure 10-11).

    Figure 10-11 About Dialog of a Resource

    About dialog of a resource
    Description of "Figure 10-11 About Dialog of a Resource"

10.2 Creating Resources

This section includes the following subsections:

10.2.1 What You Should Know About Resource Creation

In Spaces, you can create certain resources from scratch, and there are certain resources that you can create only by making a copy of an existing resource. For example, you can create a task flow from scratch, but you can create a skin only by making a copy of an existing skin. Further, there are certain resources, such as Content Presenter templates, that Spaces restricts you from creating.

Table 10-1 describes the support available for creating various resources in Spaces.

Table 10-2 Support for Creating Resources in Spaces

Resource Can You Create the Resource in Spaces? How can the Resource be Created?

Page Templates

Yes

Only by extending another page template

Navigations

Yes

From scratch or by extending another navigation resource

Resource Catalogs

Yes

From scratch or by extending another Resource Catalog

Skins

Yes

Only by making a copy of another skin

Page Styles

No

(Not applicable)

Content Presenter templates

No

(Not applicable)

Mashup styles

No

(Not applicable)

Data Controls

Yes

Only from scratch

Task flows

Yes

Only from scratch


10.2.2 Creating a Resource

To create a resource in Spaces:

Note:

The procedure for creating a data control is different than other resources. For information about how to create a data control, see Chapter 26, "Creating Business Mashups."

  1. Navigate to the Resources page of your application or the space in which you want to create a resource, as described in Section 10.1.4, "Accessing Resources."

  2. In the left navigation panel, select the desired type of resource.

  3. On the menu bar, click Create.

  4. In the Create dialog, in the Name field, enter the name of the resource.

    Figure 10-12 Creating a Resource

    Creating a Resource
    Description of "Figure 10-12 Creating a Resource"

  5. In the Description field, enter a description of the resource.

  6. From the Copy from list, select the existing resource that you want to extend for creating a new resource.

    Note:

    The Copy From list is available only for page template, navigation, Resource Catalog, and skin resources. It is not available for a data control or task flow resource.

    For a task flow resource, you need to select the page layout. For information, see Section 26.3.1, "Creating a Task Flow."

  7. Click Create.

    The newly created resource is listed on the Resources page. The gray icon next to a resource indicates that it is not yet published and hence not available to users for use. For information about publishing resources, see Section 10.4.3, "Showing and Hiding Resources."

10.3 Editing Resources

This section includes the following sections:

10.3.1 What You Should Know about Resource Editing

Spaces enables you to edit custom resources. It supports two types of resource editing:

  • Simple editing - provides a simple means of editing a resource's basic settings. Use the Edit dialog to perform simple editing.

  • Source editing - enables you to work with the source code of a resource. Use the Edit Source dialog to perform source editing.

    You may want to edit a resource's source file to make advanced edits to its code without having to download the file, edit it in JDeveloper, and upload it back into the Spaces application. You can even use the Edit Source option to create a resource from the beginning—by creating a resource and then replacing its default source code with your own original code. Note, however, that, due to the heavy hand-coding requirement, this scenario is not recommended.

You cannot edit built-in resources. If you want to modify a built-in resource, consider creating a copy of the resource and then editing the copy according to your preferences.

Oracle WebCenter Portal supports round-trip development of resources. To get enhanced functionality for your resources, you can download your resource, edit it in JDeveloper, and then upload it back into the Spaces application. For information, see Section 10.5, "Using JDeveloper to Build Resources for the Spaces Application."

10.3.2 Editing the Source Code of a Resource

Use the Edit Source dialog to get more control over resource editing at runtime. You can edit the underlying source code of any custom resource except data controls. Changes made to a resource are saved to the MDS, and are made available immediately.

To edit the source code of a resource:

  1. Navigate to the Resources page of your application or the desired space, as described in Section 10.1.4, "Accessing Resources."

  2. On the Resources page, from the navigation panel on the left, select the desired type of resource.

  3. From the list of resources displayed on the right, select the resource whose code you want to edit.

  4. From the Edit menu, choose Edit Source.

    The Edit Source dialog displays the resource definition.

  5. Edit the code as required.

    The XML syntax in the code is validated and an error message is displayed if you miss any tags or add them incorrectly. Validation is not performed for non-XML files, such as a CSS file.

    Figure 10-13 shows the sample source code of a skin's CSS file.

    Figure 10-13 Editing the Source Code of a Resource

    Editing the source of a resource
    Description of "Figure 10-13 Editing the Source Code of a Resource"

  6. Click OK.

10.3.3 Editing a Resource by Using the Edit Dialog

Use the Edit dialog to make simple changes to your resource. The properties displayed in the Edit dialog vary from resource to resource. For information about editing a resource, refer to the resource-specific chapter listed in Table 10-1.

10.4 Managing Resources

This section includes the following subsections:

10.4.1 Copying a Resource

Spaces enables you to create a copy of a resource. This feature is useful when you want to:

  • Create a backup of a resource.

  • Update a resource while keeping the original in use.

  • Use a built-in resource as a sample to build a new resource. Built-in resources cannot be edited, but you can create a copy of a resource to use it as a starting point for further refinement.

You can create a copy of all types of resources except Content Presenter templates. When you create a copy of a resource, the copy is marked as hidden.

To make a copy of a resource:

  1. Navigate to the Resources page of your application or the desired space, as described in Section 10.1.4, "Accessing Resources."

  2. In the left navigation panel, select the desired type of resource.

  3. From the list of resources displayed on the right, select the resource whose copy you want to create.

  4. From the Edit menu, choose Copy.

  5. In the Copy dialog, in the Display Name field, enter a name for the resource copy (Figure 10-14).

    Figure 10-14 Copying a Resource

    Copying a resource
    Description of "Figure 10-14 Copying a Resource"

  6. In the Description field, enter a description of the resource copy.

  7. Click OK.

10.4.2 Setting Properties on a Resource

Each resource has certain associated properties that define its display properties, availability, and attributes. This section describes how to access and modify these properties for custom resources. It includes the following sections:

10.4.2.1 What You Should Know About a Resource's Properties

Use the Edit Properties dialog to edit the properties associated with custom resources. The Edit Properties dialog contains these sections: General, Exclude Resource Usage, and Attributes.

General Section

The General section displays details such as the resource's name, location, and internal ID. These properties are common across all resources.

Table 10-3 describes the properties listed in the General section.

Table 10-3 Properties in the General Section of the Edit Properties Dialog

Property Description

Display Name

Specify the name of a resource.

Description

Enter the description of a resource.

Icon URI

Specify the URI of the icon that you want to associate with a resource.

Category

Specify the category, like Sales, that you want to associate with a resource.

Resource Type

Displays the type of the resource. For example, for a page style resource, the resource type is pageStyle.

Internal ID

Displays the unique internal identification number assigned to a resource in Spaces.

Content Directory

Displays the path where dependent objects of a resource, such as images, JavaScripts, stylesheets, and HTML files, are stored on the managed server where the Spaces application is deployed.

JSPx File

Displays the path to the .jspx file of a resource.

Page Definition

Displays the path where the page definition (.xml file) of a resource is stored on the Spaces server. Page definitions are used for page templates, task flows, page styles, and mashup styles.

Metadata File

Displays the path where metadata files, if any, of a resource are stored on the Spaces server.

Created By

Displays the name of the user who created a resource.

Date Created

Displays the date and time when a resource was created.

Modified By

Displays the name of the user who last modified the resource.

Date Modified

Displays the date and time when a resource was last modified.


Exclude Resource Usage Section

When an application-level resource is marked as available, it becomes available to all spaces and Home space. Spaces gives you the control to choose whether that resource is available in Home space and all spaces, or only in selected spaces. Use the controls in the Exclude Resource Usage section to prevent or promote the display of a selected custom resource (Figure 10-15).

You can set availability of custom resources only at the application level. The Exclude Resource Usage section is not available in Home space and spaces.

Figure 10-15 Setting Availability of a Resource in Other Spaces

Setting availability of a resource in other Spaces
Description of "Figure 10-15 Setting Availability of a Resource in Other Spaces"

Attributes Section

The Attributes section (Figure 10-16) lists the attributes associated with a resource. The attributes displayed in the Attributes section vary from resource to resource. For example, while a page template does not have any default attributes, skins have the following default attributes: skinFamily, skinId, and skinExtends.

Figure 10-16 Attributes of a Resource

Custom attributes of a resource
Description of "Figure 10-16 Attributes of a Resource"

Attributes determine the behavior of a resource. For example, editPageAfterCreation is a custom attribute of the page style resource and controls whether a newly created page opens in edit or view mode. It takes a value of true or false. When you associate this attribute with a particular page style, every time a user creates a page based on the selected style, the attribute value is considered and the page behaves accordingly.

You can add, edit, or delete attributes as described in Section 10.4.2.6, "Working with the Attributes of a Resource." For information about resource-specific attributes, if any, refer to the relevant chapter listed in Table 10-1.

10.4.2.2 Accessing the Edit Properties Dialog of a Resource

To access the Edit Properties dialog of a resource:

  1. Navigate to the Resources page of your application or the desired space, as described in Section 10.1.4, "Accessing Resources."

  2. From the left navigation panel, select the type of resource you want to edit.

  3. From the list displayed on the right, select the relevant resource, and from the Edit menu, choose Edit Properties.

    The Edit Properties dialog opens (Figure 10-17).

    Figure 10-17 Edit Properties Dialog of a Resource

    Edit Properties dialog of a resource
    Description of "Figure 10-17 Edit Properties Dialog of a Resource"

10.4.2.3 Renaming, Describing, and Categorizing a Resource

Resources, whether built-in or custom, are sorted on the Resource page according to their display names. To maintain a well-organized set of resources, consider developing a standard naming scheme and method of description. This is not a required step, but it may be useful in identifying and clarifying your intended purpose for a given resource.

You can classify your resources into relevant groups. For example, all page styles associated with Sales could have a sales category. This value is available and exposed only in the Edit Properties dialog.

To provide a name, description, and category for a resource:

  1. Open the Edit Properties dialog for the desired resource as described in Section 10.4.2.2, "Accessing the Edit Properties Dialog of a Resource."

  2. In the Display Name field, edit the display name for the resource, if required.

  3. Optionally, in the Description field, enter a description of the resource.

  4. Optionally, in the Category field, enter a category name.

  5. Click OK to save your changes and exit the dialog.

10.4.2.4 Associating an Icon with a Resource

You can associate an icon with a resource. In the current version of Spaces, the associated icon is visible only for page styles when you create a page using the Create dialog.

To associate an icon with a resource:

  1. Open the Edit Properties dialog for the desired resource as described in Section 10.4.2.2, "Accessing the Edit Properties Dialog of a Resource."

  2. In the Icon URI field, enter a standard URI path to the icon.

    Note:

    You can either specify an absolute URL (where the URL should also work if entered in a browser address field), or a relative URL that points to an image located somewhere in Spaces. To store an image in Spaces, you must upload the required file using the Documents service, as described in Section 41.8.1, "Uploading Files." You can then obtain the image's URL by copying the Download URL value as described in Section 41.26.1, "Retrieving the URL for a Folder or File."

  3. Click OK to save your changes and exit the dialog.

10.4.2.5 Setting the Availability of an Application-Level Resource in Other Spaces

Use the Exclude Resource Usage section of the Edit Properties section to set the availability of an application-level resource in a Home space or a space. The Exclude Resource Usage section is available only at the application level, and not in Home space or other spaces.

To set the availability of an application-level resource in Home space and other spaces:

  1. Open the Edit Properties dialog for the desired resource as described in Section 10.4.2.2, "Accessing the Edit Properties Dialog of a Resource."

  2. Under Exclude Resource Usage:

    • For the Exclude From Home Space checkbox:

      • Select to hide the resource on the Resources page of Home spaces

      • Clear to show the resource on the Resources page of Home spaces

    • For Exclude From Space(s), choose:

      • Include in All Spaces - to make the resource available on the Resources page of all spaces

      • Exclude from All Spaces - to exclude the resource from being listed on the Resources page of all spaces

      • Exclude from Selected Spaces - to specify the spaces on whose Resources page the resource will not be listed

        When you select this option, an Add/Choose link appears (Figure 10-18).

        Figure 10-18 Exclude Resource Usage Section

        Exclude Resource Usage section
        Description of "Figure 10-18 Exclude Resource Usage Section"

        Clicking this link displays the Add Space dialog. Select the spaces from which to exclude the resource and click OK (Figure 10-19).

        A list of the selected spaces is displayed in the Edit Properties dialog.

        Figure 10-19 Excluding a Resource from Selected Spaces

        Excluding a resource from selected spaces
        Description of "Figure 10-19 Excluding a Resource from Selected Spaces"

  3. Click OK to save your changes and exit the Edit Properties dialog.

10.4.2.6 Working with the Attributes of a Resource

This section describes how to associate a custom attribute with a resource and how to remove a custom attribute. It contains the following sections:

10.4.2.6.1 Associating an Attribute with a Resource

To associate an attribute with a resource:

  1. Follow the steps outlined in Section 10.4.2.2, "Accessing the Edit Properties Dialog of a Resource."

  2. In the Attributes section, in the Name field, enter the attribute name (Figure 10-20).

    Figure 10-20 Adding an Attribute

    Adding an Attribute
    Description of "Figure 10-20 Adding an Attribute"

    For information about the attributes, if any, that can be associated with a resource, refer to the resource-specific chapter listed in Table 10-1.

  3. In the Value field, enter the value of the attribute.

  4. Click Add More if you want to add more attributes.

    This adds a new row. You can then enter the required details in the Name and Value fields.

  5. Click OK to save your changes and exit the dialog.

10.4.2.6.2 Deleting an Attribute of a Resource

To remove an attribute associated with a resource:

  1. Follow the steps outlined in Section 10.4.2.2, "Accessing the Edit Properties Dialog of a Resource."

  2. In the Attributes section, click the Remove icon displayed next to the attribute you want to delete.

  3. Click OK to save your changes and exit the dialog.

10.4.3 Showing and Hiding Resources

This section includes the following subsections:

10.4.3.1 What You Should Know About Showing and Hiding Resources

All resources, whether built-in or custom, can be marked as hidden or available. For all resources that are available for use, a green tick mark and the word "Available" appear next to the resource's name on the Resources page. A gray icon and the word "Hidden" next to a resource's name indicates that the resource is marked as hidden, as shown in Figure 10-21.

Figure 10-21 Showing or Hiding a Resource

Showing or hiding a resource
Description of "Figure 10-21 Showing or Hiding a Resource"

When you create or upload a resource, by default the resource is marked as hidden. A hidden application-level resource is not available for selection in the resource picker in the application, spaces, or Home space. Similarly, a hidden space-level resource is not listed in the resource picker in that space. For a resource to become available in the resource picker, it must be published.

You can use a hidden resource for creating a new resource. For example, Figure 10-22 shows that the page template MySpaceTemplate is marked as hidden. But it is listed in the Copy from list when you create a new page template. Figure 10-23 shows the list of all page templates that are available for use. Note that MyTemplate is not listed there.

Figure 10-22 A Hidden Resource Available for Creating a New Resource

A Hidden Resource Available for Creating a New Resource
Description of "Figure 10-22 A Hidden Resource Available for Creating a New Resource"

Figure 10-23 A Hidden Resource Not Listed in the Resource Picker

A Hidden Resource Not Listed in the Resource Picker
Description of "Figure 10-23 A Hidden Resource Not Listed in the Resource Picker"

10.4.3.2 Showing a Resource

To mark a hidden resource as available:

  1. Navigate to the Resources page of the application or the desired space, as described in Section 10.1.4, "Accessing Resources."

  2. From the left navigation panel, select the desired type of resource.

  3. From the list of resources displayed on the right, select the resource that you want to mark as available.

  4. From the Edit menu, choose Show.

    A green checkmark and the word "Available" appear next to the resource's name, indicating that the resource is available for use.

10.4.3.3 Hiding a Resource

To hide a resource:

  1. Navigate to the Resources page of the application or the desired space, as described in Section 10.1.4, "Accessing Resources."

  2. In the left navigation panel, select the desired type of resource.

  3. From the list of resources displayed on the right, select the resource that you want to hide.

  4. From the Edit menu, choose Hide.

    A gray icon and the word "Hidden" appear next to the resource's name, indicating that the resource is now hidden and is not available to users.

10.4.4 Setting Security for a Resource

You can control whether all users or only specific users or groups can access the custom resources that you created in the application. By default, resource access is controlled by application-level permissions (see Section 10.1.3, "Permissions Required to Work with Resources"). After you define resource-specific permissions, the permissions defined at the application or space level no longer apply.

To set access permissions for a resource:

  1. Navigate to the Resources page of your application or the desired space, as described in Section 10.1.4, "Accessing Resources."

  2. In the left navigation panel, select the desired type of resource.

  3. From the list of resources displayed on the right, select the resource for which you want to set access permissions.

  4. From the Edit menu, choose Security Settings.

  5. In the Security Settings dialog, specify an access method by selecting either of the following (Figure 10-24):

    • Use Custom Permissions - Select this option to define who can manage and update the selected resource. When you select this option, the other controls in the dialog become available. Proceed to step 6.

      Note:

      When you choose Use Custom Permissions, ensure that at least one user or group is granted the Manage access.

    • Use Spaces Security Settings - Select this option to inherit the selected resource's access settings from those defined for the application. After selecting this option, click OK to save your changes and exit the dialog.

      Note:

      Selecting Use Spaces Security Settings removes any custom permissions that you may have set.

    Figure 10-24 Setting Security for a Resource

    Setting security for a resource
    Description of "Figure 10-24 Setting Security for a Resource"

  6. If you selected, Use Custom Permissions, specify the user or group to whom you want to grant resource access. In the Security Settings dialog:

    • Click Add Users to open a dialog that you can use to search for and select individual users available in your identity store.

    • Click Add Groups to open a dialog that you can use to search for and select groups of users available in your identity store.

    For tips on searching for a user or group in the identity store, see Section 52.3.4.1, "Searching for a User or Group in the Identity Store."

  7. For each user or user group listed in the Role or User column, specify the level of access you want to grant:

    • Select the Manage checkbox to grant full access on the resource. Such users can perform tasks such as edit, delete, grant access, show or hide, and the like.

    • Select the Update checkbox to grant the permission to edit the resource. Such users can edit the resource, but they cannot delete it.

    Note:

    Since resources have their own separate security, page-level permissions do not apply to resources. For example, if a user has the Personalize Page permission on a page that contains a task flow with movable boxes, the minimize icons on movable boxes do not show unless the user has the Update or Manage permission on the task flow.

    For information about page-level permissions, see Chapter 23, "Securing Pages and Components."

  8. If you want to revoke permissions from any user or user group, select that entity and click Delete Access.

  9. Click OK.

10.4.5 Deleting a Resource

When a resource is no longer required, you may want to remove it. In Spaces, you can delete custom resources, but not built-in resources.

Note:

Before you use delete a resource, you must ensure that the resource is not in use. If you mark a resource for deletion, it will be deleted even if it is in use.

To delete a custom resource:

  1. Navigate to the Resources page of your application or the desired space, as described in Section 10.1.4, "Accessing Resources."

  2. In the left navigation panel, select the desired resource type.

  3. From the list of resources displayed on the right, select the resource you want to delete.

  4. From the Edit menu, choose Delete.

  5. In the Delete confirmation dialog, click Delete to delete the resource.

10.4.6 Previewing a Resource

Spaces provides a means of previewing certain resources—page templates, mashup styles, and task flows. You can use the Preview option to preview a resource and make adjustments, if required.

To preview a resource:

  1. Navigate to the Resources page of your application or the desired space, as described in Section 10.1.4, "Accessing Resources."

  2. From the left navigation panel, select the desired resource type.

  3. From the list of resources on the right, select the resource you want to preview.

  4. Click Preview.

    Note:

    The Preview option is not available for all resources. For information about a particular resource, refer to the resource-specific chapter listed in Table 10-1.

10.4.7 Querying for a Resource Through the Expression Builder

You can access any resource anywhere in Spaces through Expression Language (EL) expressions.

For example, the following EL expression returns the first template resource found with a display name myPage:

#{srmContext.resourceType['siteTemplate'].displayName['myPage'].singleResult}

You must set query parameters in the format .property['value'], where property is the name of the resource property, for example, it can be id or resourceScope, and value is the value of that property you want to search for.

For information about EL expressions that you can use to query resources, see Section B.4.5, "EL Expressions Relevant to Resources."

10.4.8 Applying Resources Dynamically Using EL Expressions

Spaces provides a way to dynamically apply certain resources at runtime based on some criteria. For example, you can present content or shape the way content is presented by using Personalization-related ELs to select and apply a page template based on whoever is the current user.

Consider an example where you want the top-navigation page template to be displayed to space moderators, and a side-navigation page template to be displayed to other users. Figure 10-25 shows a sample EL expression that you can use in such scenario. The EL expression uses the resource IDs of the page templates.

Figure 10-25 Specifying an EL Expression for Applying a Page Template Based on User Role

Specifying the Expression Builder statement
Description of "Figure 10-25 Specifying an EL Expression for Applying a Page Template Based on User Role"

Instead of using the exact resource ID of the resource that you want to apply, you can also include queries in an EL expression as shown in the following example.

#{WCSecurityContext.userInScopedRole['Moderator'] ?  srmContext.resourceScope['space_name'].resourceType['siteTemplate'].displayName['Top'].singleResult.id :
 srmContext.resourceScope['space_name'].resourceType['siteTemplate'].displayName['Side'].singleResult.id}

Figure 10-26 shows how a space may appear to a space Moderator, and Figure 10-27 shows how the space may appear to other users.

Figure 10-26 A Page Template Dynamically Applied for Space Moderators

A Page Template Dynamically Applied for Space Moderators
Description of "Figure 10-26 A Page Template Dynamically Applied for Space Moderators"

Figure 10-27 A Page Template Dynamically Applied for Other Users

A Page Template Dynamically Applied for Other Users
Description of "Figure 10-27 A Page Template Dynamically Applied for Other Users"

You can also use EL expressions to execute personalization server scenarios, as described in Appendix B, "EL Expressions Relevant to the Personalization Conductor." For information about common EL expressions that you can use, see Appendix B, "Expression Language Expressions."

To dynamically apply a resource at runtime:

  1. Note down the Internal ID of the required resource from its About dialog. For information about how to access this dialog, see Section 10.1.5, "Viewing Information About a Resource."

  2. Access the Spaces Administration page as described in Section 4.1, "Accessing the Spaces Administration Page," and open the General sub page of the Configuration page. Or, access a specific space's administration page as described in Section 51.3, "Accessing Space Administration Pages," and open the General page.

    Tip:

    You can use "pretty URLs" to navigate to the settings page:

    • Application-level Configuration page:

      http://host:port/webcenter/spaces/admin/general
      
    • Space-level General page:

      http://host:port/webcenter/spaces/spaceName/admin/general
      
  3. Click the icon next to the desired resource field, then click Expression Builder to open the editor.

    Figure 10-28 Using the Expression Builder for a Resource

    Using the Expression Builder for a Resource
    Description of "Figure 10-28 Using the Expression Builder for a Resource"

  4. Select the Type a value or expression radio button, if not already selected.

  5. Type the required expression builder statement.

    Figure 10-29 Expression Editor Dialog

    Specifying the Expression Builder statement
    Description of "Figure 10-29 Expression Editor Dialog"

    For example, if you want to display different page templates depending on whether the page is rendered in a browser on a Windows platform or on a mobile device, you can use the following EL expression:

    #{requestContext.agent.platformName=='windows' ? 'gsr3396194a_3a72_44d6_90b4_57fd6efe4ff7' : 'gsr1472d17b_8f10_4689_89fb_7431f561567f'}

    This EL expression is an 'if-then-else' statement. The EL requestContext.agent.platformName retrieves the platform information. The page template IDs are the ones noted down from the About dialog.

  6. Click Apply.

10.5 Using JDeveloper to Build Resources for the Spaces Application

This section includes the following subsections:

10.5.1 What You Should Know About Building Resources in JDeveloper

You may find yourself in a situation where you want to edit or create resources beyond the capabilities of Spaces. Oracle WebCenter Portal provides features for round-trip development of Spaces resources. To further enhance your existing resources, you can download them from Spaces, edit them at a really fine level of granularity in an IDE like JDeveloper, and then upload the updated resources back into the Spaces application. You can upload resources directly to Spaces from within JDeveloper or through Spaces itself.

In JDeveloper, you can also create resources from scratch for the purpose of using them in Spaces. However, you do not necessarily need to start from scratch. An efficient way is to make a copy of an existing Spaces resource and refine it further in JDeveloper without worrying about the prerequisites involved in creating it from scratch in JDeveloper. Oracle WebCenter Portal provides a special JDeveloper workspace (DesignWebCenterSpaces.jws) to help you develop and upload resources to Spaces. For more information about editing custom resources and uploading them into Spaces through JDeveloper, see "Developing Resources for the Spaces Application" in Oracle Fusion Middleware Developer's Guide for Oracle WebCenter Portal.

When you download a resource, its configuration is saved into an export archive (.ear file). You can save the export archive either to your local file system or a remote server file system.

When you upload resources to Spaces:

  • Existing resources, that is, resources with the same internal ID, are overwritten.

  • Space-level resources are uploaded back only into their original space. You cannot upload a space-level resource into a different space.

  • Resources must be in an export archive (.ear) format on your local file system or a remote server

10.5.2 Downloading a Resource

To download a resource:

  1. Navigate to the Resources page of your application or the desired space, as described in Section 10.1.4, "Accessing Resources."

  2. In the left navigation panel, select the desired resource type.

  3. From the list of resources displayed on the right, select the resource you want to download as an EAR file.

  4. Click Download.

  5. In the Download dialog, in the Archive File Name field, enter the name of the export archive file.

  6. In the Download dialog, specify where you want to save the export archive file. Use either of the following options (Figure 10-30):

    • Save to my computer - Click this if you want to save the export archive file to your local file system. Then, specify the path where you want to save the file.

    • Save to WebCenter Portal Server - Click this to save the export archive file to a remote server file system. In the Path field, enter the server path.

      Figure 10-30 Download Dialog

      Download Dialog
      Description of "Figure 10-30 Download Dialog"

  7. If the resource that you are downloading includes custom content, such as images, javascripts, stylesheets, and HTML files, you must specify whether or not you want to include such resource-specific content in the archive. To include the custom content, select the Export Content directory checkbox.

    The Spaces application stores content for all portal resources under a 'shared' directory (oracle/webcenter/siteresources/scopedMD/shared/...) rather than on a space-by-space basis. You can find out the content directory location by selecting the required resource on the Resources page, and clicking About. The location is displayed in the Content Directory field.

    Consider the following before exporting content directories for a resource in your archive:

    • Entire content directories are exported rather than individual files. For example, if a skin references two files (.../shared/skins/logos/mylogo.gif and .../shared/skins/icons/myicon.gif), the entire content of both directories (/logos and /icons) are exported.

    • If your Spaces installation utilizes a large number of portal resources (both at the application-level as well as by individual spaces and space templates), then the number of files stored under the /shared directory or its subdirectory is potentially large.

    • On upload, all files under content directories are uploaded to the target application and existing files with the same name are overwritten. While you can opt not to upload content directories on import, it is an all or nothing approach, that is, you cannot upload content specific to a particular resource or space.

  8. Click Download.

Note:

Spaces administrators can download resources using the WLST command, exportWebCenterResource. For information, see "exportWebCenterResource" in Oracle Fusion Middleware WebLogic Scripting Tool Command Reference.

10.5.3 Uploading a Resource

To upload a resource in Spaces:

  1. Navigate to the Resources page of your application or the desired space, as described in Section 10.1.4, "Accessing Resources."

  2. In the left navigation panel, select the desired resource type.

  3. Click Upload.

  4. In the Upload dialog, specify the location of the resource archive file. Depending on the location of your EAR file, select either of the following (Figure 10-31):

    • Look on my computer: Select if the archive is located on your local file system. Enter the path to the EAR file or use the Browse button.

    • Look on WebCenter Portal Server: Select if the archive is located on a remote server. Enter the path to the EAR file.

      Figure 10-31 Upload Dialog

      Upload Dialog
      Description of "Figure 10-31 Upload Dialog"

  5. Click Upload.

  6. Click Yes in the Confirm Replace Resource dialog.

  7. If the resource that you are uploading contains custom content, such as images and stylesheets, the Overwrite Content Directory dialog displays. (Figure 10-32)

  8. Click OK.

Note:

Spaces administrators can upload resources using the WLST command, importWebCenterResource. For information, see "importWebCenterResource" in Oracle Fusion Middleware WebLogic Scripting Tool Command Reference.