12 Portal Custom WLST Commands

Portal custom WLST commands are extensions to the WLST commands and are specific to Oracle Portal. Table 12-1 lists the Portal custom WLST command categories.

For additional information about administration and configuration of Portal, see the Oracle Portal Configuration Guide.

Note:

To use these commands, you must invoke WLST from the Oracle home in which the component has been installed. See "Using Custom WLST Commands" in the Oracle Fusion Middleware Administrator's Guide.

Table 12-1 Portal WLST Command Categories

Command category Description

Database Access Descriptor Commands

Create, edit, or delete a general DAD or Portal DAD.

Configuration Commands

The Configuration commands:

  • List and update the WebCache configuration and Oracle Internet Directory data

  • Configure the Portal cache, Portal Page Engine, and Portal mid-tier

  • List Portal site configuration.


Database Access Descriptor Commands

A Database Access Descriptor (DAD) is a set of values that specify how an application connects to an Oracle database to fulfill an HTTP request. The information in the DAD includes the user name (which also specifies the schema and the privileges), password, connect string, and globalization support language of the database.

There are two types of DADs: general DAD and portal DAD. An Oracle Portal middle tier uses a Portal DAD to access the Oracle Metadata Repository. For information about general DADs, refer to the Oracle Fusion Middleware Administrator's Guide for Oracle HTTP Server.

Use the Database Access Descriptor commands listed in Table 12-2 to create, edit, or delete a Portal DAD from the WLST command-line scripting interface. Based on your actions, the portal_dads.conf file is updated.

Table 12-2 Database Access Descriptor Commands for Portal WLST Configuration

Use this command... To... Use with WLST...

listDads

List the parameters used by the Database Access Descriptors for configuration.

Online

createPortalDad

Create a Portal Database Access Descriptor.

Online

updatePortalDad

Update the attributes of a Portal Database Access Descriptor.

Online

deletePortalDad

Delete a Portal Database Access Descriptor.

Online


listDads

Command Category: Database Access Descriptor Commands

Use with WLST: Online

Description

Lists the parameters specified in all the Database Access Descriptors (both general DADs and Portal DADs).

Syntax

listDads ()

Example

The following example lists the various DADs in the domain.

listDads()
------------
/pls/portal1
Schema: h1user
Connect String: foo.oracle.com:1521:orcl
NLS Language: "AMERICAN_AMERICA.AL32UTF8"

createPortalDad

Command Category: Database Access Descriptor Commands

Use with WLST: Online

Description

Creates a Portal Database Access Descriptor.

Syntax

createPortalDad (name, schema, password, [connect_string], nls_language)
Argument Definition
name
Name of the Database Access Descriptor.
schema
The Portal database account user name.
password
The Portal database account password.
connect_string
Optional. The connection string used to connect to a remote database.

Connect string may be host name: port number: connect string. The connect string format may be ServiceNameFormat (host:port:database_service_name), SIDFormat (host:port:database_sid), or TNSFormat (TNS alias or the whole TNS entry).

nls_language
The globalization support language of the Portal database that is represented by this DAD. This setting overrides the NLS_LANG environment variable for a database session and defines some important globalization support properties of the response, including the response character set.

Make sure that this language setting matches the NLS_LANG of the back-end database.


Example

The following example creates the portal1 Portal DAD based on the specified arguments.

createPortalDad(name='portal1',schema='schema',password='welcome1',connect_
string='foo.oracle.com:1521:orcl',nls_language='AMERICAN_AMERICA.AL32UTF8')

updatePortalDad

Command Category: Database Access Descriptor Commands

Use with WLST: Online

Description

Updates the attributes of the Portal Database Access Descriptor.

Syntax

updatePortalDad (name, [schema], [password], [connect_string], [nls_language])
Argument Definition
name
Name of the Database Access Descriptor. This name cannot be changed during update.
schema
Optional. The Portal database account user name.
password
Optional. The Portal database account password.
connect_string
Optional. The connection string used to connect to a remote database.

Connect string may be host name: port number: connect string. The connect string format may be ServiceNameFormat (host:port:database_service_name), SIDFormat (host:port:database_sid), or TNSFormat (TNS alias or the whole TNS entry).

nls_language
Optional. The globalization support language of the Portal database that is represented by this DAD. This setting overrides the NLS_LANG environment variable for a database session and defines some important Globalization Support properties of the response, including the response character set. Make sure that this language setting matches the NLS_LANG of the back-end database.

Example

The following example updates the portal1 Portal DAD based on the specified arguments.

updatePortalDad(name='portal1',schema='user1',password='welcome2',connect_
string='foo.oracle.com:1521:orcl',nls_language='AMERICAN_AMERICA.AL32UTF8')

deletePortalDad

Command Category: Database Access Descriptor Commands

Use with WLST: Online

Description

Deletes a Portal Database Access Descriptor.

Syntax

deletePortalDad(name)
Argument Definition
name
Name of the Portal Database Access Descriptor.

Example

The following example deletes the portal1 Portal DAD entry from the portal_dads.conf file.

deletePortalDad(name='portal1')

Configuration Commands

Use the Configuration commands in Table 12-3 to view and configure Portal cache, WebCache, Oracle Internet Directory data and so on.

Table 12-3 Configuration Commands for the Portal WLST Configuration

Use this command... To... Use with WLST...

configurePortalCache

Update the attributes of the Portal cache.

Online

configurePortalPageEngine

Update the attributes of the Portal mid-tier.

Online

listPortalWebcacheConfigAttributes

List the attributes of WebCache configuration.

Online

listPortalSiteConfigAttributes

List the attributes of Portal site configuration.

Online

listPortalOIDConfigAttributes

List the attributes of Oracle Internet Directory configuration.

Online

setPortalWebcacheConfig

Update the attributes of the WebCache configuration.

Online

setPortalOIDConfig

Update the attributes of the Oracle Internet Directory configuration.

Online

setPortalMidtierConfig

Update the attributes of the Portal mid-tier configuration.

Online


configurePortalCache

Command Category: Configuration Commands

Use with WLST: Online

Description

Portal cache is a file system-based cache for Oracle Portal pages and portlets. Portal cache supports validation-based caching and expiry-based caching. Portal cache consists of both Portal content cache and session cache.

This command updates the attributes of the Portal cache. These configuration details are maintained in the <Middleware Home>/user_projects/domains/<DOMAIN_HOME>/servers/WLS_PORTAL/stage/portal/portal/configuration/portal_cache.conf file.

Syntax

configurePortalCache([enable], [directory], [total_size], [max_size], 
[cleanup_time], [max_age])
Argument Definition
enable
Optional. Enables (On) or disables (Off) portal content and session caching.
directory
Optional. The directory where cached content is stored.

Make sure that this directory exists and has read-write access.

total_size
Optional. The total amount of disk space (in megabytes) that the Portal cache may use. The maximum value allowed is 4 GB.
max_size
Optional. The maximum size (in bytes) for all cached files. The maximum value allowed is 4 GB.Any dynamically generated content that exceeds this limit is not cached.
cleanup_time
Optional. The time at which to start the cleanup of the cache storage. Use the [Sunday-Saturday, Everyday, Everymonth][hh:mm] format to define the exact day and time in which cleanup should occur.
max_age
Optional. Maximum age of a single cached document. This setting ensures the cache system does not contain any old content. Old cache files are removed to make space for new cache files. The default is 30 days.

Example

The following example configures the Portal cache.

configurePortalCache(enable=true,directory='/scratch/user/installs/Inst_1
/cache/PortalComponent/portal',total_size=10101010,max_size=12300033,cleanup_
time='Everyday 11:00',max_age=20)

configurePortalPageEngine

Command Category: Configuration Commands

Use with WLST: Online

Description

The Oracle Fusion Middleware Portal architecture is designed around a three-tier architecture that allows any browser to connect to it. This flexible architecture allows each component (browser, Oracle HTTP Server listener, Oracle Database 11g, and Oracle Portal) to be upgraded individually as required.

