28 Deploying Portals, Templates, Assets, and Extensions

WebCenter Portal provides a set of utilities that enable administrators to deploy, back up, or move information between WebCenter Portal instances and stage or production environments.

Note: Oracle WebCenter Portal has deprecated the support for Jive features (announcements and discussions/discussion forums). Hence, Jive features are not available in 14.1.2 instances.

Permissions: The content of this chapter is intended for system administrators.

For more information on which roles and permissions are required to deploy portals, templates, assets, connections, and extensions, see Permissions Required to Perform WebCenter Portal Lifecycle Operations.

See also Understanding Administrative Operations, Roles, and Tools.

Topics:

Parent topic: Administering WebCenter Portal Lifecycle

Deploying Portals

This section includes the following topics:

About Portal Deployment

When you deploy a portal to another portal server, you make a copy of the source portal on the target server and you can choose to include all or some of the source portal’s data.

After initial deployment of a portal, you can choose to redeploy the portal or propagate only portal changes to the target. When you redeploy a portal, it is simply deleted and re-created as a new portal. In portal propagation, only the incremental changes made to a portal on the source are pushed to the target server.

You can deploy a portal in the following ways:

Information Always Deployed with a Portal

When a portal is deployed, the following details are always included:

Information that can be Optionally Deployed with a Portal

When deploying a portal, you can optionally choose to include the following as part of portal deployment:

Information Not Included During Portal Deployment

Some portal information is stored externally and cannot be deployed at the same time as the portal, for example:

Note: Connections are exported and imported separately. For more information, see Understanding Connection Property Files.

Figure 28-1 illustrates the different ways in which you can move a portal (and its associated data) to another server.

Figure 28-1 Deploying Portals to a Target Server

If your source and target WebCenter Portal installations are connected to different external servers and information associated with the source portal is required on the target, the external portal data must be moved separately.

In some situations the source and target both use the same external server, for example, a portlet producer server or Oracle Internet Directory server might be shared across both environments.

Note: While exporting or deploying a portal if the server goes down and fails over to another server in the cluster, the operation will fail. You need to refresh the page and perform the export or deployment operation again.

If you want to deploy a portal larger than 50 MB, ensure that you modify the maximum file upload size on the target server as per your requirements. For information, see Modifying the File Upload Size in Content Manager.

For information about troubleshooting portal deployment issues, see Troubleshooting WebCenter Portal.

Directly Deploying Portals Using WebCenter Portal

Using WebCenter Portal administration, you first create a connection to the target server and then directly deploy your portals to the target server. After a portal is deployed, you can view its deployment status and deployment history.

This section includes the following topics:

Creating a Portal Server Connection

Before you can deploy a portal, you need to set up a connection to the target portal server.

To create a portal server connection:

  1. Log on to WebCenter Portal, and navigate to portal administration.

  2. Click Tools and Services.

  3. Select Portal Server Connections from the list of tools and services.

  4. Click Create.

  5. In the Create Portal Server Connection page, specify the following details:

    1. Name: Specify the name of the connection. Note that only alphanumeric characters can be used.

    2. URL: Specify the URL of the target portal server in the following format:

      http://targetserverhost:port

      where targetserverhost:port refer to the host name and port number of the portal server where you want to deploy your portals.

    3. Username: Type the user name used for connecting to the target server.

    4. Password: Type the password for the specified user name.

  6. Click Test to make sure the connection works.

  7. Click Create.

    Note that if the connection test fails due to the portal server being offline, the connection will still be set up, and can be used once the server is available.

Deploying a Portal Using WebCenter Portal

Note: Deploying a portal is primarily a system administrator task; however, you can assign the Portal Server: Deploy permission to another custom role. It is recommended that you create a custom role and assign this permission to the custom role in order to restrict the user roles that can deploy portals.

Only the Portal Manager (or Delegated Manager) of the portal can deploy the portal, and in addition, must be in a role that has the Portal Server: Deploy permission.

For more information about creating a custom application role and adding users to the role, see Defining Application Roles. and Assigning Users (and Groups) to Application Roles.

To deploy a portal using WebCenter Portal:

  1. In WebCenter Portal, access portal administration as described in Accessing Portal Administration in Building Portals with Oracle WebCenter Portal

  2. Click the Deploy icon.

  3. From the Server Name list under Target Portal Server, select the portal server connection you want to use to deploy your portal.

    You created this connection as described in Creating a Portal Server Connection.

  4. In the Comments box, specify comments, if any, about portal deployment.

  5. In the Options section, select the deployment options:

    • Include Portal Content: Select to specify that the portal content stored on Content Server must be included in portal deployment on the target server.

    • Include Shared Assets: Deploys the shared assets used by the portal. Clear the check box if you do not want to deploy shared assets.

    • Include Shared Libraries: Deploys the shared libraries used by the portal. Clear the check box if you do not want to deploy shared libraries. If you include shared libraries in portal deployment, you must restart the target server after deploying the portal for the shared library changes to be picked up.

    If this is the first time the portal is being deployed, the Redeploy instead of propagating changes check box appears disabled. Expanding the Change Details section displays a message that the portal is being deployed (for the first time) and hence all the data will be carried over to the target server. When you propagate a portal, this section displays the changes made to the portal since the last deployment.

    Figure 28-2 Deploying a Portal

  6. Click Deploy.

    The Deploy Portals dialog displays the progress and status of portal deployment. While the portal is being deployed, you can choose to close the dialog and continue to work on the portal if required.

    Figure 28-3 Portal Deployment Status

  7. Click Close.

    Once a portal is deployed, you can view its deployment history and status.

    See Viewing Portal Deployment History.

  8. Restart the target server where the portal is deployed if you included shared libraries in portal deployment.

    See Starting and Stopping Managed Servers for WebCenter Portal Application Deployments.

Viewing Portal Deployment History

To view portal deployment history using the WebCenter Portal Administration:

  1. On the Portals administration page, click Portal Deployments.

  2. On the Recent Deployments tab, click the Details link next to a portal to view deployment details.

    The Portal Deployment Details dialog displays the name of the target server and the date and time of deployment. It also shows the comments, if any, added while deploying the portal.

    Figure 28-4 Portal Deployment Details

  3. Click Close.

  4. To view each portal’s deployment status, click the Deployment History tab.

    Figure 28-5 Deployment History

  5. Click the deployment status link for a portal to display its deployment operations.

    Figure 28-6 shows the two records for the portal named MyPortal, one for initial deployment and the other for propagation.

    Figure 28-6 Deployment Operations

  6. Click Details next to a deployment operation to display more details.

Directly Deploying Portals Using WLST

You can use the WLST command deployWebCenterPortal to deploy a single, online portal directly to another target server. If you want to propagate portal changes in the source to the target using WLST, then you must use deployWebCenterPortal to deploy your portal.

Before deploying a portal you must complete a few prerequisite tasks. The overall process is as follows:

Step 1: Complete Prerequisites for Direct Portal Deployment

Before running the WLST command deployWebCenterPortal, complete the following:

  1. Verify that the name of the managed server on which WebCenter Portal is deployed is the same in both the source and target environments. For example, WC_Portal.

    You can only run deployWebCenterPortal if the managed server names match. If the managed server name is different, use portal archive deployment instead. as described in Exporting Portals to an Archive.

  2. Verify that you have at least the WebLogic Server Monitor role and the WebCenter Portal permission Portals: Manage Security and Configuration.

  3. Ensure a connection exists between the source and target WebCenter Portal. If a connection created using WebCenter Portal Administration already exists, you can use it to deploy portals or you can use the UI to create a new one.

    If a connection to the target from the source environment does not exist and you want to create one using WLST, use the WLST command adf_createHttpURLConnection.

    For example, in the source environment run:

    adf_createHttpURLConnection(appName='webcenter',name='MyWebCenterPortalTarget', 
     url='http://example.com:7777', user='myuser', password='mypassword',
     realm='ProductionRealm')
    

    See also Running Oracle WebLogic Scripting Tool (WLST) Commands.

