public class UpdatePersistenceInstanceTask extends AbstractBaseTask
A Rhino management sub task for updating the settings of a persistence instance.
Attribute | Description | Required |
---|---|---|
name |
Name of the persistence instance to create. This name must be unique. |
Yes. |
type |
Type of the persistence instance to create, eg. 'jdbc' or 'cassandra'. |
No. Only needs to be specified if changing the persistence instance type. |
datasourceclass |
Fully-qualified class name the the datasource class to be used by the persistence instance. |
No. This parameter is only meaningful if 'type' is 'jdbc'. Only needs to be specified if a different datasource class should be used by the persistence instance than previously specified. |
failonerror |
Flag to control failure behaviour.
If 'true', the sub task will throw a |
No. Default value is taken from the Rhino management parent task. |
Element | Description | Required |
---|---|---|
configproperty |
Identifies a configuration property of the datasource class that should be updated.
See |
One |
removeconfigproperty |
Identifies an existing configuration property of the datasource class that should be removed.
See |
One |
This task will never throw a NonFatalBuildException
. It will always fail (throw a BuildException
) on errors.
Modifier and Type | Class and Description |
---|---|
static class |
UpdatePersistenceInstanceTask.RemoveConfigPropertyElement
A nested element that identifies a configuration property to be removed from a persistence instance.
|
client, failOnError
Constructor and Description |
---|
UpdatePersistenceInstanceTask() |
Modifier and Type | Method and Description |
---|---|
void |
addConfiguredConfigProperty(ConfigPropertyElement element) |
void |
addConfiguredRemoveConfigProperty(UpdatePersistenceInstanceTask.RemoveConfigPropertyElement element) |
protected void |
execute() |
void |
setDatasourceClass(String datasourceClassName) |
void |
setName(String name) |
void |
setType(String type) |
protected void |
validateParameters() |
getExceptionAndMessage, getFailOnError, getMessage, getOverrideFailOnError, getParent, getProject, log, run, setFailOnError
protected void execute() throws org.apache.tools.ant.BuildException
execute
in class AbstractBaseTask
org.apache.tools.ant.BuildException
protected void validateParameters() throws org.apache.tools.ant.BuildException
validateParameters
in class AbstractBaseTask
org.apache.tools.ant.BuildException
public void setName(String name)
public void setType(String type)
public void setDatasourceClass(String datasourceClassName)
public void addConfiguredConfigProperty(ConfigPropertyElement element)
public void addConfiguredRemoveConfigProperty(UpdatePersistenceInstanceTask.RemoveConfigPropertyElement element)