A part of the Oracle Portal middle tier, the Parallel Page Engine (PPE) is a servlet that runs under Oracle Containers for J2EE and services page requests. The PPE reads page metadata, calls providers for portlet content, accepts provider responses, and assembles the requested page in the specified page layout.

This command updates the properties in the appConfig.xml file, the configuration file that is used by the Portal mid-tier repository servlet. This configuration file is located in the $MWHOME/user_projects/domains/AllClassicDomain/servers/WLS_PORTAL/stage/portal/portal/configuration/ directory.

Syntax

configurePortalPageEngine([encrypt_key], [resource_url_key], [use_port], [use_
scheme], [x509certfile])
Argument Definition
encrypt_key
Optional. Specifies the HMCA key to obscure the headers used for caching using WebCache. This allows for a more secure cache key, and makes retrieving a cached object by unwanted requests more difficult.
resource_url_key
Optional. This key, used by the PPE servlet, calculates checksums for URLs that are requested by WSRP and JPDK resource proxying. For WSRP resource proxying to work, the key must be set to an alpha-numeric value of 10 characters or more. In addition, for JPDK proxying, a JNDI environment variable, also called resourceUrlKey, must be set for the provider.
use_port
Optional. Overrides the port used when the PPE makes requests to the portal. The default, if not specified, is to always use the page request port. Note that if you set useScheme, you must also set the usePort argument.

This may be used for other reasons, but mostly it is used when SSL is running between the browser and the PPE but not between the PPE and Portal. In this case, the non-SSL port for loop back requests will be different from the SSL port used by the browser.

use_scheme
Optional. Overrides the scheme (HTTP or HTTPS) used when the PPE makes requests to the Portal. The default, if not specified, is to always use the page request scheme. Note that if you set useScheme, you must also set the usePort argument.
x509certfile
Optional. Specifies a file containing a list of certificates to be implicitly trusted by HTTPClient. These certificates are added as trust points to all connections made by HTTPClient using SSL.

Example

The following example updates the Portal page engine based on the specified arguments.

configurePortalPageEngine(encrypt_key='encryption key',resource_url_
key='foo.oracle.com',use_port=9999,use_scheme='page_engine_1',
x509certfile='file')

listPortalWebcacheConfigAttributes

Command Category: Configuration Commands

Use with WLST: Online

Description

Lists the attributes of WebCache configuration used by the Portal repository.

Syntax

listPortalWebcacheConfigAttributes ([dad_name])
Argument Definition
dad_name
Optional. Name of the Database Access Descriptor. Default DAD name is 'portal'.

Example

The following example lists the WebCache configuration used by the Portal repository. The WebCache host name to which the invalidation messages are sent, the invalidation user name, password and the invalidation port to which the invalidation messages are sent are listed.

listPortalWebcacheConfigAttributes(dad_name='portal1')listPortalWebcacheConfigAttributes('portal1')
---------------
WebCacheConfig
---------------
WebCache Host: foo.oracle.com
WebCache Invalidation Password: invalidator
WebCache Invalidation Port: 6523
WebCache Invalidation User: invalidator

listPortalSiteConfigAttributes

Command Category: Configuration Commands

Use with WLST: Online

Description

Lists the attributes of the Portal site configuration.

Syntax

listPortalSiteConfigAttributes ([dad_name])
Argument Definition
dad_name
Optional. Name of the Database Access Descriptor. Default DAD name is 'portal'.

Example

The following example lists the Portal site configuration. Site protocol can be true or false. HTTP is the protocol when site protocol is false and HTTPS is the protocol when the site protocol is true. The site host name and port number are also listed.

listPortalSiteConfigAttributes(dad_name='portal1')
listPortalSiteConfigAttributes('portal1')
 
---------------
SiteConfig
---------------
Site Protocol: false
Site Host: foo.oracle.com
Site Port: 8090