Step 2: Run deployWebCenterPortal in the Source Environment

In the source WebCenter Portal:

  1. Start the WLST tool from your source WebCenter Portal Oracle home directory, and connect to the Administration Server for WebCenter Portal.

    For details, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

  2. Run the WLST command deployWebCenterPortal to deploy the portal on the target server.

    deployWebCenterPortal(appName, portalName, targetConnectionName
     [deployCustomizations, deployPortalContent, deploySecurity, deployData,
     deployActivities, deploySharedAssets, deployConnections, overwrite, savePortal, deployLog, server,
     applicationVersion])
    

    For detailed command syntax and descriptions, see deployWebCenterPortal in WebCenter WLST Command Reference. The options that you set depend on your specific deployment requirements.

    The following example deploys a new portal named myPortal for the first time on the target server. It also deploys all its associated content and specifies a name and location for the deploy log file:

    deployWebCenterPortal(appName='webcenter',portalName='myPortal',
    targetConnectionName='MyWebCenterPortalTarget', deployPortalContent=1,deployActivities=1,
    deployLog='/mydeploylogs/myPortal_deploy.log')
    

    Note: Always set deploySecurity=1 when importing a brand new portal as you cannot import a new portal without a security policy.

    Redeploying a portal that exists on the target

    If you want to redeploy a portal that already exists on the targer server, you use the deployWebCenterPortal command, with overwrite=1. The following example backs up a portal named myExistingPortal on the target and then overwrites the target portal (overwrite=1) with the source portal. The content associated with the target portal is preserved:

    deployWebCenterPortal(appName='webcenter',portalName='myExistingPortal',
    targetConnectionName='MyWebCenterPortalTarget', deployPortalContent=0,overwrite=1,savePortal=1)
    
  3. Examine the deployment log file.

    This file is either available at the location you specified (deployLog) or in a file named PortalDeploy_<timestamp>.log in your temporary directory.

Step 3: Verify Newly Deployed Portal in the Target Environment

In the target WebCenter Portal:

  1. Log in to the target WebCenter Portal.

  2. Navigate to the new portal deployment.

  3. Verify that the portal works as expected.

Deploying Portal Archives

Administrators can use WebCenter Portal or WLST commands to deploy portal archives (.par files) to any WebCenter Portal installation. The target portal server must be up and running when you deploy (or import) one or more portals from a file.

Figure 28-7 Deploying Portal Archives

This section includes the following topics:

Note: When you deploy a portal to another server from an archive you cannot use portal propagation to make incremental updates to the portal later on. The portal propagation feature is only possible when used in conjunction with direct portal deployment. See Propagating and Redeploying Portals in Production.

Understanding Portal Archives

You can create a portal archive (.par file) for a single portal or you can archive multiple portals in the same .par file.

Portal archives can contain:

Note: You can extract any portal archive (.par file) using the listWebCenterPortalArchive WLST command.

Figure 28-8 Portal Archive Deployment

Understanding Connection Property Files

If you plan to import, deploy, propagate, or restore a portal on a WebCenter Portal target where all or some connections do not exist, Oracle recommends that you use the WLST command exportWebCenterPortalConnections to generate the connection.properties file from the source environment, and then use the WLST command importWebCenterPortalConnections to import missing connections configured in that file on the target environment. For detailed steps, see Importing New WebCenter Portal Connections from a File.

Note:

Modifying Connection Details

If some connection information, such as server names, ports, and so on, varies between the source and target environments, you can isolate and modify connection details in the file before importing, deploying, propagating, or restoring the portal.

Table 28-1 shows examples where a different URL parameter is required on the target because the source and target do not use the same host.

Table 28-1 Example: Connection URLs Different in Source and Target Environments

Connection Type Source Connection: URL parameter Target Connection: URL parameter

WSRP Portlet Producer

http://mysource.com:8899/MyWSRPPortletProducer/portlets/wsrp2?WSDL

http://mytarget.com:8899/MyWSRPPortletProducer/portlets/wsrp2?WSDL

PDK-Java Producer

http://source.host.com:7778/myJPDKPortletProducer/providers

http://target.host.com:7778/myJPDKPortletProducer/providers

Web Service

http://source.example.com/getEmployee?empId=20+deptId=10

http://target.example.com/getEmployee?empId=20+deptId=10

Figure 28-9 illustrates how you can edit connection details in connection.properties when source and target parameters vary before new connections are created on the target.

Figure 28-9 Using connection.properties to Create Connections on the Target

Connection Types and Connection Properties

Table 28-2 lists all the connections captured in the connection.properties file together with the properties that are exported for the various connection types. The table also shows which properties you can edit before deployment, and which properties you must set on the target.

Note:

Table 28-2 Connection Properties Exported to connection.properties

Connection Type Properties Exported Edit on Deployment? Notes and Post Deployment Configuration Requirements

WSRP portlet producer

url

proxyHost

proxyPort

timeout

externalApp

tokenType

defaultUser

issuerName

recipientAlias

Yes

Yes

Yes

No

No

No

No

No

No

Security configuration post deployment:

registrationProperties

keyStorePath

keyStorePswd

sigKeyAlias

sigKeyPswd

encKeyAlias

encKeyPswd

enforcePolicyURI

Foot 1

PDK-Java producer

url

proxyHost

proxyPort

subscriberId

serviceId

sharedKey

timeout

establishSession

externalApp

Yes

Yes

Yes

No

No

No

No

No

No

Security configuration post deployment:

mapUser

useProxy

Web service connection

url

proxyHost

proxyPort

mtom

addressing

wsrm

security

Yes

Yes

Yes

No

No

No

No

Web service connections are used by data controls

Foot 1

URL connections -

HTTP URL

url

authenticationType

connectionClassName

realm

Yes

No

No

No

Security configuration post deployment:

password

user

attributes

URL connections -

File URL

url

Yes

Analytics collector

collectorPort

host

isEnabled

timeout

isUnicast

defaultConnection

Yes

No

No

No

No

No

host: represents clusterName when isUnicast is set to 0 and collectorHost when isUnicast is set to 1

BPEL server

url

policy

recipientKeyAlias

linkURL

Yes

No

No

No

External applications

url

authMethod

userFieldName

pwdFieldName

displayName

publicCredentialEnabled

sharedCredentialEnabled

AdditionalFields

Yes

No

No

No

No

No

No

No

If public or shared credentials are configured on the source, they are not exported for security reasons. You must configure these credentials on the target post deployment, if required.

Mail server

imapHost

smtpHost

imapPort

smtpPort

smtpSecured

imapSecured

appId

timeOut

AdditionalProperties

defaultConnection

Yes

Yes

Yes

Yes

Yes

Yes

No

No

No

No

LDAP configuration post deployment:

LdapDomain

LdapDefaultUser

LdapHost

LdapBaseDn

LdapAdminUsername

LdapPort

LdapSecured

Search

url

appUser

defaultConnection

indexAliasName

Yes

No

No

Users will be prompted for appPassword if promptForPassword is set to 1

