Permissions:
To perform the tasks in this chapter, you need one of the following portal-level permissions:
Assets: Create, Edit, and Delete Assets
or Create Assets
and Edit Assets
(standard permissions)
Create, Edit, and Delete
or Create
and Edit
on the asset type with which you want to work (advanced permissions).
For example, users with the Create, Edit, and Delete Page Templates
permission can create, edit, and delete the page templates owned by a portal.
For more information about portal-level permissions, see About Roles and Permissions for a Portal.
Assets are the objects that define the structure, look and feel, and the content of your portals.
Assets can exist at the application level (shared assets) or at the portal level (portal assets). At both these levels, the assets available and their functionality are the same. The difference between shared assets and portal assets is that of scope:
Shared assets are available for use in all portals, unless a portal has been specifically excluded.
Portalassets are available for use only in the portal in which they are created.
If a shared asset is available for use in a portal, it is shown on the Assets page for that portal. The Shared icon next to the asset's name indicates that it is a shared asset. However, shared assets can be edited only at the application level on the Shared Assets page.
Figure 15-1 The Shared Icon
This chapter focuses on how to work with portal assets. For information about shared assets, see Working with Shared Assets.
By default, global default asset settings, such as the page template, skin, and resource catalogs, are used by all portals (indicated by [system default] in the portal-level settings). However, in a portal, you can choose to specify portal-specific asset settings. If your portal uses global default settings, any changes to a global setting are reflected in your portal too. For example, consider that the global default skin is the WebCenter Portal
skin, and you have two portals: PortalA
and PortalB
. By default, both your portals will use the WebCenter Portal
skin. Consider that you change PortalB
to use the Mist
skin. PortalA
still uses the global default WebCenter Portal
skin. If you then change the global default skin to the Dew
skin, PortalA
is automatically updated to use the Dew
skin; however PortalB
continues to use Mist
.
For information about configuring global default asset settings, see Configuring Global Defaults Across Portals in Oracle Fusion Middleware Administering Oracle WebCenter Portal.
For information about configuring portal-specific default asset settings, see Administering Look and Feel Settings for a Portal.
To access the assets for a portal, open the Assets page in the portal administration.
You can also enter the following URL in your browser to navigate directly to the Assets page:
http://
host:port
/webcenter/portal/
portalName
/admin
/assets
Figure 15-2 Portal Administration: Assets
Shared assets are indicated by the Shared icon. To work with shared assets, you must use the Shared Assets page.
You can create some assets from scratch, and there are some assets that you can create only by making a copy of an existing asset. For example, you can create a resource catalog from scratch, but you can create a skin only by making a copy of an existing skin. Further, there are some assets, such as Content Presenter display templates, that you cannot create on the Assets page at all.
The permissions provided through your assigned role determine the assets you can manage, and which options are available. Menu options appear greyed out if you do not have the required permissions for a particular asset.
The following table describes the support available for creating the different assets in WebCenter Portal.
The Assets page enables you to edit the assets that have been created within a portal. It provides two options for editing assets:
Edit—Provides a means of editing an asset either in Structure view in the page editor or in an Edit dialog.
Edit Source—Enables you to work with the source code of an asset.
You may want to edit an asset'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 Portal. You can even use the Edit Source option to create an asset from scratch; by creating the asset 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, and should only be done by experienced ADF developers.
You cannot edit built-in assets. If you want to modify a built-in asset, you must first create a copy of the asset and then edit the copy according to your requirements.
WebCenter Portal supports round-trip development of assets. To get enhanced functionality for your assets, you can download the asset, edit it in JDeveloper, and then upload it back into WebCenter Portal. For more information, see Working with Portal Assets in JDeveloper.
This section includes the following topics:
Depending on the asset being edited, clicking Edit alongside an asset on the Assets or Shared Assets page either opens the asset in the page editor or in an asset-specific Edit dialog. The following table provides information about editing an asset.
Table 15-1 Editing Assets Using the Edit Link
Asset | Edit Using | Documentation |
---|---|---|
Page Templates |
Page editor |
|
Resource Catalogs |
Edit dialog |
|
Skins |
Edit dialog |
|
Page Styles |
Page editor |
|
Content Presenter Display Templates |
Edit Source dialog |
|
Task Flow Styles |
Edit Source dialog |
|
Layouts |
Edit Source dialog |
|
Pagelets |
(Not applicable) |
Exporting and Importing Pagelet Producer Resources in Oracle Fusion Middleware Administering Oracle WebCenter Portal |
Task Flows |
Page editor (Design and Structure views) |
|
Data Visualizations |
(Not applicable) |
|
Visualization Templates |
(Not applicable) |
Developing Visualization Templates in Oracle Fusion Middleware Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper |
Data Controls |
Edit dialog |
|
Business Objects |
Edit dialog (Edit Business Object wizard) |
|
REST Data Sources |
Edit dialog (Edit REST Data Source wizard) |
|
SQL Data Sources |
Edit dialog (Edit SQL Data Source wizard) |
Use the Edit Source dialog to get more control over asset editing in WebCenter Portal. You can edit the underlying source code of any asset except data controls. Changes made to an asset are saved to the Oracle Metadata Services Repository (MDS Repository), and are made available immediately.
The content of the Edit Source dialog varies depending on the type of asset being edited. If there are multiple files associated with the asset, the dialog provides different tabs for editing the source code of each of these files.
You cannot edit the source code of built-in assets. If you want to modify the code of a built-in asset, you must first create a copy of the asset and then edit the copy according to your requirements.
Note:
Edit an asset's source files only when absolutely necessary. To ensure that you do not end up with an invalid asset that does not work properly, edit the source code very carefully.
To edit the source code of an asset:
In addition to creating and editing assets, there are other operations that you can perform on assets in the Assets page.
This section includes the following topics:
Each asset has an associated Show Properties dialog that summarizes useful information about it. You cannot edit the properties displayed in the Show Properties dialog of an asset.
To view information about an asset:
WebCenter Portal provides a way to preview certain assets, namely page templates, page styles, task flow styles, and task flows. This enables you to quickly get an idea of how the asset looks, without having to publish it and go through the process of using it within the portal. This means that you can make adjustments quickly, if required.
To preview an asset:
The system administrator can make shared assets available for use in all portals, or hide some assets so that they cannot be selected in a portal. At the portal level, you can make a custom asset available for use in a portal by marking it as available, or you can hide an asset to prevent users of your portal from selecting it. For example, you may want to hide an asset while you are making further refinements to it after its initial creation and publication.
Note:
Even if an asset is hidden, it can still be referred to by its internal ID through an EL expression. For example, you can refer to a hidden page template by using an EL expression to set the Page Template value on the Settings page in portal administration.
The following table shows several skins. The built-in shared skins are all available, the custom OraMosaic skin is available, and the custom Karen Skin is hidden.
When you first create or upload an asset, by default it is marked as hidden. A hidden asset is not available for wherever assets are selected. For an asset to become available, it must be published, that is, made available. For example, the figure shows the list of skins that are available for selection as the portal's default skin. Note that the hidden skin, Karen Skin, is not included in this list.
Figure 15-4 Hidden Asset Not Available for Selection to Assign
You can, however, use a hidden asset as the starting point for creating a new asset. For example, the figure shows that the hidden skin, Example Skin, is listed in the Copy From list when you create a new skin.
Figure 15-5 Hidden Asset Available for Selection to Copy
To show or hide an asset:
You can create copies of most assets, including the built-in assets. This is useful for when you want to:
Create a backup of an asset.
Update an asset while keeping the original in use.
Use a built-in asset as the starting point for creating a new asset. You cannot edit built-in assets, but you can create a copy to use as a starting point for further refinement.
When you create a copy of an asset, the copy is initially hidden regardless of the status of the original asset.
Note:
You cannot create copies of Content Presenter display templates.
To copy an asset:
Every asset has associated properties that define its display, availability, and attributes.
Use the Edit Properties dialog to view and edit the properties associated with assets:
General—This section displays details such as the asset's name, location, and internal ID. These properties are common across all asset types.
Attributes—This section lists the attributes associated with an asset. The attributes displayed in the Attributes section vary from asset to asset. For example, while a page template does not have any default attributes, skins have the following default attributes: skinFamily
, skinId
, and skinExtends
.
Note:
The Edit Properties dialog for shared assets also includes an Exclude Asset Usage section for specifying in which portals a shared asset is available.
To access the Edit Properties dialog for a portal asset:
Open the Assets page for the portal.
Click the type of asset that you want to edit (for example, Page Templates).
Select the asset that you want to edit.
In the toolbar, click Actions, and then choose Edit Properties.
In the Edit Properties dialog, edit the properties as desired.
Table 15-4 Asset Properties
Property | Description |
---|---|
Display Name |
The display name of the asset. |
Description |
The description of the asset. |
Icon URI |
The URI of the icon that is associated with the asset. Specify either an absolute URL, or a relative URL that points to an image located somewhere on the portal server. Currently, the only asset that can be associated with an icon is a page style. |
Category |
The category to which the asset belongs. For example, all page styles associated with Sales could belong to a Sales category. |
Asset Type |
The type of the asset. For example, |
Internal ID |
The unique internal identification number assigned to the asset. |
Content Directory |
The path where dependent objects of the asset, such as images, JavaScripts, style sheets, and HTML files, are stored on the portal server. |
JSPx File |
The path to the JSF ( |
Page Definition |
The path where the page definition XML file of the asset is stored on the portal server. Page definitions are used for page templates, page styles, task flow styles, and task flows. |
Metadata File |
The path where metadata files, if any, of the asset are stored on the portal server. |
Created By |
The name of the user who created the asset. |
Date Created |
The date and time when the asset was created. |
Modified By |
The name of the user who last edited the asset. |
Date Modified |
The date and time when the asset was last edited. |
Locked By |
The name of the user who most recently locked the asset. |
Date Locked |
The date and time when the asset was most recently locked. |
Exclude From Home Portal |
(Shared assets only) Whether the asset is available in the Home portal. |
Exclude From Portals |
(Shared assets only) A list of portals in which the asset is not available. |
Attributes |
Attributes associated with the asset. Asset attributes determine the behavior of an asset. For example, |
Click OK.
To maintain a well-organized set of assets, consider developing a standard naming scheme and method of description. This is not a required step, but it may be useful in identifying your intended purpose for a given asset.
To edit the name or description of an asset:
Open the Edit Properties dialog for the asset that you want to edit.
In the Edit Properties dialog, in the Display Name field, edit the name of the asset, if desired.
In the Description field, enter a description for the asset.
Click OK.
You can associate an icon with an asset. Currently, the only asset that can be associated with an icon is a page style.
To associate an icon with an asset:
Open the Edit Properties dialog for the asset that you want to edit.
In the Edit Properties dialog, in the Icon URI field, enter a standard URI path to the icon.
Tip:
You can specify either an absolute URL, or a relative URL that points to an image located somewhere on the portal server.
To store an image on the portal server, you must first upload the required file and then obtain the image's URL using Get Link.
Click OK.
You can classify assets into relevant groups. For example, all page styles associated with Sales could belong to a Sales category.
Note:
This value is available and exposed only in the Edit Properties dialog.
To categorize an asset:
Open the Edit Properties dialog for the asset that you want to edit.
In the Edit Properties dialog, in the Category field, enter a category name.
Click OK.
Asset attributes determine the behavior of an asset. For example, editPageAfterCreation
is a custom attribute of the page style asset and controls whether a newly created page of that style opens in Edit or View mode.
To set asset attributes:
Open the Edit Properties dialog for the asset that you want to edit.
In the Attributes section, edit or enter the Name field.
In the Value field, edit or enter the value for the attribute.
Click Add More if you want to add more attributes.
To remove an attribute associated with an asset, click the Remove icon displayed next to the attribute you want to remove.
Click OK.
You can define and manage access permissions for a specific asset. By default, asset access is controlled by application-level permissions. After you define asset-specific permissions, the permissions defined at the application or portal level no longer apply.
To set security for an asset:
Note:
You cannot download an asset from one portal, then upload that same asset to another portal. In other words, migrating assets from one portal to another is not supported. To use an asset across multiple portals, the asset must be created as a shared asset.
When you download an asset, its configuration is saved into an archive file. You can save the archive file either to your local file system or a remote server file system.
To download an asset:
Note:
Artifacts used or referenced by assets, such as icons and images, are not included in the archive when an asset is downloaded. You must manage and move dependent artifacts manually. We recommend that you use a folder structure on your content server specifically for asset artifacts so that content is easy to identify and move, if required.
If you are managing legacy assets that store artifacts in MDS, we recommend that you relocate dependent artifacts to your content server. However, if you do need to move artifacts stored in MDS, you can use the MDS WLST commands exportMetadata
and importMetadata
.
Note:
You cannot download an asset from one portal, then upload that same asset to another portal. In other words, migrating assets from one portal to another is not supported. To use an asset across multiple portals, the asset must be created as a shared asset.
When you upload an asset to WebCenter Portal:
Existing assets with the same internal ID are overwritten.
Portal assets are uploaded back only into their original portal. You cannot upload a portal asset into a different portal.
Assets must be in an archive file format on your local file system or a remote server.
To upload an asset:
When an asset is no longer required, you may want to remove it. You cannot delete built-in assets.
Note:
Before you delete an asset, you must ensure that the asset is not in use. With the exception of page layouts, if you mark an asset for deletion, it is deleted even if it is use. For page layouts, a message notifies you that the layout is in use and cannot be deleted.
To delete an asset:
You can access any asset anywhere in WebCenter Portal through Expression Language (EL) expressions.
For example, the following EL expression returns the first page template found with a display name of myPage
:
#{srmContext.resourceType['siteTemplate'].displayName['myPage'].singleResult}
You must set query parameters in the format .
property
['
value
']
, where property
is the name of the asset property, for example, id
, displayName
, or resourceScope
, and value
is the value of that property you want to search for.
If you need EL assistance, an application developer can provide an EL expression; see Expression Language Expressions in Oracle Fusion Middleware Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper.
WebCenter Portal provides a way to dynamically apply certain assets at runtime based on some criteria. For example, you can present content or shape the way content is presented by using personalization-related EL expressions to select and apply a page template based on whoever is the current user.
Consider an example where you want a top-navigation page template to be displayed to portal managers, and a side-navigation page template to be displayed to other users. You could use the following EL expression to specify the page template:
#{WCSecurityContext.userInScopedRole['Moderator'] ? 'gsr3396194a_3a72_44d6_90b4_57fd6efe4ff1' : 'gsr3396194a_3a72_44d6_90b4_57fd6efe4ff7'}
The EL expression uses the internal IDs of the page templates.
Instead of using the exact internal ID of the asset 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}
To dynamically apply an asset at runtime:
You may find that you want to develop portal assets beyond the capabilities of the browser-based interface offered by WebCenter Portal. In this case, Oracle recommends that developers use JDeveloper to develop more complex assets (such a page templates, skins, and page styles) for portals. When fully developed, the developer can publish the assets directly to WebCenter Portal (the portal server) or to a specific portal for immediate use or for testing. Alternatively, the developer can export an asset to a file and upload it to WebCenter Portal later.
For more information, see Working with WebCenter Portal Assets in Oracle Fusion Middleware Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper.