public abstract class AbstractAssociator extends java.lang.Object implements java.lang.Cloneable, Associator, java.io.Serializable, CapabilitiesHandler, CapabilitiesIgnorer, RevisionHandler, OptionHandler, CommandlineRunnable
Constructor and Description |
---|
AbstractAssociator() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
doNotCheckCapabilitiesTipText()
Returns the tip text for this property
|
static Associator |
forName(java.lang.String associatorName,
java.lang.String[] options)
Creates a new instance of a associator given it's class name and (optional)
arguments to pass to it's setOptions method.
|
Capabilities |
getCapabilities()
Returns the Capabilities of this associator.
|
boolean |
getDoNotCheckCapabilities()
Get whether capabilities checking is turned off.
|
java.lang.String[] |
getOptions()
Gets the current settings of the associator
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
static Associator[] |
makeCopies(Associator model,
int num)
Creates copies of the current associator.
|
static Associator |
makeCopy(Associator model)
Creates a deep copy of the given associator using serialization.
|
void |
postExecution()
Perform any teardown stuff that might need to happen after execution.
|
void |
preExecution()
Perform any setup stuff that might need to happen before commandline
execution.
|
void |
run(java.lang.Object toRun,
java.lang.String[] options)
Execute the supplied object.
|
static void |
runAssociator(Associator associator,
java.lang.String[] options)
runs the associator with the given commandline options
|
void |
setDoNotCheckCapabilities(boolean doNotCheckCapabilities)
Set whether not to check capabilities.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
buildAssociations
makeCopy
public java.util.Enumeration<Option> listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface OptionHandler
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public java.lang.String doNotCheckCapabilitiesTipText()
public void setDoNotCheckCapabilities(boolean doNotCheckCapabilities)
setDoNotCheckCapabilities
in interface CapabilitiesIgnorer
doNotCheckCapabilities
- true if capabilities are not to be checked.public boolean getDoNotCheckCapabilities()
getDoNotCheckCapabilities
in interface CapabilitiesIgnorer
public static Associator forName(java.lang.String associatorName, java.lang.String[] options) throws java.lang.Exception
associatorName
- the fully qualified class name of the associatoroptions
- an array of options suitable for passing to setOptions. May
be null.java.lang.Exception
- if the associator name is invalid, or the options
supplied are not acceptable to the associatorpublic static Associator makeCopy(Associator model) throws java.lang.Exception
model
- the associator to copyjava.lang.Exception
- if an error occurspublic static Associator[] makeCopies(Associator model, int num) throws java.lang.Exception
model
- an example associator to copynum
- the number of associators copies to create.java.lang.Exception
- if an error occurspublic Capabilities getCapabilities()
getCapabilities
in interface Associator
getCapabilities
in interface CapabilitiesHandler
Capabilities
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
public static void runAssociator(Associator associator, java.lang.String[] options)
associator
- the associator to runoptions
- the commandline optionspublic void preExecution() throws java.lang.Exception
preExecution
in interface CommandlineRunnable
java.lang.Exception
- if a problem occurs during setuppublic void run(java.lang.Object toRun, java.lang.String[] options) throws java.lang.Exception
run
in interface CommandlineRunnable
toRun
- the object to executeoptions
- any options to pass to the objectjava.lang.Exception
- if a problem occurspublic void postExecution() throws java.lang.Exception
postExecution
in interface CommandlineRunnable
java.lang.Exception
- if a problem occurs during teardown