listPortalOIDConfigAttributes

Command Category: Configuration Commands

Use with WLST: Online

Description

Lists the attributes of the Oracle Internet Directory configuration.

Syntax

listPortalOIDConfigAttributes ([dad_name])
Argument Definition
dad_name
Optional. Name of the Database Access Descriptor. Default DAD name is 'portal'.

Example

The following example lists the Oracle Internet Directory data, which includes the Oracle Internet Directory host name and port number.

listPortalOIDConfigAttributes(dad_name='portal1')
listPortalOIDConfigAttributes('portal1')
 
---------------
OidConfig
---------------
OID Port: 13060
OID Host: foo.oracle.com

setPortalWebcacheConfig

Command Category: Configuration Commands

Use with WLST: Online

Description

WebCache offers caching, page assembly, and compression features. Oracle WebCache accelerates the delivery of both static and dynamic Web content, and provides load balancing and failover features for Oracle Fusion Middleware.

This command updates the WebCache configuration.

Syntax

setPortalWebcacheConfig([dad_name], [host], [inv_port], [inv_user], 
[inv_passwd])
Argument Definition
dad_name
Optional. Name of the Database Access Descriptor. Default DAD name is 'portal'.
host
Optional. The name of the WebCache host to which invalidation messages are sent.
inv_port
Optional. The WebCache port number to which invalidation messages are sent.
inv_user
Optional. The user name used for sending the invalidation messages.
inv_password
Optional. WebCache invalidation password.

Example

The following example updates the WebCache configuration based on the specified values.

setPortalWebcacheConfig(dad_name='portal1',host='foo.oracle.com',
inv_port= '6523',inv_user= 'invalidator',inv_passwd=' invalidator')

setPortalOIDConfig

Command Category: Configuration Commands

Use with WLST: Online

Description

Updates the attributes of the Oracle Internet Directory configuration.

Syntax

setPortalOIDConfig ([dad_name], [host], [port], [protocol], [admin_user], 
[admin_passwd])
Argument Definition
dad_name
Optional. Name of the Database Access Descriptor. Default DAD name is 'portal'.
host
Optional. Oracle Internet Directory host name.
port
Optional. Oracle Internet Directory port number.
protocol
Optional. Oracle Internet Directory protocol.
admin_user
Optional. Oracle Internet Directory administrator's name.
admin_passwd
Optional. Oracle Internet Directory administrator's password.

Example

The following example updates the OID configuration based on the specified values.

setPortalOIDConfig(dad_name='portal1',
host='foo.oracle.com',port='13060',protocol=false,
admin_user='cn=orcladmin',admin_passwd='oracle1')

setPortalMidtierConfig

Command Category: Configuration Commands

Use with WLST: Online

Description

Updates the Portal repository with the latest Portal mid-tier configuration.

Syntax

setPortalMidtierConfig([dad_name], [ohs_host], [ohs_port], [ohs_protocol], 
[webcache_host], [webcache_inv_user], [webcache_inv_port], 
[webcache_inv_passwd])
Argument Definition
dad_name
Optional. Name of the Database Access Descriptor. Default DAD name is 'portal'.
ohs_host
Optional. Oracle HTTP Server host name.
ohs_port
Optional. Oracle HTTP Server port number.
ohs_protocol
Optional. Oracle HTTP Server protocol.
webcache_host
Optional. The name of the WebCache host to which invalidation messages are sent.
webcache_inv_user
Optional. The WebCache user name used for sending the invalidation messages.
webcache_inv_port
Optional. The WebCache port number to which invalidation messages are sent.
webcache_inv_passwd
Optional. WebCache invalidation password.

Example

The following example updates the Portal mid-tier configuration based on the specified values.

setPortalMidtierConfig(dad_name='portal1',ohs_host='foo.oracle.com',
ohs_port='8090',ohs_protocol=false,webcache_host='foo.oracle.com',
webcache_inv_user= 'invalidator',webcache_inv_port='6523',
webcache_inv_passwd='invalidator')