Skip Headers
Oracle® Fusion Middleware WebLogic Scripting Tool Command Reference
11g Release 1 (10.3.6)

Part Number E13813-12
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

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

11 Application Development Framework (ADF) Custom WLST Commands

The following sections describe the WLST custom commands and variables in detail. Topics include:

Note:

To use these ADF custom WLST commands, you must invoke the WLST script from the Oracle Common home. See "Using Custom WLST Commands" in the Oracle Fusion Middleware Administrator's Guide.

Overview of WLST Command Categories

Use the ADF-based URL Connections WLST commands to navigate the hierarchy of configuration or runtime beans and control the prompt display. Use the getADFMArchiveConfig command to manage the ADFMArchiveConfig object.

ADF-Specific WLST Commands

Use the commands in Table 11-1 to managing URL-based connections.

Table 11-1 Browse Commands for WLST Configuration

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

adf_createFileUrlConnection

Create a new ADF File connection.

Online or Offline

adf_createHttpUrlConnection

Create a new ADF URL connection.

Online or Offline

adf_setURLConnectionAttributes

Set or edit the attributes of a newly created or existing ADF connection.

Online or Offline

adf_listUrlConnection

List a new URL connection.

Online or Offline

getADFMArchiveConfig

Returns a handle to the ADFMArchiveConfig object for the specified archive.

Online or Offline


adf_createFileUrlConnection

Use with WLST: Online or Offline

Description

Use this command to create a new connection based on the oracle.adf.model.connection.url.FileURLConnection connection class.

Syntax

adf_createFileURLConnection(appName, name, URL)
Argument Definition

appName

Application name for which the connection that will be created.

name

The name of the new connection.

URL

The URL associated with this connection.


Example

adf_createFileURLConnection('myapp','tempDir','/scratch/tmp')

adf_createHttpUrlConnection

Use with WLST: Online or Offline

Description

Use this command to create a new connection based on the oracle.adf.model.connection.url.HttpURLConnection connection type class.

Syntax

adf.createHttpURLConnection (appName, name, [URL], [authenticationType], [realm], [user], [password]
Argument Definition

appName

Application name for which the connection is to be created.

name

The name of the new connection.

url

(Optional) The URL associated with this connection.

authenticationType

(Optional) The default is basic.

realm

(Optional) If this connection deals with authentication, then this should be set. The default is basic.

user

(Optional)

password

(Optional)


Example

adf_createHttpURLConnection('myapp','cnn','http://www.cnn.com') 

adf_setURLConnectionAttributes

Use with WLST: Online or Offline

Description

Use this command to set or edit the attributes of a newly created or existing ADF connection.

Syntax

adf_setURLConnectionAttributes(appname, connectionname, attributes)
Argument Definition

appname

Application name for which the connection that will be created.

connectionname

The name of the new connection.

attributes

The array containing attributes to set in key/value pairs.


Example

adf_setURLConnectionAttributes ('myapp','cnn','ChallengeAuthenticationType:digest',
'AuthenticationRealm:XMLRealm'

adf_listUrlConnection

Use with WLST: Online or Offline

Description

Use this command to list the connections of the application.

Syntax

adf_listURLConnection(appname)
Argument Definition

appname

Application name


Example

adf_listURLConnection ('myapp')

getADFMArchiveConfig

Use with WLST: Online or Offline.

Description

Returns a handle to the ADFMArchiveConfig object for the specified archive. The returned ADFMArchiveConfig object's methods can be used to change application configuration in an archive.

The ADFMArchiveConfig object provides the following methods:

  • setDatabaseJboSQLBuilder([value])—Sets the Database jbo.SQLBuilder attribute.

  • getDatabaseJboSQLBuilder()—Returns the current value of the jbo.SQLBuilder attribute.

  • setDatabaseJboSQLBuilderClass([value])—Sets the Database jbo.SQLBuilderClass attribute. Value is the full name of the custom builder class.

  • getDatabaseJboSQLBuilderClass()—Returns the current value of the jbo.SQLBuilderClass attribute.

  • setDefaultRowLimit([value])—Sets the defaults rowLimit attribute. Value is a long specifying the row limit (Default -1).

  • getDefaultRowLimit()—Returns the current value of the rowLimit attribute.

  • save([toLocation])—If you specify the toLocation, then the changes will be stored in the target archive file and the original file will remain unchanged. Otherwise, the changes will be saved in the original file itself.

Syntax

archiveConfigObject = ADFMAdmin.getADFMArchiveConfig(fromLocation)
Argument Definition
fromLocation 

The name of the ear file, including its complete path.


The syntax for setDatabaseJboSQLBuilder([value]) is:

archiveConfigObject.setDatabaseJboSQLBuilder([value])
Argument Definition
value 

The value of the jbo.SQLBuilder attribute. Valid values are: 'Oracle' (Default), 'OLite', 'DB2', 'SQL92', 'SQLServer', or 'Custom. If 'Custom' is specified, then the jbo.SQLBuilderClass attribute should also be set.


The syntax for getDatabaseJboSQLBuilder() is:

archiveConfigObject.getDatabaseJboSQLBuilder()

The syntax for setDatabaseJboSQLBuilderClass([value]) is:

archiveConfigObject.setDatabaseJboSQLBuilderClass([value])
Argument Definition
value 

The value of the jbo.SQLBuilderClass attribute.


The syntax for getDatabaseJboSQLBuilderClass) is:

archiveConfigObject.getDatabaseJboSQLBuilderClass()

The syntax for setDefaultRowLimit([value]) is:

archiveConfigObject.setDefaultRowLimit([value])
Argument Definition
value 

The value of the rowLimit attribute.


The syntax for getDefaultRowLimit() is:

archiveConfigObject.getDefaultRowLimit([value])

The syntax for save([toLocation]) is:

archiveConfigObject.save([toLocation])
Argument Definition
toLocation

The file name along with the absolute path to store the changes.


Example

In the following example. the jbo.SQLBuilder attribute is set to 'DB2'.

wls:/offline> archive =
               ADFMAdmin.getADFMArchiveConfig(fromLocation='/tmp/testArchive.ear')
wls:/offline> archive.setDatabaseJboSQLBuilder(value='DB2') 
wls:/offline> archive.save() 

In the following example, the jbo.SQLBuilder attribute is removed so that application default is used.

wls:/offline> archive =
              ADFMAdmin.getADFMArchiveConfig(fromLocation='/tmp/testArchive.ear')
wls:/offline> archive.setDatabaseJboSQLBuilder()
wls:/offline> archive.save(toLocation='/tmp/targetArchive.ear')

In the following example, the jbo.SQLBuilder attribute is set to 'Custom', and the jbo.SQLBuilderClass attribute is set to the class 'com.example.CustomBuilder'.

wls:/offline> archive =
              ADFMAdmin.getADFMArchiveConfig(fromLocation='/tmp/testArchive.ear')
wls:/offline> archive.setDatabaseJboSQLBuilder('Custom') 
wls:/offline> archive.setDatabaseJboSQLBuilderClass('com.example.CustomBuilder') 
wls:/offline> archive.save(toLocation='/tmp/targetArchive.ear')

In the following example, the rowLimit attribute is set to 100.

wls:/offline> archive = getADFMArchiveConfig(fromLocation='/tmp/testArchive.ear')
wls:/offline> archive.setDefaultRowLimit(100)
wls:/offline> archive.save(toLocation='/tmp/targetArchive.ear')