GUS::PluginMgr::Plugin
GUS::PluginMgr::Plugin is the superclass of all GusApplication plugins.
Unless otherwise noted, all of its methods are instance methods. That is,
they are called like this: $self->my_instance_method();
new()new
method which must:
- create and bless a $self
- call the initialize method described below
- return $self
Return type: hash ref
initialize($argsHashRef)new
method.
Parameters
- argsHashRef (hash ref). This argument is a hash ref which must contain the following key values pairs:
'$Revision: 3032 $'. CVS will substitute in
the revision number, so that, after substitution, the value will be,
eg, '$Revision: 3032 $'
ref($self).
documentation (hashref)argsDeclaration).
The hashref may include only the following standard keys. All string
values (e.g., purpose, notes) may include embedded POD
formatting directives. If you use Perl's ``here'' document syntax (the
<< operator) to define your POD string, then you can use POD commands
as you ordinarily would. Otherwise, precede and follow all commands
(e.g., =item) with \\n\\n.
my $tablesAffected = [
['DoTS::Assembly', 'Writes the finished assemblies here'],
['DoTS::Similarity', 'Writes its similarity here'],
];
The format is the same as that for tablesAffected
GUS::PluginMgr::Args::Arg subclasses)GUS::PluginMgr::Args::Arg. See the Argument Declaration
Constructors (e.g. stringArg(), fileArg, etc). These are
methods which construct and return these objects.
argsDeclaration
documentation
setResultDescr($resultDescrip)Params:
- resultDescrip: a description of the plugin's main result for posterity.
setPointerCacheSize()setOracleDateFormat($oracleDateFormat)Params:
- oracleDateFormat: a string specifying a valid Oracle date format
getUsage()initialize
method.
Return type: string
getDocumentation()initialize method.
Return type: string
getRequiredDbVersion()initialize method.
Return type: string
getCVSRevision()initialize method.
Return type: string
getResultDescrReturn type: string
getArgsDeclaration()initialize method.
Return type: ref_to_list_of_Args
getName()GUS::Supported::Plugin::LoadRow
Return type: string
getFile()Return type: string
getArg($arg_name)Return type: scalar or list reference
getDb()Return type: GUS::ObjRelP::DbiDatabase
getAlgInvocation()Return type: GUS::Model::Core::AlgorithmInvocation
getQueryHandle()Return type: GUS::ObjRelP::DbiDbHandle
getCheckSum()Return type: string
getAlgorithm()Return type: GUS::Model::Core::Algorithm
getImplementation()Return type: GUS::Model::Core::AlgorithmImplementation
The Argument Declaration Constructors return Argument Declaration
objects, as expected by the initialize() method in its
argDeclaration parameter. Each arg declaration object specifies
the details of a command line argument expected by the plugin. The
different constructors below are used to declare arguments of
different types, such as string, int, file, etc.
The argument declaration constructor methods each take a hashref as their sole parameter. This hashref must include the required set of keys.
The following keys are standard and required for all the argument declaration constructors. (Additional non-standard keys are indicated below for each method as applicable.)
stringArg($argDescriptorHashRef)Parameters
- argDescriptorHashRef (hash ref). This argument is a hash ref which must contain the standard keys described above.
Return type: GUS::PluginMgr::Args::StringArg
integerArg($argDescriptorHashRef)Parameters
- argDescriptorHashRef (hash ref). This argument is a hash ref which must contain the standard keys described above.
Return type: GUS::PluginMgr::Args::IntegerArg
booleanArg($argDescriptorHashRef)Parameters
- argDescriptorHashRef (hash ref). This argument is a hash ref which must contain the standard keys described above with the exception of 'isList' and 'constraintFunc', which are not applicable.
Return type: GUS::PluginMgr::Args::BooleanArg
tableNameArg($argDescriptorHashRef)Parameters
- argDescriptorHashRef (hash ref). This argument is a hash ref which must contain the standard keys described above.
Return type: GUS::PluginMgr::Args::TableNameArg
floatArg($argDescriptorHashRef)Parameters
- argDescriptorHashRef (hash ref). This argument is a hash ref which must contain the standard keys described above.
Return type: GUS::PluginMgr::Args::FloatArg
fileArg($argDescriptorHashRef)Parameters
- argDescriptorHashRef (hash ref). This argument is a hash ref which must contain the standard keys described above and also
over 4
Return type: GUS::PluginMgr::Args::FileArg
enumArg($argDescriptorHashRef)Parameters
- argDescriptorHashRef (hash ref). This argument is a hash ref which must contain the standard keys described above and also
over 4
Return type: GUS::PluginMgr::Args::EnumArg
controlledVocabMapArg($argDescriptorHashRef)getArg() is that vocabulary in hash form, with the key being the input term and the value being the GUS term. If any GUS term in the file is not found in the database table, an error is thrown. This is used for application or site specific CVs, not for stable standards. It is intended to provide a flexible way for a plugin to use a CV developed in-house.
Parameters
- argDescriptorHashRef (hash ref). This argument is a hash ref which must contain the standard keys described above and also
over 4
Return type: GUS::PluginMgr::Args::ControlledVocabArg
globArg($argDescriptorHashRef)Parameters
- argDescriptorHashRef (hash ref). This argument is a hash ref which must contain the standard keys described above and also
over 4
Return type: GUS::PluginMgr::Args::GlobArg
globArg($argDescriptorHashRef)Parameters
- argDescriptorHashRef (hash ref). This argument is a hash ref which must contain the standard keys described above and also
over 4
Return type: GUS::PluginMgr::Args::GlobArg
className2oracleName($className)Parameters:
- className (string): A class name in the form: GUS::Model::Core::Algorithm or Core::Algorithm
Return type: string
getExtDbRlsId($dbName, $dbVersion)Die if none found. (If you just want to test for its existence, call the method in an eval{} block.)
Parameters:
- dbName (string): Name of the database; must match an entry in SRes::ExternalDatabase
- dbVersion (string): Version of the database; matched against the version attribute in SRes::ExternalDatabaseRelease
Return type: integer
prepareAndExecute($sql)Parameters:
- sql (string): The SQL to prepare and execute.
Return type: statementHandle
getControlledVocabMapping($cvMappingFile, $cvTable, $cvTermColumn)Parameters:
- cvMappingFile (string): The name of the file which contains the mapping. It must be two columns tab delimited where the first column is the input terms and the second column is the GUS CV.
- cvTable (string): The name of the table in gus (in schema.table format) which contains the CV.
- cvTermColumn (string): The name of the column in cvTable that contains the terms.
Return type: hash reference
getTotalInserts()getTotalUpdates()className2TableId($className)Parameters:
- className (string): A class name in the form: Core::Algorithm
Return type: integer
getFullTableClassName($className)Parameters: -
- getFullTableClassName (string): A class name in the form: Core::Algorithm (case insensitive)
Return type: string
className2tableId($className)Parameters:
- className (string): A class name in the form: Core::Algorithm (case sensitive)
Return type: integer
undefPointerCache()$self->getDb()->setMaximumNumberOfObjects()
>>.) Typically a plugin may loop over a set of input, using a number
of objects for each iteration through the loop. Because the next time
through the loop will not need those objects, it is good practice to
call C<< $self->undefPointerCache() >> at the bottom of the loop to
avoid filling the cache with objects that are not needed anymore.
printDocumentationText($synopsis, $argDetails)Parameters
- $synopsis (string): text providing a synopsis. - $argDetails (string): text providing details of the arguments.
printDocumentationHTML($synopsis, $argDetails)Parameters
- $synopsis (string): text providing a synopsis. - $argDetails (string): text providing details of the arguments.
error($msg)When the plugin is terminated, GusApplication will still catch the error and attempt to track the plugin's failure in the database.
Do not use this method to report user errors such as invalid argument
values (use userError for that).
Parameters
- msg (string): the error message to write.
userError($msg)Parameters
- msg (string): the error message to write.
log($msg1, $msg2, ...)Parameters
- @messages (list of strings): the error messages to write.
logDebug($msg1, $msg2, ...)--debug argument.
Parameters
- @messages (list of strings): the error messages to write.
logVerbose($msg1, $msg2, ...)--verbose argument.
Parameters
- @messages (list of strings): the error messages to write.
logVeryVerbose($msg1, $msg2, ...)--veryVerbose
argument.
Parameters
- @messages (list of strings): the error messages to write.
logData($msg1, $msg2, ...)Parameters
- @messages (list of strings): the error messages to write.
logAlgInvocationId()logCommit()logArgs()
sql_get_as_array()string
()string
()string
()string
sql_translate()string
getEasyCspOptions()getArgsDeclaration()
getRevisionNotes()Return type: string
getArgs()getArg()
getSelfInv()getAlgInvocation
getCla()getArg
logAlert()log
getOk()die/eval facilities of perl. Instead of using setOK(0), use die.
setOk()die/eval facilities of perl. Instead of using getOK(), use eval.
logRAIID()logAlgInvocationId