WebCenter Content Server (socket)

serverHost

serverPort

extAppId

timeout

socketType

webContextRoot

cacheInvalidationInterval

binaryCacheMaxEntrySize

defaultConnection

Yes

Yes

No

No

No

No

No

No

No

Security configuration post deployment:

adminUsername

adminPassword

keystorePassword

privateKeyPassword

WebCenter Content Server (socketssl)

serverHost

serverPort

extAppId

timeout

socketType

webContextRoot

cacheInvalidationInterval

binaryCacheMaxEntrySize

defaultConnection

keystoreLocation

privateKeyAlias

Yes

Yes

No

No

No

No

No

No

No

No

No

Security configuration post deployment:

adminUsername

adminPassword

keystorePassword

privateKeyPassword

WebCenter Content Server (jaxws)

url

extAppId

timeout

socketType

webContextRoot

cacheInvalidationInterval

binaryCacheMaxEntrySize

defaultConnection

clientSecurityPolicy

Yes

No

No

No

No

No

No

No

No

Security configuration post deployment:

adminUsername

adminPassword

keystorePassword

privateKeyPassword

WebCenter Content Server (web)

url

extAppId

timeout

socketType

webContextRoot

cacheInvalidationInterval

binaryCacheMaxEntrySize

defaultConnection

Yes

No

No

No

No

No

No

No

Security configuration post deployment:

adminUsername

adminPassword

keystorePassword

privateKeyPassword

File System

path

Yes

Worklist connection

BPELConnection

No

Rest Connection

url

Yes

 

To find out how to deploy connection information in to another server, see Moving Connections Details from Staging to Production.

Securing Archives

This section includes the following topics:

About Securing Archive Files

WebCenter Portal supports validation checks to be performed when portal archives are exported or imported. This secures portal archives by preventing corrupt or arbitrary files from being included on Portal Server.

You can choose to set any of the following security levels for lifecycle operations:

During the export operations, a checksum is calculated and added to all the lifecycle archives - portal archives, application archives, and asset archives. The checksum is stored in a file named lifecycle.chk inside the .par or .aarfiles and the file is encrypted. During archive import, the file is decrypted to fetch the checksum value. In moderate security mode, the checksum (calculated internally) acts as the password to encrypt or decrypt the file. In high-security mode, the external application with shared credentials is used as the password, and the ExternallySecureLifecycleOperations custom attribute is used to fetch the password.

Consider the following while configuring a secure mode for lifecycle operations:

Securing Archive Files

To secure application, portal, and asset archives, you can choose to set either the high-security mode or the moderate-security mode for lifecycle operations.

To secure your application, portal, and asset archives:

  1. Log on to WebCenter Portal.

  2. Configure the desired security mode to secure your archives:

Option Procedure
To enable the high-security mode
  1. Create a custom global attribute named ExternallySecureLifecycleOperations.

  2. Set the value of the custom attribute to enable. For information about creating a custom global attribute, see Adding a Global Attribute.

To enable the moderate-security mode

  1. Register an external application and specify shared credentials. For information, see Registering External Applications.

  2. Create a custom global attribute named SecureLifecycleOperations. Specify the name of the external application as the value. For information about creating a custom attribute, see Adding a Global Attribute.

Exporting and Importing Portal Archives

If a direct connection to the target server does not exist, you can first export a portal to an archive (.par file) and then import the archive on the target server to deploy the portal. You can also create a portal archive if you want to create a backup of the portal and restore it on the same instance later.

Note: When you deploy a portal to another server from an archive you cannot use portal propagation to make incremental updates to the portal later on. The portal propagation feature is only possible when used in conjunction with direct portal deployment. See Propagating and Redeploying Portals in Production.

To export and then import a portal archive:

  1. Complete the portal archive prerequisites described in Portal Export Prerequisites.

  2. Export the source portal:

  3. Import the portal on the target:

Exporting Portals to an Archive

You can generate an archive (.par file) for any portal that is running on WebCenter Portal. You can create a portal archive by using WebCenter Portal, the exportWebCenterPortals WLST command, or REST APIs.

To find out how to create portal archives, see:

Portal Export Prerequisites

Before exporting a portal to an archive (.par file), verify the following:

Exporting Online Portals to an Archive Using WebCenter Portal Administration

With Portal Server-Manage All or Manage Configuration permission, you can export portals to an archive using WebCenter Portal Administration, saving the portal archive to a local file system or to a remote server file system.

Note: You can export portal templates too, but this is a separate process. You cannot export portals and portal templates into a single archive.

See Exporting Portal Templates to an Archive Using WebCenter Portal.

To export one or more portals:

  1. On the Portals administration page (see Accessing the Portals Page in WebCenter Portal Administration), select the portal you want to export by highlighting the row in the table.

    Press Ctrl+click to select more than row.

    Note: To prevent data conflict during the export process, Oracle recommends that all the portals you select are offline during the export process, even if only temporarily.

    See Taking Any Portal Offline.

    Members with the Portals: Manage Security and Configuration permission can still access a portal when it is offline, so notify them to not make changes while you complete the export.

  2. Click Export in the toolbar.

    The Export Portals pane opens. All the portals that you select are listed.

    If you want to exclude a portal, click the Delete icon next to the portal’s name.

    Figure 28-10 Exporting Portals

  3. Enter a name for the Portal Archive with the file extension .par or accept the default name.

    The default filename for the portal archive includes a random number to ensure uniqueness: webcenter_random_number.par

  4. Select Include Portal Content to export each portal’s content folder.

    A folder is automatically created in WebCenter Portal’s content repository for portals that use document services to create, manage, and store portal documents (files, folders, wikis, blogs). Only content that is stored in this folder can be exported with the portal. The export does not, for example, include web content/pages displayed through Content Presenter since this information is not stored in the portal’s content folder.

    Note:

    • The portal archive does not include any security settings. On import, the security group of the target portal server is applied.

    • Including content folders increases the size of the portal archive. If you are exporting a large number of portals or large content folders, make sure that your portal archive size does not exceed the maximum upload limit of 2 GB.

    • If you are managing legacy portals with assets that store artifacts in MDS, Oracle recommends that you relocate all dependent artifacts from MDS to your content server. If you choose not to move artifacts stored in MDS and do not include MDS content within the asset archive, you can use MDS WLST commands exportMetadata/importMetadata to move the MDS content another time. For example:

      exportMetadata(application='webcenter', server='WC_Portal',
       toLocation='/tmp/content',
       docs='/oracle/webcenter/siteresources/scopedMD/shared/**')
      
      importMetadata(application='webcenter', server='WC_Portal',
       fromLocation='/tmp/content',
       docs='/oracle/webcenter/siteresources/scopedMD/shared/**')
      
  5. Select Include Shared Assets to export the shared assets used in the portal.

  6. Click Export.

    Progress information displays during the export process.

    Figure 28-11 Portal Export In Progress

  7. Specify a location for the export archive (.par file) when the export process is complete.

    Select either of the following:

    • Download - Saves the export .par file to your local file system.

      Your browser downloads and saves the archive locally. The actual download location depends on your browser settings.

      Some browsers have settings that restrict the size of downloads. If your export archive is large and does not download, check your browser settings.

    • Save to Server - Saves the export .par file to a server location. The .par file is saved to the default path *DOMAIN_HOME*/WC_Archives, where DOMAIN_HOME refers to the domain location where WebCenter Portal is installed.

      When the file is saved, click OK to close the Information dialog.

  8. Click Close.

Exporting Online Portals to an Archive Using WLST

