10 Working with the Resources that Compose a Portal or Community

Out-of-the-box, WebCenter 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 WebCenter 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 WebCenter 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 WebCenter 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

WebCenter 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 WebCenter Spaces

Resources available in WebCenter Spaces
Description of "Figure 10-1 Resources Available in WebCenter 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 WebCenter 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. WebCenter 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. WebCenter 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, WebCenter 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 WebCenter 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 WebCenter 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 WebCenter Spaces Administration, 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 WebCenter Spaces with Space moderator privileges.

  2. You can access the 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 WebCenter Spaces is deployed.

      See Also:

      For more information about WebCenter Spaces user interface URLs, see Appendix A, "WebCenter 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.3, "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 WebCenter 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 WebCenter Spaces restricts you from creating.

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

Table 10-2 Support for Creating Resources in WebCenter Spaces

Resource Can You Create the Resource in WebCenter 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 WebCenter 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

WebCenter Spaces enables you to edit custom resources. WebCenter Spaces 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 WebCenter Spaces. 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 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 Spaces. For information, see Section 10.5, "Using JDeveloper to Build WebCenter Spaces Resources."

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

WebCenter 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-1 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 WebCenter Spaces.

Content Directory

Displays the path where dependent objects of a resource, such as images, are stored on the managed server to which WebCenter Spaces 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 WebCenter 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 WebCenter 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 a Home Space. WebCenter Spaces gives you the control to choose whether that resource is available in a 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 a 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 WebCenter 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 WebCenter 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 New Files." You can then obtain the image's URL by copying the Download URL value as described in Section 41.24.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 a Home Space or any other Spaces.

To set the availability of an application-level resource in Home Spaces 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 Spaces. 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. Enter the characters from the name of your search target. For example, the search term 'do' finds all user names starting with 'do' such as 'don' and 'doug'. If you wish to search for a user name like 'condoleeza', then use '*' in the beginning, like '*do'.

      Select the required user(s), and click OK to close the dialog.

    • Click Add Groups to open a dialog that you can use to search for and select groups of users available in your identity store. Select the required group(s), and click OK to close the dialog.

  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.

  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 WebCenter 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, WebCenter Spaces will delete it 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

WebCenter 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 WebCenter 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.3.5, "EL Expressions Relevant to Resources."

10.4.8 Applying Resources Dynamically Using EL Expressions

WebCenter 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 WebCenter Spaces Administration page as described in Section 4.1, "Accessing the WebCenter Administration Page," and open the General sub page of the Configuration page. Or, access the Space 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 WebCenter Spaces Resources

This section includes the following subsections:

10.5.1 What You Should Know About Building Spaces Resources in JDeveloper

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

In JDeveloper, you can also create resources from scratch for the purpose of using them in WebCenter 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 provides a special JDeveloper workspace (DesignWebCenterSpaces.jws) to help you develop and upload resources to WebCenter Spaces. For more information about editing custom resources and uploading them into WebCenter Spaces through JDeveloper, see "Designing WebCenter Spaces Resources in JDeveloper" in Oracle Fusion Middleware Developer's Guide for Oracle WebCenter.

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 WebCenter 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 Name field, enter the name of the export archive file.

  6. Click Download.

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

    • Download - 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 Server - Click this to save the export archive file to a remote server file system. In the Server Location dialog, in the Save to Location field, enter the server path and then click Save.

      Figure 10-30 Download Dialog

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

Note:

Space administrators can download resources using the WLST command, exportResources. For information, see section "Exporting WebCenter Resources Using WLST" in Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.

10.5.3 Uploading a Resource

To upload a resource in WebCenter 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):

    • On Local File System: Select if the archive is located on your local file system. Enter the path to the EAR file or use the Browse button.

    • On 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.

Note:

Space administrators can upload resources using the WLST command, importResources. For information, see section "Importing WebCenter Resources Using WLST" in Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.