toolbox.oracle.osb.config
Class OSBConfigUtil

java.lang.Object
  extended by toolbox.oracle.osb.config.OSBConfigUtil

public class OSBConfigUtil
extends java.lang.Object

OSB Configuration utility capable of importing and exporting projects, folders and resources to and from Oracle Service Bus.

Author:
Hannes Holtzhausen

Constructor Summary
OSBConfigUtil(java.lang.String host, java.lang.String port, java.lang.String user, java.lang.String passwd, java.lang.String proto, java.lang.String jndiPrefix)
          Construct a new OSBConfigUtil instance.
 
Method Summary
 void executeXML(OSBConfigData data)
          Execute the given XML customisation data provided.
 OSBConfigData exportProjects(java.util.List projectList, boolean generateXML)
          Export the list of projects provided.
 OSBConfigData exportResources(java.lang.String resourceType, java.util.List resourceList, boolean generateXML)
          Export the list of folders or proxies provided.
 void importResources(OSBConfigData data)
          Import the given configuration data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSBConfigUtil

public OSBConfigUtil(java.lang.String host,
                     java.lang.String port,
                     java.lang.String user,
                     java.lang.String passwd,
                     java.lang.String proto,
                     java.lang.String jndiPrefix)
Construct a new OSBConfigUtil instance.

Parameters:
host - String containing OSB admin server host name.
port - String containing OSB admin server port number.
user - String containing user name.
passwd - String containing password.
proto - String containg protocol that must be used to connect to WebLogic Server. Default t3. Can be null.
jndiPrefix - String containing the JNDI prefix. Default /jndi/. Can be null.
Method Detail

exportResources

public OSBConfigData exportResources(java.lang.String resourceType,
                                     java.util.List resourceList,
                                     boolean generateXML)
                              throws OSBConfigUtilException
Export the list of folders or proxies provided.

Parameters:
resourceType - String indicating wether "folder" or "proxy" resources must be exported.
resourceList - List containing resources to export.
generateXML - Flag to indicate whether XML customisation data must be generated.
Returns:
OSBConfigData instance containing resource configuration.
Throws:
OSBConfigUtilException - if the data cannot be exported.

exportProjects

public OSBConfigData exportProjects(java.util.List projectList,
                                    boolean generateXML)
                             throws OSBConfigUtilException
Export the list of projects provided.

Parameters:
projectList - List containing the projects to export.
generateXML - Flag to indicate whether XML customisation data must be generated.
Returns:
OSBConfigData instance containing resource configuration.
Throws:
OSBConfigUtilException - if the data cannot be exported.

importResources

public void importResources(OSBConfigData data)
                     throws OSBConfigUtilException
Import the given configuration data.

Parameters:
data - OSBConfigData instance containing resource and XML customisation data.
Throws:
OSBConfigUtilException - if the data cannot be imported.

executeXML

public void executeXML(OSBConfigData data)
                throws OSBConfigUtilException
Execute the given XML customisation data provided.

Parameters:
data - OSBConfigData instance containing XML customisation data.
Throws:
OSBConfigUtilException - if the customisation cannot be executed.