Use the WLST command exportWebCenterPortals to export one or more portals to a portal archive (.par file). When you create a portal archive using WLST you can choose whether or not to include the portal’s content folder and connection information in the archive:

exportWebCenterPortals(appName, fileName, [names, offlineDuringExport,
 exportPortalContent, exportConnections, exportSharedAssets, server, applicationVersion])

The options that you set depends on your specific archive requirements. For command syntax, seeexportWebCenterPortals in WebCenter WLST Command Reference.

For information on how to run WLST commands, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

Here are a few examples:

Example 1 - Exporting two portals

This example exports two portals named Sales and Finance, plus all content, data, security, customizations, and connection information:

exportWebCenterPortals(appName='webcenter', fileName='MyPortalExport.par',
 names='Sales,Finance', exportPortalContent=1, exportConnections=1)

Example 2 - Exporting a single, offline portal without its content folder or connection details

This example takes MySales offline and exports the portal to MyPortalExport.par:

exportWebCenterPortals(appName='webcenter', fileName='MyPortalExport.par',
 names='Sales', offlineDuringExport=1)
Exporting a Portal Using REST APIs

You can generate a portal archive (.par file) for your portals using the REST API support.

To export a portal using REST API, use the following URL format:

http://host:port/rest/api/v1/portal/portals/portal_shortId/archive?utoken=<utoken_value>

Where host: port are the hostname and port number for the server where the portal is running, and portal_shortId is the short ID of the portal to be exported.

If you want to export the portal content as well, include the includePortalContentValue parameter in the URL as follows:

http://host:port/rest/api/v1/portal/portals/*portal_shortId*/archive?includePortalContent=*includePortalContentValue*&utoken=*utoken_value*

The default value for includePortalContent is 0. Any value greater than 0 will be treated as true, and the portal content will be included in the portal archive.

To export the portal, inwpfas/modules/rest-service/servlet/src/java/oracle/webcenter/jaxrs/services/portal/controller/PortalsResource.java, add a GET operation in the following format:

@GET
@Path("{portalId}/archive")
public Response exportPortal(@PathParam("portalId") String portalId,
                @DefaultValue(START_INDEX_DEFAULT)
                                                @QueryParam("includePortalContent") int includePortalContent);

The GET operation will call the API to perform the portal export. You can then download the PAR file to the local client. Response code 200 represents the successful export of a portal.

Importing Portals from an Archive

Administrators can deploy archived portals (.par files) to any WebCenter Portal Server. You can use the WLST command importWebCenterPortals to import portal archives or you can use WebCenter Portal Administration.

On import, all portals included in the archive are created or re-created on the target server. Existing portals are deleted then replaced, and new portals are created. If you intend to import portals with names identical to those available on the target server, ensure that those portals are offline in the target application as it is not possible to overwrite portals that are online. For details, see Taking Any Portal Offline.

Note: When importing portals using WLST, you can set the option forceOffline=1 to automatically take any online portals offline. Any portals taken offline in this way, remain offline at the end of the import process.

Portals are locked during an import operation to prevent simultaneous imports/exports of the same portal. If someone else is importing a particular portal, all subsequent attempts to import (or export) the same portal are blocked.

After importing one or more portals, consider initiating Elasticsearch crawl to index the newly imported data.

Portal Archive Content(Optional on Import)

Portal archives sometimes contain the portal’s content folder. If included, you can choose whether or not to import this information too. On import, the content folder in the archive overwrites the folder on the target (if one exists), and the security group of the target portal server is applied.

Note: Portal archives do not include web content/pages displayed through Content Presenter since this information is not stored in the portal’s content folder.

To find out how to import portal archives, see:

Portal Import Prerequisites

Before importing a portal archive (.par file), verify the following:

Importing a Portal from an Archive Using WebCenter Portal Administration

With Portal Server-Manage All or Manage Configuration permission, you can import portals from a portal archive through WebCenter Portal Administration.

