public abstract class BaseAppAction extends AbstractAction implements IfsParameters
Note: this class should be extended to implement the execute method, which runs whatever method that starts the BaseApp class.
CONTINUE_ON_ERROR, m_defaultOptions, m_options
APPEND_LOG, DATABASE_TYPE, DATABASE_URL, DB_USER_NAME, DB_USER_PASSWORD, DOMAIN_TYPE, ENABLE_SSL_SUPPORT, FOR_SCHEMA_UPGRADE, IFS_DOMAIN_DISPLAY_NAME, IFS_DOMAIN_NAME, IFS_SCHEMA_NAME, IFS_SCHEMA_PASSWORD, IFS_SERVICE_NAME, IFS_USER_NAME, IFS_USER_PASSWORD, INCLUDE_PATH, INITIAL_CONTEXT_FACTORY, LDAP_URL_DAS_LOOKUP, LDAP_USER_NAME, LDAP_USER_PASSWORD, OUTPUT_FILE, PARAMETER_FILE, REGISTRY, SCHEMA_VERSION_KEY, SECURITY_PROTOCOL_NAME, SERVICE_CONFIGURATION_NAME
Constructor and Description |
---|
BaseAppAction()
Creates a new BaseAppAction.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
execute(String[] args)
This method should be overridden to implement the
actual execution of the BaseApp class.
|
void |
failed(Throwable error)
Does nothing.
|
protected String[] |
getArgs()
Returns the arguments that should be passed to the BaseApp's constructor.
|
void |
perform()
Runs the BaseApp.
|
Object |
removeParameter(String name)
Calls the Hashtable.remove method on the given parameter.
|
void |
setErrorFile(String file)
Sets the "errorfile" parameter used by the BaseApp.
|
void |
setForSchemaUpgrade(boolean forSchemaUpgrade)
Sets the "forSchemaUpgrade" parameter used by the BaseApp.
|
void |
setIncludePath(String path)
Sets the "IncludePath" parameter used by the BaseApp.
|
void |
setParameter(String name,
String value)
Sets a parameter used by the BaseApp.
|
void |
setParameterFile(String file)
Sets the "parameterfile" parameter used by the BaseApp.
|
void |
setPassword(String pass)
Sets the "password" parameter used by the BaseApp.
|
void |
setSchemaPassword(String schemaPassword)
Sets the "serverpassword" parameter used by the BaseApp.
|
void |
setService(String service)
Sets the "server" parameter used by the BaseApp.
|
void |
setTraceFile(String file)
Sets the "tracefile" parameter used by the BaseApp.
|
void |
setUser(String user)
Sets the "username" parameter used by the BaseApp.
|
void |
stop()
Does nothing.
|
getDescription, getName, getValue, isContinueOnError, isPostgres, putValue, setDefaultOptions, setDescription, setName, setOptions
public void setParameter(String name, String value)
name
- the parameter.value
- the parameter's value.public Object removeParameter(String name)
name
- the parameter to remove from the BaseApp's arguments.public void setParameterFile(String file)
file
- the "def" file that should be read.public void setErrorFile(String file)
file
- the file used to record errors.public void setTraceFile(String file)
file
- the file that used to store the BaseApp's trace.public void setIncludePath(String path)
path
- the path that should be searched.public void setUser(String user)
user
- the iFS user that the BaseApp should connect as.public void setPassword(String pass)
pass
- the iFS user's password.public void setService(String service)
service
- the iFS service name.public void setSchemaPassword(String schemaPassword)
schemaPassword
- the iFS schema password.public void setForSchemaUpgrade(boolean forSchemaUpgrade)
forSchemaUpgrade
- whether the BaseApp's LibraryConnection
will be for a schema upgrade.protected String[] getArgs()
public void perform() throws ActionFailedException
execute
method, passing it the arguments that
should be passed to the BaseApp's constructor.perform
in interface Action
ActionFailedException
- if the action could not be performed.protected abstract void execute(String[] args) throws IfsException, ActionFailedException
args
- the arguments that should be passed
to the BaseApp's constructor.IfsException
ActionFailedException
public void failed(Throwable error)
Copyright © 2023. All rights reserved.