5 Application Development Framework (ADF) Custom WLST Commands
Topics include:
Overview of ADF 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.
Note:
ADF-specific WLST commands can be used with WLST either online, offline, or both. Offline WLST commands are not supported from Maven.
ADF-Specific WLST Commands
Use the commands in the following sections to manage URL-based connections.
- adf_createFileUrlConnection
This command is used to create a new ADF File connection. - adf_deleteURLConnection
This command is used to delete an ADF URL connection. - adf_createHttpUrlConnection
This command is used to create a new ADF URL connection. - adf_setURLConnectionAttributes
This command is used to set or edit the attributes of a newly created or existing ADF connection. - adf_listUrlConnection
This command lists a new URL connection. - getADFMArchiveConfig
This command is used to return a handle to theADFMArchiveConfig
object for the specified archive. - exportJarVersions
This command is used to export CSV format of JARs versions from currentORACLE_HOME
at a specified location. - exportApplicationJarVersions
This command is used to export CSV format of runtime JARs versions of a specified application at a specified location. - exportApplicationSelectedJarVersions
This command is used to export CSV format of JARs versions of selected jars at a specified location in coordination with theVersions.xml
file. - createWebServiceConnection
This command is used to create a Web service connection for an ADF application. - listWebServiceConnection
This command lists Web service connection for an ADF application. - deleteWebServiceConnection
This command is used to delete a Web service connection for an ADF application. - listUpgradeHandlers
This command lists all upgrade handlers of an application. - upgradeADFMetadataApp
This command is used to upgrade registered ADF Metadata of an application. - upgradeADFMetadataAppHandlers
This command is used to upgrade selected registered ADF Metadata of an application. - upgradeADFMetadata
This command is used to upgrade all registered ADF Metadata of all the applications. - upgradeADFMetadataHandlers
This command is used to upgrade selected registered ADF Metadata of all the applications.
adf_createFileUrlConnection
This command is used to create a new ADF File connection.
Use with WLST: Online.
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 |
---|---|
|
Application name for which the connection that will be created. |
|
The name of the new connection. |
|
The URL associated with this connection. |
Example
adf_createFileURLConnection('myapp','tempDir','/scratch/tmp')
Parent topic: ADF-Specific WLST Commands
adf_deleteURLConnection
This command is used to delete an ADF URL connection.
Use with WLST: Online.
Description
Use this command to delete an ADF URL connection.
Syntax
adf_deleteURLConnection(appName, name)
Argument | Definition |
---|---|
|
Application name for which the connection will be deleted. |
|
The name of the connection to be deleted. |
Example 5-1 Example
adf_deleteURLConnection('myApp', 'mycompany')
Parent topic: ADF-Specific WLST Commands
adf_createHttpUrlConnection
This command is used to create a new ADF URL connection.
Use with WLST: Online.
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 |
---|---|
|
Application name for which the connection is to be created. |
|
The name of the new connection. |
|
(Optional) The URL associated with this connection. |
|
(Optional) The default is basic. |
|
(Optional) If this connection deals with authentication, then this should be set. The default is basic. |
|
(Optional) |
|
(Optional) |
Example
adf_createHttpURLConnection('myapp','cnn','http://www.cnn.com')
Parent topic: ADF-Specific WLST Commands
adf_setURLConnectionAttributes
This command is used to set or edit the attributes of a newly created or existing ADF connection.
Use with WLST: Online.
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 |
---|---|
|
Application name for which the connection that will be created. |
|
The name of the new connection. |
|
The array containing attributes to set in key/value pairs. |
Example
adf_setURLConnectionAttributes ('myapp','cnn','ChallengeAuthenticationType:digest', 'AuthenticationRealm:XMLRealm'
Parent topic: ADF-Specific WLST Commands
adf_listUrlConnection
This command lists a new URL connection.
Use with WLST: Online.
Description
Use this command to list the connections of the application.
Syntax
adf_listURLConnection(appname)
Argument | Definition |
---|---|
|
Application name |
Example
adf_listURLConnection ('myapp')
Parent topic: ADF-Specific WLST Commands
getADFMArchiveConfig
This command is used to return a handle to the ADFMArchiveConfig
object for the specified archive.
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 Databasejbo.SQLBuilder
attribute. -
getDatabaseJboSQLBuilder()
—Returns the current value of thejbo.SQLBuilder
attribute. -
setDatabaseJboSQLBuilderClass([value])
—Sets the Databasejbo.SQLBuilderClass
attribute. Value is the full name of the custom builder class. -
getDatabaseJboSQLBuilderClass()
—Returns the current value of thejbo.SQLBuilderClass
attribute. -
setDefaultRowLimit([value])
—Sets the defaultsrowLimit
attribute. Value is a long specifying the row limit (Default -1). -
getDefaultRowLimit()
—Returns the current value of therowLimit
attribute. -
save([toLocation])
—If you specify thetoLocation
, 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 |
---|---|
|
The name of the ear file, including its complete path. |
The syntax for setDatabaseJboSQLBuilder([value])
is:
archiveConfigObject.setDatabaseJboSQLBuilder([value])
Argument | Definition |
---|---|
|
The value of the |
The syntax for getDatabaseJboSQLBuilder()
is:
archiveConfigObject.getDatabaseJboSQLBuilder()
The syntax for setDatabaseJboSQLBuilderClass([value])
is:
archiveConfigObject.setDatabaseJboSQLBuilderClass([value])
Argument | Definition |
---|---|
|
The value of the |
The syntax for getDatabaseJboSQLBuilderClass)
is:
archiveConfigObject.getDatabaseJboSQLBuilderClass()
The syntax for setDefaultRowLimit([value])
is:
archiveConfigObject.setDefaultRowLimit([value])
Argument | Definition |
---|---|
|
The value of the |
The syntax for getDefaultRowLimit()
is:
archiveConfigObject.getDefaultRowLimit([value])
The syntax for save([toLocation])
is:
archiveConfigObject.save([toLocation])
Argument | Definition |
---|---|
|
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')
Parent topic: ADF-Specific WLST Commands
exportJarVersions
This command is used to export CSV format of JARs versions from current ORACLE_HOME
at a specified location.
Use with WLST: Offline.
Description
Use to export CSV format of jars versions from current ORACLE_HOME
at a specified location. Exported jars versions information can be opened in Oracle OpenOffice or MS Excel.
Syntax
exportJarVersions(path)
Argument | Definition |
---|---|
|
Location to extract jars versions. |
Example
This example shows how jars versions are exported to /tmp/export-MyApp-Versions.csv.
R/W
privileges for the CSV file need to be verified.
wls:/offline>exportJarVersions('/tmp/export-MyApp-Versions.csv')
Parent topic: ADF-Specific WLST Commands
exportApplicationJarVersions
This command is used to export CSV format of runtime JARs versions of a specified application at a specified location.
Use with WLST: Online.
Description
Used to export CSV format of runtime jars versions of a specified application at a specified location.
Syntax
exportApplicationJarVersions
(application
Name,path
)
Argument | Definition |
---|---|
|
Application name to export jars versions |
|
Location to export jars versions. |
Example
This example shows how MyApp runtime jars versions are exported to /tmp/export-MyApp-Versions.csv
. R/W
privileges for the CSV file need to be verified.
wls:/DefaultDomain/serverConfig>exportApplicationJarVersions('MyApp', '/tmp/export-MyApp-Versions.csv')
Parent topic: ADF-Specific WLST Commands
exportApplicationSelectedJarVersions
This command is used to export CSV format of JARs versions of selected jars at a specified location in coordination with the Versions.xml
file.
Use with WLST: Online.
Description
Used to export CSV format of jars versions of selected jars at a specified location.
Syntax
exportApplicationSelectedJarVersions(applicationName, path, jarsLocation)
Argument | Definition |
---|---|
|
Application name to export JARs versions. |
|
Location to extract jars versions. |
|
Optional list of selected JARs. If not specified, default JARs runtime version list from If the |
Example
This example shows how JARs versions are exported to /tmp/export-MyApp-Versions.csv
using the selectedJars
property of the Versions.xml
file. In this case, since the jarsLocation
parameter is not specified, the libraries listed in the selectedJars
property of the Versions.xml
file will be exported. R/W
privileges for the CSV file need to be verified.
wls:/offline>exportApplicationSelectedJarVersions('MyApp', '/tmp/export-MyApp-Versions.csv') Versions.xml <Diagnostics xmlns="xmlns.oracle.com/adf/diagnostics"> <Versions xmlns="xmlns.oracle.com/adf/diagnostics/versions" exportVersionsOnApplicationStartup="true" selectedJars="$ORACLE_HOME$/modules/oracle.adf.model_11.1.1/adfm.jar; $ORACLE_HOME$/modules/oracle.adf.view_11.1.1/adf-richclient-impl-11.jar; $ORACLE_HOME$/modules/oracle.adf.controller_11.1.1/adf-controller.jar; $ORACLE_HOME$/modules/oracle.adf.pageflow_11.1.1/adf-pageflow-impl.jar; $ORACLE_HOME$/modules/oracle.adf.share_11.1.1/adf-share-support.jar; $ORACLE_HOME$/modules/oracle.mds_11.1.1/mdsrt.jar" /> </Diagnostics>
This example shows how JARs versions are exported to /tmp/export-MyApp-Versions.csv
using the jarsLocation
parameter. In this case, the libraries passed explicitly in the jarsLocation
parameter will be exported. R/W
privileges for the CSV file need to be verified.
wls:/offline>exportApplicationSelectedJarVersions('MyApp', '/tmp/export-MyApp-Versions.csv', '$ORACLE_HOME$/modules/oracle.adf.model_11.1.1/adfm.jar;$ORACLE_HOME$/modules/oracle.adf.view_11.1.1/adf-richclient-impl-11.jar')
Parent topic: ADF-Specific WLST Commands
createWebServiceConnection
This command is used to create a Web service connection for an ADF application.
Use with WLST: Online.
Description
Used to create a Web Service connection for an ADF application.
Returns a set of service name and port names in the format {serviceName
: List of portName
}.
For example: {'PolicyReferenceEchoBeanService': array(java.lang.String,['PolicyReferenceEchoBeanPort'])}
Syntax
createWebServiceConnection(appName, wsConnName, wsdlUrlStr, readerProps)
Argument | Definition |
---|---|
|
Name of the ADF application for which you want to create a Web service connection. |
|
Name of the new Web service connection. |
|
Name of the service WSDL URL string. |
|
The optional WSDL reader properties. For example: '["wsdl.reader.proxy.host=proxy.my.com", "wsdl.reader.proxy.port=80"]' |
Example
This example shows how to create a Web service connection for an ADF application myapp
, with a Web service connection mywsconn
, and a WSDL URL string of http://myserver/myservice?WSDL
.
createWebServiceConnection('myapp','mywsconn','http://myserver/myservice?WSDL')
Parent topic: ADF-Specific WLST Commands
listWebServiceConnection
This command lists Web service connection for an ADF application.
Use with WLST: Online.
Description
Used to list the Web service connections associated with an ADF application.
Syntax
listWebServiceConnection(appName)
Argument | Definition |
---|---|
|
Name of the ADF application for which you want to list its Web service connections. |
Example
This example shows how list the Web service connections for the application myapp
.
listWebServiceConnection('myapp')
Parent topic: ADF-Specific WLST Commands
deleteWebServiceConnection
This command is used to delete a Web service connection for an ADF application.
Use with WLST: Online.
Description
Used to delete a Web service connection associated with an ADF application.
Syntax
listWebServiceConnection(appName, weConnName)
Argument | Definition |
---|---|
|
Name of the ADF application for which you want to delete a Web service connection. |
|
Name of the Web service connection you want to delete. |
Example
This example shows how delete the Web service connection mywsconn
from the application myapp
.
deleteWebServiceConnection('myapp','mywsconn')
Parent topic: ADF-Specific WLST Commands
listUpgradeHandlers
This command lists all upgrade handlers of an application.
Use with WLST: Online.
Description
Used to list all upgrade handlers of an application.
Syntax
listUpgradeHandlers(application
Name)
Argument | Definition |
---|---|
|
Application name to list upgrade handlers. |
Example
In the following example, MyApp
upgrade handlers are listed.
wls:/DefaultDomain/serverConfig>listUpgradeHandlers('MyApp')
Parent topic: ADF-Specific WLST Commands
upgradeADFMetadataApp
This command is used to upgrade registered ADF Metadata of an application.
Use with WLST: Online.
Description
Used to upgrade all registered ADF Metadata of an application.
Syntax
upgradeADFMetadataApp(applicationName,siteCC)
Argument | Definition |
---|---|
|
Application name to upgrade handlers. |
|
Site Customization Class name. |
Example
In the following example, all registered ADF Metadata of the application are upgraded.
wls:/DefaultDomain/serverConfig>upgradeADFMetadataApp('MyApp','oracle.apps.fnd.applcore.customization.SiteCC')
Parent topic: ADF-Specific WLST Commands
upgradeADFMetadataAppHandlers
This command is used to upgrade selected registered ADF Metadata of an application.
Use with WLST: Online.
Description
Used to upgrade selected registered ADF Metadata of an application.
Syntax
upgradeADFMetadataAppHandlers(applicationName,sitecc,handlers)
Argument | Definition |
---|---|
|
Application name to upgrade handlers. |
|
Site Customization Class name. |
|
Registered handlers to be updated. |
Example
In the following example, selected registered ADF Metadata of the application are upgraded.
wls:/DefaultDomain/serverConfig>upgradeADFMetadataAppHandlers('MyApp','oracle.apps.fnd.applcore.customization.SiteCC','http://xmlns.oracle.com/adf/metadataUpgrade/bc4j/propertiesUpgrade')
Parent topic: ADF-Specific WLST Commands
upgradeADFMetadata
This command is used to upgrade all registered ADF Metadata of all the applications.
Use with WLST: Online.
Description
Used to upgrade all registered ADF Metadata of all the applications.
Syntax
upgradeADFMetadata(siteCC)
Argument | Definition |
---|---|
|
Site Customization Class name. |
Example
In the following example, all registered ADF Metadata of all the applications are upgraded.
wls:/DefaultDomain/serverConfig>upgradeADFMetadata('oracle.apps.fnd.applcore.customization.SiteCC')
Parent topic: ADF-Specific WLST Commands
upgradeADFMetadataHandlers
This command is used to upgrade selected registered ADF Metadata of all the applications.
Use with WLST: Online.
Description
Used to upgrade selected registered ADF Metadata of all the applications.
Syntax
upgradeADFMetadataHandlers(sitecc,handlers)
Argument | Definition |
---|---|
|
Site Customization Class name. |
|
Registered handlers to be updated. |
Example
In the following example, selected registered ADF Metadata of all the applications are upgraded.
wls:/DefaultDomain/serverConfig>upgradeADFMetadataHandlers('oracle.apps.fnd.applcore.customization.SiteCC','http://xmlns.oracle.com/adf/metadataUpgrade/bc4j/propertiesUpgrade')
Parent topic: ADF-Specific WLST Commands
Using ADF-Specific WLST Commands with Maven
The ADF-specific WLST commands can be used with Maven.
To load a set of custom ADF-specific WLST commands, the com.oracle.adf
groupID and the adf-wlst-dependencies
artifactId must be specified in the POM's <build> section for the weblogic-maven-plugin as follows:
<?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>com.test</groupId> <artifactId>wlst-test</artifactId> <version>1.0-SNAPSHOT</version> <build> <plugins> <plugin> <groupId>com.oracle.weblogic</groupId> <artifactId>weblogic-maven-plugin</artifactId> <version>12.1.4-0-0</version> <executions> <execution> <phase>compile</phase> <goals> <goal>wlst-client</goal> </goals> <configuration> <fileName>${project.basedir}/misc/test.py</fileName> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>com.oracle.adf</groupId> <artifactId>adf-wlst-dependencies</artifactId> <version>12.1.4-0-0</version> </dependency> </dependencies> </plugin> </plugins> </build> </project>