public abstract class BaseTool extends Object
Modifier and Type | Method and Description |
---|---|
void |
disconnectSession(LibrarySession session)
Disconnect a LibrarySession.
|
LibrarySession |
establishSession(LibraryService service)
Create a LibrarySession, using schema password authentication
|
LibrarySession |
establishSession(LibraryService service,
Credential cred)
Create a LibrarySession.
|
boolean |
gatherCredentials()
Gather credential settings.
|
String |
getDatabaseType()
Get the String specified for the database type.
|
String |
getDatabaseUrl()
Get the String specified for the iFS database url.
|
String |
getDomain()
Get the String specified for the domain.
|
String |
getDomainDisplayName()
Get the String specified for the iFS domain display name.
|
int |
getExitCode()
Get the exit code.
|
ParameterTable |
getParameterTable()
Get the ParameterTable
|
String |
getSchemaName()
Get the String specified for the iFS schema name.
|
String |
getSchemaPassword()
Get the String specified for the iFS schema password.
|
String |
getServiceConfigurationName()
Get the String specified for the service configuration.
|
String |
getServiceName()
Get the String specified for the iFS service to start.
|
boolean |
isVerboseLoggingEnabled()
Get the verbosity setting.
|
void |
log()
Puts out a blank line to the log
|
void |
log(String msg)
Puts out a string to the log
|
void |
log(Throwable throwable)
Puts out an exception to the log
|
void |
printStackTrace(Throwable e)
Add stack trace to the log.
|
void |
setExitCode(int code)
Sets the exit code.
|
void |
showBanner(String toolName)
Puts out a tool banner
|
void |
showExiting(String toolName)
Puts out an "exiting" banner
|
LibraryService |
startService()
Starts a LibraryService.
|
public BaseTool(String[] args)
args
- the command-line argumentspublic ParameterTable getParameterTable()
public boolean isVerboseLoggingEnabled()
public String getDomain()
public String getServiceConfigurationName()
public String getServiceName()
public String getSchemaName()
public String getDomainDisplayName()
public String getDatabaseUrl()
public String getDatabaseType()
public String getSchemaPassword()
public int getExitCode()
public void setExitCode(int code)
code
- the exit codepublic boolean gatherCredentials()
public LibraryService startService() throws Exception
Exception
- if operation failspublic LibrarySession establishSession(LibraryService service) throws Exception
service
- the LibraryServiceException
- if operation failspublic LibrarySession establishSession(LibraryService service, Credential cred) throws Exception
service
- the LibraryServicecred
- the CredentialException
- if operation failspublic void disconnectSession(LibrarySession session)
session
- the LibrarySessionpublic void showBanner(String toolName) throws IfsException
toolName
- the tool nameIfsException
- if unable to get version stringpublic void showExiting(String toolName)
toolName
- the tool namepublic void log()
public void log(String msg)
msg
- the Stringpublic void log(Throwable throwable)
throwable
- the exceptionpublic void printStackTrace(Throwable e)
e
- the exception for which to print a stack traceCopyright © 2023. All rights reserved.