Class UpdatePersistenceInstanceTask
- java.lang.Object
-
- com.opencloud.slee.mlet.ant.tasks.AbstractBaseTask
-
- com.opencloud.slee.mlet.ant.tasks.UpdatePersistenceInstanceTask
-
- All Implemented Interfaces:
SubTask
public class UpdatePersistenceInstanceTask extends AbstractBaseTask
A Rhino management sub task for updating the settings of a persistence instance.
Ant Parameters 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
BuildException
when an error is encountered. If 'false', the sub task will throw aNonFatalBuildException
instead of aBuildException
under specific circumstances. See below for conditions (if any) which will cause aNonFatalBuildException
.No. Default value is taken from the Rhino management parent task.
Parameters available as nested elements Element Description Required configproperty
Identifies a configuration property of the datasource class that should be updated. See
ConfigPropertyElement
. Note that thetype
property ofConfigPropertyElement
is mandatory for this task.One
ConfigPropertyElement
must be specified per config property.removeconfigproperty
Identifies an existing configuration property of the datasource class that should be removed. See
UpdatePersistenceInstanceTask.RemoveConfigPropertyElement
.One
RemoveConfigPropertyElement
must be specified per config property to be removed.NonFatalBuildException throw conditions-
This task will never throw a
NonFatalBuildException
. It will always fail (throw aBuildException
) on errors.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UpdatePersistenceInstanceTask.RemoveConfigPropertyElement
A nested element that identifies a configuration property to be removed from a persistence instance.
-
Field Summary
-
Fields inherited from class com.opencloud.slee.mlet.ant.tasks.AbstractBaseTask
client, failOnError
-
-
Constructor Summary
Constructors Constructor Description UpdatePersistenceInstanceTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
Methods inherited from class com.opencloud.slee.mlet.ant.tasks.AbstractBaseTask
getExceptionAndMessage, getFailOnError, getMessage, getOverrideFailOnError, getParent, getProject, log, run, setFailOnError
-
-
-
-
Method Detail
-
execute
protected void execute() throws org.apache.tools.ant.BuildException
- Specified by:
execute
in classAbstractBaseTask
- Throws:
org.apache.tools.ant.BuildException
-
validateParameters
protected void validateParameters() throws org.apache.tools.ant.BuildException
- Specified by:
validateParameters
in classAbstractBaseTask
- Throws:
org.apache.tools.ant.BuildException
-
setName
public void setName(String name)
-
setType
public void setType(String type)
-
setDatasourceClass
public void setDatasourceClass(String datasourceClassName)
-
addConfiguredConfigProperty
public void addConfiguredConfigProperty(ConfigPropertyElement element)
-
addConfiguredRemoveConfigProperty
public void addConfiguredRemoveConfigProperty(UpdatePersistenceInstanceTask.RemoveConfigPropertyElement element)
-
-