To import one or more portals from a .par file:

  1. Ensure that you meet the portal import prerequisites listed in Portal Import Prerequisites.

  2. On the Portals administration page (see Accessing the Portals Page in WebCenter Portal Administration), click Import in the toolbar.

    The Import Portals dialog opens.

    Figure 28-12 Importing Portals

  3. Specify the location of your portal archive (.par file). Select one of:

    • Look on My Computer - Enter the location in the text box. Alternatively, click Browse to locate the directory on your local file system where the .par file is stored.

    • Look on WebCenter Portal Server - Enter the path on the server where WebCenter Portal is deployed, including the archive filename, in the text box. For example, /tmp/MyPortalExport.par. You can specify any shared location accessible from WebCenter Portal.

  4. Click Browse Archive to review the content available for import.

    Figure 28-13 Importing Portals

    The names of all the portals in the specified archive display in the table. The Type column indicates when there is a difference between the portals in the archive and those that exist on the target:

    • New - A portal with this name does not exist on the target. On import, a new portal is created.

    • Replace - A portal with this name and the same GUID exists on the target. The existing portal is deleted on import and replaced with the version in the portal archive.

    • Conflict - A portal with this name exists on the target but the portal on the target has a different GUID to the portal you are trying to import. Or similarly, this portal has the same GUID as one of the portals in the target but the portal names do not match.

      If the import process detects a conflict between the portals you are trying to import and those which exist on the target, you must resolve the issue. For example, if the conflict is due to matching names but different GUIDs you could either change the name of the source portal and create a new export archive, or rename the conflicting portal in the target application and import the same archive.

  5. Set import options as required.

    Field Description

    Include Portal Content

    (Only displays if the archive specified includes a content folder for one or more portal.)

    Select to import all content folders included in the archive. Folders that exist on the target are overwritten on import, and the security group of the target portal server is applied.

    Deselect this option to exclude portal content folders (if any). This option is useful when migrating between stage and production environments where test content is no longer required.

    Note: Portal archives that contain large content folders may exceed the maximum upload size for files (2 GB by default). Oracle recommends that you use the importWebCenterPortals WLST command to import any portal archive that exceeds the current upload size.

    See Importing a Portal from an Archive Using WLST. If necessary, you can increase the upload setting, see Changing the Maximum File Upload Size.

    Include Shared Assets

    Select to import shared assets, like skin and page templates, used in the portal.

  6. Click Import.

    • If you try to import portals that exist in the target WebCenter Portal application, the Confirm Replace Portal dialog displays. You must confirm whether you want to overwrite the existing portals.

      To delete existing portals and replace them with imported versions, click Yes. Click No to cancel the import process.

    • If the import process detects a conflict between the portals you are trying to import and those which exist on the target, a message displays to help you resolve the issue. For example, conflict messages display if a portal on the target application has the same name but a different GUID to a portal you are trying to import. In this instance you could change the name of the source portal and create a new export archive, or rename the conflicting portal in the target application and import the same archive.

    • If the portal archive exceeds the maximum upload size for files (2 GB by default) you cannot import the portals. Oracle recommends that you use the importWebCenterPortals WLST command to import any portal archive that exceeds the current upload size.

      For details, see Importing a Portal from an Archive Using WLST. If necessary, you can increase the upload setting. For details, see Changing the Maximum File Upload Size.

    Note:

    • If you are working with legacy portals with assets that store artifacts in MDS, Oracle recommends that you relocate all dependent artifacts from MDS to your content server. If you choose not to move artifacts stored in MDS and do not include MDS content within the asset archive, you can use MDS WLST commands exportMetadata/importMetadata to move the MDS content another time. For example:

      exportMetadata(application=’webcenter’, server=’WC_Portal’, toLocation=’/tmp/content’, docs=’/oracle/webcenter/siteresources/scopedMD/shared/**’)

      importMetadata(application=’webcenter’, server=’WC_Portal’, fromLocation=’/tmp/content’, docs=’/oracle/webcenter/siteresources/scopedMD/shared/**’)

  7. In the information message, click Yes to confirm that you want to import the portals.

    An information message displays when all portals import successfully.

    Figure 28-14 Portal Import Successful

  8. Click Close.

Typically, some additional work is required before new portals are ready for general use so initially, all newly imported portals are offline. For example, you may want to:

Once portal content and membership details are finalized you can bring the portal online. See Bringing Any Portal Back Online.

Importing a Portal from an Archive Using WLST

Use the WLST command importWebCenterPortals to import one or more archived portals into WebCenter Portal:

importWebCenterPortals(appName, fileName, [names, parentPortal,
 importCustomizations, importPortalContent, importSecurity, importData,
 importActivities, overwrite, savePortals, forceOffline, importLog, importConnections, connPropertiesFile, importSharedAssets, server, applicationVersion])

When you import portals using WLST, you do not have to import everything inside the archive. If the archive contains multiple portals you can specify only those portals that you want to import. You can also specify how much information is imported along with the portals. For example you can choose whether or not to import the portal’s content folder or shared assets. These options are useful as in some circumstances, such as moving a portal from a test environment to a stage or production environment, test-related data/content is not always required.

The options that you set depend on your specific requirements. For command syntax, see importWebCenterPortals in WebCenter WLST Command Reference.

For information on how to run WLST commands, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

Here are a few examples:

Example 1 - Importing two portals on the target for the first time

This example imports two portals named Sales and Finance, plus all content, and security, and also specifies a name and location for the import log file:

importWebCenterPortals(appName='webcenter', fileName='MyPortalExport.par',
 names='Sales,Finance', importLog='/myimportlogs/myPortal_import.log')

Example 2 - Importing a portal that exists on the target

This example backs up a portal named myExistingPortal on the target and then overwrites the target portal with the archived version (excluding all possible data):

importWebCenterPortals(appName='webcenter', fileName='MyPortalExport.par',
 names='myExistingPortal', importPortalContent=0, importActivities=0, overwrite=1, savePortals=1)
Importing a Portal Using REST APIs

You can import portals into WebCenter Portal using REST API.

To import a portal using REST API, use the following URL format:

http://host:port/rest/api/v1/portal/portals?utoken=<utoken_value>

where host:port are the hostname and port number of the server into which you want to import the portal.

To import the portal, add the POST operation in the following format in the wpfas/modules/rest-service/servlet/src/java/oracle/webcenter/jaxrs/services/portal/controller/PortalsResource.java:

@POST
  @Consumes({MediaType.MULTIPART_FORM_DATA, MediaType.APPLICATION_OCTET_STREAM})
  @ResourceType("urn:oracle:webcenter:portal:portals")
	
  public Response importPortal(MultiPart multiPartData, 
          @DefaultValue(START_INDEX_DEFAULT)
                                                  @QueryParam("includePortalContent") int includePortalContent);

For performing portal imports using the POST operation the content type must be specified as multipart/form-data. In a multipart format, each part is a contiguous portion of the object’s data. You can upload each object part independently and in any order. If transmission of any part fails, you can retransmit that part without affecting other parts. The POST operation also requires the filename of the portal archive to be mapped to the fileName key.

Viewing and Extracting Portal Archives

Use the WLST command listWebCenterPortalArchive to view the content of a portal archive (.par file). You can also extract the portal archive content to a location of your choice, if required. For command syntax, see listWebCenterPortalArchive in WLST Command Reference for WebLogic Server.

For information on how to run WLST commands, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

Deploying Portal Templates

Administrators can export portal templates from WebCenter Portal and deploy them on another portal server. Out-of-the-box templates cannot be exported.

While export and import utilities are primarily used to move information between WebCenter Portal instances, the portal template export feature is also useful as a backup service, and for sharing and exchanging templates with others.

Portal templates can contain pages, documents, portal assets, and security information such as custom roles and member details. As all the template data is included in the portal template archive, you do not need to manually migrate any template data to the target when you deploy a portal template to another WebCenter Portal Server.

Portal templates that use document services (files, folders, wikis, blogs) automatically own a content folder on WebCenter Portal’s back-end content repository. When you use WebCenter Portal Administration to export portal templates, the content stored in this folder is automatically included in the portal template archive for easy deployment to another target server.

If you export the portal template using the WLST command exportWebCenterPortalTemplates the content folder is optional.

Note: Portal template archives do not include web content/pages referenced by the portal template that is stored at any other location, for example, information displayed through Content Presenter that is not stored in the portal template’s content folder. Only the folder assigned to the portal template on WebCenter Portal’s back-end content repository is included with the portal template archive.

This section includes the following topics:

Exporting Portal Templates

Administrators can use the WLST command exportWebCenterPortalTemplates to export one or more portal templates to an archive. Alternatively, administrators and application specialists can use WebCenter Portal Administration to export portal templates to an archive.

This section includes the following topics:

Exporting Portal Templates to an Archive Using WebCenter Portal

Application specialists (and other users with the Portal Templates: Manage All permission) can export portal templates from WebCenter Portal. For information, see Exporting Portal Templates in Building Portals with Oracle WebCenter Portal.

Note: You cannot export portals and portal templates into a single archive. Exporting portals is a separate process. For more information, see Exporting Online Portals to an Archive Using WebCenter Portal Administration.

Exporting Portal Templates to an Archive Using WLST

Use the WLST command exportWebCenterPortalTemplates to export one or more portal templates to an archive (.par file). When you create a portal template archive using WLST you can choose whether or not to include the portal’s content folder in the archive:

exportWebCenterPortalTemplates(appName, fileName, [names,
 exportPortalTemplateContent, exportConnections, server, applicationVersion])

The options that you set depends on your specific archive requirements. For command syntax, see exportWebCenterPortalTemplates in WebCenter WLST Command Reference.

For information on how to run WLST commands, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

Here are a few examples:

Example 1 - Exporting two portal templates

This example exports two templates named SalesTargetTemplate and NewProjectTemplate, plus their associated content folders:

exportWebCenterPortalTemplates(appName='webcenter',
 fileName='MyTemplateExport.par', names='SalesTargetTemplate,NewProjectTemplate',
 exportPortalTemplateContent=1)

Example 2 - Exporting a single portal template without its content folder

This example exports the New Hire template. Documents are not enabled in this template so the template does not have a content folder:

exportWebCenterPortals(appName='webcenter', fileName='MyTemplateExport.par',
 names='NewHire')

Importing Portal Templates

Administrators can use the WLST command importWebCenterPortals to deploy one or more portal templates on a WebCenter Portal Server. Alternatively, administrators and application specialists can use WebCenter Portal Administration to import portal templates from an archive.

On import, all portal templates included in the archive are re-created on the target application. If a portal template exists on the target, then it is deleted and replaced. If a portal template does not exist, then it is created.

Newly imported portal templates are not immediately available for general use. You must publish newly imported templates to make them available to everyone. See Publishing or Hiding Portal Templates in Building Portals with Oracle WebCenter Portal.

This section includes the following topics:

Importing Portal Templates from an Archive Using WebCenter Portal

Application specialists (and other users with Portal Templates: Manage All permission) can import portal templates into WebCenter Portal. For more information, seeImporting Portal Templates in Building Portals with Oracle WebCenter Portal.

Importing Portal Templates from an Archive Using WLST

Use the WLST command importWebCenterPortals to import one or more portal templates from an archive (.par file). When you import a portal template archive using WLST you can choose whether or not to import template content folders:

importWebCenterPortals(appName, fileName, [names], [parentPortal], [importCustomizations], [importPortalContent], [importSecurity], [importData], [importActivities], [overwrite], [savePortals], [forceOffline], [importLog], ]importConnections], [connPropertiesFile], [importSharedAssets], [server], [applicationVersion])

The options that you set depend on your specific archive requirements. For command syntax, see importWebCenterPortals in WebCenter WLST Command Reference.

For information on how to run WLST commands, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

Here are a few examples:

Example 1 - Importing a new portal template without content

The following example imports the New Hire portal template archived in myPortalTemplateExport.par and specifies a name and location for the import log file. Documents are not enabled in this template so the template does not have a content folder.

importWebCenterPortals(appName='webcenter', fileName='myPortalTemplateExport.par',
 names='NewHire', importLog='newHireTemplate_import.log')

Example 2 - Imports two existing portal template with content:

This example backs up portal templates named SalesTargetTemplate and NewProjectTemplate on the target, and then overwrites the existing templates and their content folders with information in myPortalTemplateExport.par:

importWebCenterPortals(appName='webcenter', fileName='myPortalTemplateExport.par',
 names='SalesTargetTemplate,NewProjectTemplate', importPortalContent=1,
 overwrite=1, savePortals=1, importLog='myPortalTemplate_import.log')

Deploying Assets

Authorized users can download assets, such as skins and page templates, while WebCenter Portal is running, edit and extend them in tools such as Oracle JDeveloper, and then deploy them back to WebCenter Portal. Users who want to share assets or migrate assets to other WebCenter Portal instances can use the download/upload feature too.

WebCenter Portal users can download and upload the following assets through WebCenter Portal and administrators can perform the same tasks using WLST commands:

When you download (or export) a WebCenter Portal asset, the asset details are saved to an export archive (.aar file). You can save the export archive to your local file system or a remote server file system using a filename of your choice. Artifacts, such as icons and images, used or referenced by assets are not included in the export or import archive unless they are stored in the portal’s content folder on Content Server and the contents folder is in sync on the source and the target servers.

Devices and Device Groups

Administrators can export device groups and devices to a file (.aar file), and then import (deploy) them to another WebCenter Portal instance. For example, if you want to move devices or device groups developed on stage to a production server or share your devices and device groups with another WebCenter Portal installation.

Note: You cannot export or import out-of-the-box device groups or devices. You can only export and import device groups or devices that you and other administrators create or copy.

This section includes the following topics:

Exporting Assets, Devices, and Device Groups to an Archive

This section describes the various ways you can create an asset, device, and device group archive. It includes the following topics:

See also, About Permissions Required to Import (or Export) Assets.

Exporting Assets to an Archive from WebCenter Portal

Administrators, application specialists, and portal managers can export assets from WebCenter Portal. For details, see Downloading an Asset in Building Portals with Oracle WebCenter Portal.

Exporting Devices and Device Groups to an Archive

This section includes the following topics:

Exporting Devices and Device Groups Using WebCenter Portal

Administrators can export one or more devices and device groups to a file (.par file) from WebCenter Portal Administration. For details, see Managing Device and Device Group Lifecycles.

Exporting Devices and Device Groups Using WLST

Administrators can use the WLST command exportWebCenterResource to export a single device or device group from WebCenter Portal to an export archive (.aar file):

exportWebCenterResource(appName, fileName, resourceType, [resourceGUID, resourceName, spaceName, exportContentDirectory, server,
 applicationVersion])

For command syntax, see exportWebCenterResource in WebCenter WLST Command Reference.

For information on how to run WLST commands, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

Here are a few examples:

Example 1 - Exporting a device group

The following example exports a device group named “MyMobileDeviceGroup” from WebCenter Portal:

exportWebCenterResource(appName='webcenter', fileName='myDeviceGroupExport.aar',
 resourceType='deviceGroup', resourceName='MyMobileDeviceGroup)

Example 2 - Exporting a device

The following example exports a device named “MyMobileDevice” from WebCenter Portal:

exportWebCenterResource(appName='webcenter', fileName='myDeviceExport.aar',
 resourceType='device', resourceName='MyMobileDevice)

Exporting an Asset, Device, or Device Group to an Archive Using WLST

Administrators can use the WLST command exportWebCenterResource to export a single asset, device, or device group from WebCenter Portal:

exportWebCenterResource(appName, fileName, resourceType, [resourceGUID,
 resourceName, spaceName, exportContentDirectory, server, applicationVersion])

The options that you set depends on the asset, device, or device group you want to export. For command syntax, see exportWebCenterResource in WebCenter WLST Command Reference.

For information on how to run WLST commands, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

Here are a few examples:

Example 1 - Exporting a page template belonging to the “Sales” portal

The following example exports a page template from the Sales portal to a file named mySalesPageTemplateExport.aar:

exportWebCenterResource(appName='webcenter',
 fileName='mySalesPageTemplateExport.aar', resourceType='pageTemplate',
 resourceGUID='gsr47d9a5ac_7398_439a_97d2_8b54ce905f7e, spaceName='SalesPortal')

Example 2 - Exporting a shared portal skin identified by GUID

The following example exports a shared portal skin to a file named mySharedSkinExport.aar:

exportWebCenterResource(appName='webcenter', fileName='mySharedSkinExport.aar',
 resourceType='skin', resourceGUID='gsr5a8c2fcc_bc7f_4cba_9254_36df58d66e60)

Example 3 - Exporting a shared portal skin identified by name

The following example exports the same shared portal skin but specifies the skin’s display name rather than the GUID:

exportWebCenterResource(appName='webcenter', fileName='mySharedSkinExport.aar',
 resourceType='skin', resourceName='MyCompanySkin)

Example 4- Exporting a device group

The following example exports a device group named “MyMobileDeviceGroup” from WebCenter Portal:

exportWebCenterResource(appName='webcenter', fileName='myDeviceGroupExport.aar',
 resourceType='deviceGroup', resourceName='MyMobileDeviceGroup)

Example 5- Exporting a device

The following example exports a device named “MyMobileDevice” from WebCenter Portal:

exportWebCenterResource(appName='webcenter', fileName='myDeviceExport.aar',
 resourceType='device', resourceName='MyMobileDevice)

Exporting Assets Using REST API

Oracle WebCenter Portal provides REST APIs to download a specific asset to an archive (.aar) from a portal or the shared assets area.

To export an asset using REST API, use the following URL format:

http://host:port/rest/api/v1/portal/typeOfAsset/assetId/archive?utoken=<utoken_value>

Where *typeOfAsset* refers to the asset you want to export, such as page templates, skins, visualization templates, or resource catalogs.

To export an asset, add the GET operation in the following format in wpfas/modules/rest-service/servlet/src/java/oracle/webcenter/jaxrs/services/portal/controller/AssetTypeResource.java

@GET
  @Path("{id}/archive")
  public Response exportPortal(@PathParam("id") String id);

Where, PathParam’s id is the short ID of the asset to be exported.

Importing Assets from an Archive

You can only import an asset previously saved to a WebCenter Portal asset export archive (.aar file). For details, see Exporting Assets, Devices, and Device Groups to an Archive.

On import:

This section describes the various ways you can import an asset to WebCenter Portal from an archive. It includes the following topics:

About Permissions Required to Import (or Export) Assets

Table 28-3 describes the roles/permission required to import (or export) assets using the WebCenter Portal Administration.

Note: If you want to import (or export) assets using WLST, you must also have the WebLogic Server Monitor role (or higher).

Table 28-3 Permissions Required to Import (or Export) Assets Using WebCenter Portal

Asset Required WebCenter Portal Role or Permission Description

Shared asset

  • Administrator

OR

Shared asset

  • Create, Edit, Delete <resourcetype>

  • This permission enables you to create and manage shared assets for WebCenter Portal.

  • Manage Configuration

  • This application-level permission (Manage Configuration) gives you access to WebCenter Portal Administration pages.

Portal asset

  • Portal Manager

OR

Portal asset

  • Create, Edit, Delete Resources (standard)

    OR

    Create, Edit, Delete <resourcetype> (advanced)

  • These permissions enable you to create and manage assets for a particular portal. Either standard or advanced permissions will apply, depending on the portal.

  • Manage Configuration

  • This portal-level permission (Manage Configuration) gives you access to the asset administration page for a particular portal.

Importing Assets from an Archive using WebCenter Portal

Administrators, application specialists, and portal managers can import assets from WebCenter Portal. For details, see Uploading an Assetin Building Portals with Oracle WebCenter Portal

Importing Devices and Device Groups Using WebCenter Portal

Administrators can import one or more devices and device groups from a file (.par file) using WebCenter Portal Administration. For details, see Managing Device and Device Group Lifecycles.

Importing Assets from an Archive using WLST

Administrators can use the WLST command importWebCenterResource to deploy a single asset, device, or device group to WebCenter Portal.

importWebCenterResource(appName, fileName, [resourceType, spaceName,
 overwriteContentDirectory, server, applicationVersion])

The options that you set depends on the asset, device, or device group you want to deploy. For command syntax, see importWebCenterResource in WebCenter WLST Command Reference.

For information on how to run WLST commands, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

Here are a few examples:

Example 1 - Deploying a page template to the “Sales” portal

The following example imports a page template archived in mySalesPageTemplateExport.aar in to the Sales portal:

importWebCenterResource(appName='webcenter',
 fileName='mySalesPageTemplateExport.aar', resourceType='pageTemplate',
 spaceName='SalesPortal')

Example 2 - Deploying a shared portal skin

The following example imports a shared portal skin archived in mySharedSkinExport.aar:

importWebCenterResource(appName='webcenter', fileName='mySharedSkinExport.aar',
 resourceType='skin')

Example 3 - Deploying a device group

The following example imports a device group exported to myDeviceGroupExport.aar:

importWebCenterResource(appName='webcenter', fileName='myDeviceGroupExport.aar',
 resourceType='deviceGroup')

Example 4 - Deploying a device

The following example imports a device archived in myDeviceExport.aar:

importWebCenterResource(appName='webcenter', fileName='myDeviceExport.aar',
 resourceType='device')

Importing Assets Using REST API

Oracle WebCenter Portal provides REST APIs to download a specific asset to an archive (.aar file) from a portal or the shared assets area.

To export an asset using REST API, use the following URL format:

http://host:port/rest/api/v1/portal/portals/portalShortId/typeOfAsset?utoken=<utoken_value>

Where typeOfAsset is the asset you want to export, such as page templates, skins, visualization templates, or resource catalogs, and portalShortId refers to the short ID of the portal into which the asset will be imported.

To import an asset into a portal or the shared assets area, add the POST operation in the following format in wpfas/modules/rest-service/servlet/src/java/oracle/webcenter/jaxrs/services/portal/controller/PortalsReosurce.java:

@POST
  @Consumes({MediaType.MULTIPART_FORM_DATA, MediaType.APPLICATION_OCTET_STREAM})
  @Path("{portalId}/<typeOfAsset>")
  @ResourceType("urn:oracle:webcenter:portal:<assetType>")
  public Response importPortal(@PathParam("portalId") String portalId, 
                   MultiPart multiPartData);

Where, PathParam’s portalId is the short ID of the portal into which asset will be imported, multipartData is the multipart data with the file to be consumed for upload.

For importing assets using the POST operation, the content type must be specified as multipart/form-data. In a multipart format, each part is a contiguous portion of the object’s data. You can upload each object part independently and in any order. If transmission of any part fails, you can retransmit that part without affecting other parts. The POST operation also requires the filename of the asset archive to be mapped to the fileName key.

For importing a shared asset, you can also use the following URL format:

http://host:port/rest/api/v1/portal/typeOfAsset?utoken=<utoken_value>

To import a shared asset, add the POST operation in the following format in wpfas/modules/rest-service/servlet/src/java/oracle/webcenter/jaxrs/services/portal/controller/*AssetTypeResource*.java:

POST
  @Consumes({MediaType.MULTIPART_FORM_DATA, MediaType.APPLICATION_OCTET_STREAM})
  @ResourceType("urn:oracle:webcenter:portal:<assetType>")
  public Response importPortal(MultiPart multiPartData)

Deploying Custom Shared Library Extensions

Developers can use JDeveloper to build custom ADF library components for portals, such as managed beans, task flows, and data controls, and deploy them as shared library extensions to the portal server.

See also, the Developing Shared Libraries in Developing for Oracle WebCenter Portal.

If shared libraries are used by a portal, you can choose to push them to another instance while deploying or propagating the portal.

Moving Connections Details from Staging to Production

Administrators can use the WLST commands exportWebCenterPortalConnections and importWebCenterPortalConnections to migrate connections details from one WebCenter Portal installation to another. These commands are useful if you import or restore a portal and connections used in the source server, such as portlet producer connections and web service connections, do not exist on the target server.

For more information on the types of connections you can migrate, see Understanding Connection Property Files.

This section includes the following topics:

Exporting WebCenter Portal Connections Details to a File

If you have WebLogic Server Operator role (or higher) you can use the WLST command exportWebCenterPortalConnections to export connection information currently configured for a particular WebCenter Portal installation to a file:

exportWebCenterPortalConnections(appName, fileName, [connectionType,
 connectionName, logFile, server, applicationVersion])

Note: You cannot export connections for a specific portal. Connections are shared across all the portals.

The options that you set depends on the connection information you want to export. For command syntax, see exportWebCenterPortalConnections in WebCenter WLST Command Reference.

For information on how to run WLST commands, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

Here are a few examples:

Example 1 - Deploying all WSRP producer and external application connections to a file

The following example only exports WSRP producer and external application connections to a file named myconnection.properties:

exportWebCenterPortalConnections(appName='webcenter',
 fileName='/myConnections/myconnection.properties',
 connectionType='wsrpProducerConnection,externalAppConnection')

Example 2 - Deploying specific WSRP producer connections to a file

The following example exports connection configuration information for two WSRP producer connections named MyWSRP1 and MyWRSP2:

exportWebCenterPortalConnections(appName='webcenter',
 fileName='/myConnections/connection.properties',
 connectionType='wsrpProducerConnection', connectionName='MyWSRP1,MyWSRP2')

Importing New WebCenter Portal Connections from a File

If you have WebLogic Server Operator role (or higher) you can use the WLST command importWebCenterPortalConnections to deploy connection information exported from one WebCenter Portal installation to another.

importWebCenterPortalConnections(appName, fileName, [promptForPassword, logFile,
 server, applicationVersion])

Only new connections are imported on the target. Connections that already exist on the target are ignored. The source connection information must be exported using the the WLST command exportWebCenterPortalConnections. To find out how, see Exporting WebCenter Portal Connections Details to a File.

If required, you can edit the file that contains the connection information beforeyou deploy the connection information on the target. See also Understanding Connection Property Files.

Example 1 - Importing connections from a file

The following example imports connections defined in a file named myconnection.properties located in /myConnections. Detailed information about the import connection operation is also logged to importConnection.log:

importWebCenterPortalConnections(appName='webcenter',
 fileName='/myConnections/myconnection.properties',logFile='importConnection.log')

Example 2 - Importing connections that require credentials

The following example imports connections defined in a file named myconnection.properties located in /myConnections and prompts you for credentials if required:

importWebCenterPortalConnections(appName='webcenter',
 fileName='/myConnections/myconnection.properties', promptForPassword=1)

For command syntax, see importWebCenterPortalConnections in WebCenter WLST Command Reference.

For information on how to run WLST commands, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

Propagating and Redeploying Portals in Production

This section includes the following topics:

Understanding Portal Propagation

Administrators can propagate portal changes made in staging to production if the stage and production environments are connected and kept “in sync”. For example, you can propagate portal changes such as new pages and assets added or modified. Oracle strongly recommends that you always make changes in stage first and then push your portal changes to production using deployment or propagation. Propagation does not require the production server to be restarted or incur any downtime.

For lists of changes propagated from staging to production, see Table 28-4

Table 28-4 Portal Changes Propagated to Production

Portal Changes Propagated Yes / No

Portal pages

Yes

Assets

Yes

Portlets

Yes

Portal folder content changes

Yes

Portal activity/usage data

(activity streams, calendar events, feedback, list, links, message boards, people connections, profiles, surveys)

No

Portal security data excluding custom page security

(portal roles and permissions, member details and their role assignments)

No

External content referenced by the portal

(through portal pages, portal assets, Content Presenter display templates, Site Studio, and so on...)

No

Data stored on external servers

(mail, analytics, custom task flows and shared libraries)

No

Any structural changes to a portal require redeployment.

Propagating Portal Changes Using WebCenter Portal

To propagate changes made to a portal to the target server:

  1. In WebCenter Portal, access portal administration as described in Accessing Portal Administration in Building Portals with Oracle WebCenter Portal.

  2. Click the Deploy icon.

    Note: You will see the Deploy icon only if you are granted the application-level permission Portal Server: Deploy.

  3. UnderTarget Portal Server, from the Server Name list, select the connection to be used for propagating portal changes. It must be the same connection that was used to deploy the portal.

  4. In the Comments box, specify any comments related to portal propagation.

  5. In the Options section, select the propagation options:

    • Include Portal Content: Select to specify that the portal content stored on Content Server must be propagated to the target server.

    • Include Shared Assets: Propagates the shared assets used by the portal. Clear the check box if you do not want to propagate shared assets.

    • Include Shared Libraries: Propagates the shared libraries used by the portal. Clear the check box if you do not want to propagate shared libraries. If you choose to propagate shared libraries, you must restart the target server after propagating portal changes for the shared library changes to be picked up.

  6. Expand the Changed Details section to view the artifacts or settings that will be propagated.

    • Portal Assets: Lists the portal assets that have been added or updated since the last propagation. For example, Figure 28-18(deploying-portals-templates-assets-and-extensions.md#GUID-F693C084-2360-48CA-BB48-4B3C2CBCC94A) the Pages category shows that three pages were added since the last propagation.

    • Shared Assets: Lists the shared assets used by the portal that were added or updated since the last propagation.

    • Shared Libraries: Lists the shared libraries used by the portal that were added or updated since the last propagation.

    Figure 28-18 Propagating Portal Changes

  7. Click Propagate.

    The Deploy Portals dialog displays the progress and status of portal propagation. While the portal is being propagated, you can choose to work on the portal if required.

  8. Click Close.

  9. If you propagated shared libraries, restart the target server for the shared libraries changes to take effect. For information, see Starting and Stopping Managed Servers for WebCenter Portal Application Deployments.

Propagating Portal Changes Using WLST

Direct portal propagation is only possible if a connection exists between the source and target environments and the portal was previously deployed directly to the target using deployWebCenterPortals WLST command. See Directly Deploying Portals Using WLST.

To propagate metadata changes from staging to production:

  1. Run the WLST command propagateWebCenterPortal to propagate metadata for the portal.

    propagateWebCenterPortal(appName, portalName, targetConnectionName,
     [savePortal, propagateLog, propagateSharedAssets, propagatePortalContent, server, applicationVersion])
    

    The options that you set depends on your specific requirements. For command syntax, see propagateWebCenterPortal in WebCenter WLST Command Reference.

    For information on how to run WLST commands, see Running Oracle WebLogic Scripting Tool (WLST) Commands.

Here are some examples:

Example 1 - Propagating portal metadata changes

The following commands create a connection to the production server (MyProductionConnection) and then propagates changes for a portal named myPortal to the target server:

adf_createHttpURLConnection(appName='webcenter', name='MyProductionConnection',
 url='http://example.com:7777', user='myuser',  password='mypassword',
 realm='ProductionRealm')

propagateWebCenterPortal(appName='webcenter', portalName='myPortal',
 targetConnectionName='MyProductionConnection')

Example 2 - Backing up the target portal before propagating portal metadata changes

The following example backs up myPortal on the target, propagates portal changes, including any changes to the portal content and shared assets used in the portal, and also specifies a name and location for the propagation log file:

propagateWebCenterPortal(appName='webcenter', portalName='myPortal',
 targetConnectionName='MyProductionConnection', savePortal=1
 propagateLog='/mypropagationlogs/myPortal_propagation.log', propagateSharedAssets=1, propagatePortalContent=1,)

Redeploying a Portal Using WebCenter Portal

In WebCenter Portal, when you redeploy a portal, all information about the existing portal is deleted from the target server and a new portal is created.

To redeploy a portal using WebCenter Portal:

  1. In WebCenter Portal, access portal administration as described in Accessing Portal Administration in Building Portals with Oracle WebCenter Portal.

  2. Click the Deploy icon.

    Note: You will see the Deploy icon only if you are granted the application-level permission Portal Server: Deploy.

  3. In the Comments box, specify any comments related to portal redeployment.

  4. Under Target Portal Server, from the Server Name list, select the connection that was used for deploying deploy the portal.

  5. In the Options section, select the options:

    • Redeploy instead of propagating changes: Select to specify that the portal needs to be redeployed.

    • Include Portal Content: Select to specify that the portal content stored on Content Server must be included in portal redeployment.

    • Include Shared Assets: Deploys shared assets used by the portal. Clear the check box if you do not want to deploy shared assets.

    • Include Shared Libraries: Deploys the shared libraries used by the portal. Clear the check box if you do not want to deploy shared libraries. If you include shared libraries in portal deployment, you must restart the target server after redeploying the portal for shared library changes to be picked up.

    Figure 28-19 Redeploying a Portal

  6. Click Deploy.

    The Deploy Portals dialog displays the progress and status of portal deployment. While the portal is being redeployed, you can choose to work on the portal if required.

  7. Click Close.

  8. If you chose to redeploy shared libraries, restart the target server for the shared libraries changes to take effect. For information, see Starting and Stopping Managed Servers for WebCenter Portal Application Deployments.

1 Security related configuration:Only policy information is included with the connection. The Override set for the security policy is not included so you must configure these parameters post deployment.