public class CreateWorkspaceTask
extends org.apache.tools.ant.Task
The create workspace ANT task takes the following parameters:
The following is an example of calling the create workspace ANT task:
<createWorkspace jdbcDriver="${jdbcDriver}" jdbcURL="${jdbcURL}" userId="${dbaName}" password="${dbaPassword}" baseSchema="${dbaName}" instanceName="${instanceName}" numberOfWorkspaces="${cmNumWorkspaces}" readSchemaPrefix="${cmReadPrefix}" writeSchemaPrefix="${cmWritePrefix}" generateSQLStatementsOnly="false" generateSQLStatementsOutputFile="" />
To debug this ANT task, enable the CONTENT tracing component by calling the log configuration ANT task just before this task.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
CreateWorkspaceTask()
This is the default constructor for this class.
|
Modifier and Type | Method and Description |
---|---|
protected void | deinitialize()
This method cleans up operations after the ANT task has completed executing.
|
protected void | disableInitializeResourceContainer()
This method disable the initialize of resource containers from resource xml file.
|
void | execute()
This method creates the workspace schema pool or generates the SQL statements depending on the parameters passed to the ANT task.
|
java.lang.String | getBaseSchema()
This method returns the base schema that contains the tables that will be managed.
|
protected java.sql.Connection | getConnection()
This method returns the database connection for the task.
|
java.lang.String | getGenerateSQLStatementsOnly()
This method returns whether the SQL statements should be generated or executed to actually create the workspace schema pool.
|
java.lang.String | getGenerateSQLStatementsOutputFile()
This method returns the output file for the generated SQL statements.
|
static java.lang.String | getInstanceName()
This method returns the name of the instance.
|
java.lang.String | getJdbcDriver()
This method returns the class name of the JDBC driver.
|
java.lang.String | getJdbcURL()
This method returns the JDBC URL connection string to connect to the database.
|
java.lang.String | getNumberOfWorkspaces()
This method returns the number of workspaces to create in the workspace pool.
|
java.lang.String | getPassword()
This method returns the password to access the database.
|
java.lang.String | getReadSchemaPrefix()
This method returns the read schema prefix when creating the name to define the read schema.
|
static java.lang.String | getResourceXMLLocation()
This method returns the resourceXMLLocation.
|
java.lang.String | getUserId()
This method returns the user identity to connect to the database.
|
java.lang.String | getWriteSchemaPrefix()
This method returns the write schema prefix when creating the name to define the write schema.
|
protected void | initialize()
This method initializes the different variables required for workspace creation.
|
static void | main(java.lang.String[] args)
This main method was added to get around the long classpath problem with the ConfigManager.
|
protected void | performTask()
This method performs the actual ANT task.
|
void | setBaseSchema(java.lang.String baseSchema)
This method sets the base schema where the tables reside.
|
void | setGenerateSQLStatementsOnly(java.lang.String booleanValue)
This method sets whether to only generate the SQL statements or not.
|
void | setGenerateSQLStatementsOutputFile(java.lang.String fileName)
This method sets the output file name for the SQL statements.
|
void | setInstanceName(java.lang.String instanceName)
This method sets the instance name.
|
void | setJdbcDriver(java.lang.String jdbcDriver)
This method sets the JDBC driver class name.
|
void | setJdbcURL(java.lang.String jdbcURL)
This method sets the JDBC URL to connect to the database.
|
void | setNumberOfWorkspaces(java.lang.String numberOfWorkspaces)
This method sets the number of workspaces to create.
|
void | setPassword(java.lang.String password)
This method sets the database password.
|
void | setReadSchemaPrefix(java.lang.String prefix)
This method sets the prefix for the read schema name.
|
void | setResourceXMLLocation(java.lang.String resourceXMLLocation)
This method sets the resource XML Location.
|
void | setUserId(java.lang.String userId)
This method sets the user identity to connect to the database.
|
void | setWriteSchemaPrefix(java.lang.String prefix)
This method sets the write schema prefix.
|
protected static java.lang.String | uc(java.lang.String s)
Upper-cases input String in Locale.US
|
public static final java.lang.String COPYRIGHT
public CreateWorkspaceTask()
public static void main(java.lang.String[] args)
public void execute() throws org.apache.tools.ant.BuildException
protected void initialize() throws java.lang.Exception
protected void deinitialize() throws java.lang.Exception
protected java.sql.Connection getConnection()
protected void performTask() throws java.lang.Exception
public java.lang.String getBaseSchema()
public java.lang.String getGenerateSQLStatementsOnly()
public java.lang.String getGenerateSQLStatementsOutputFile()
public java.lang.String getJdbcDriver()
public java.lang.String getJdbcURL()
public java.lang.String getNumberOfWorkspaces()
public java.lang.String getPassword()
public java.lang.String getReadSchemaPrefix()
public java.lang.String getUserId()
public java.lang.String getWriteSchemaPrefix()
public void setBaseSchema(java.lang.String baseSchema)
public void setGenerateSQLStatementsOnly(java.lang.String booleanValue)
public void setGenerateSQLStatementsOutputFile(java.lang.String fileName)
public void setJdbcDriver(java.lang.String jdbcDriver)
public void setJdbcURL(java.lang.String jdbcURL)
public void setNumberOfWorkspaces(java.lang.String numberOfWorkspaces)
public void setPassword(java.lang.String password)
public void setReadSchemaPrefix(java.lang.String prefix)
public void setUserId(java.lang.String userId)
public void setWriteSchemaPrefix(java.lang.String prefix)
public void setResourceXMLLocation(java.lang.String resourceXMLLocation)
public static java.lang.String getResourceXMLLocation()
public void setInstanceName(java.lang.String instanceName)
public static java.lang.String getInstanceName()
protected void disableInitializeResourceContainer()
protected static java.lang.String uc(java.lang.String s)