|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.StartupInit
public class StartupInit
Provides startup initialization.
This class is loaded by DBConfig.java
at startup initialization time, and
various methods are called within this class to allow custom DB initialization.
The actual class loaded and executed by DBConfig
can be overridden by placing
the following line in the system 'default.conf' and 'webapp.conf' files:
startup.initClass=org.opengts.StartupInitWhere 'org.opengts.opt.StartupInit' is the name of the class you wish to have loaded in place of this class file.
Constructor Summary | |
---|---|
StartupInit()
Constructor. (Created with the DBConfig db startup initialization) |
Method Summary | ||
---|---|---|
protected void |
addDBFields(java.lang.String tblName,
java.util.List<DBField> tblFields,
java.lang.String key,
boolean defaultAdd,
DBField[] customFields)
Add the specified fields to the table |
|
protected void |
addDBFields(java.lang.String tblName,
java.util.List<DBField> tblFields,
java.lang.String key,
boolean defaultAdd,
DBField[] customFields,
int maxCount)
Add the specified fields to the table |
|
void |
addTableFactories()
Opportunity to add custom DBFactory classes. This method is called just after all standard database factory classes have been intialized/added. |
|
|
createDBFactory(java.lang.String tableName,
DBField[] field,
DBFactory.KeyType keyType,
java.lang.Class<T> rcdClass,
java.lang.Class<? extends DBRecordKey<T>> keyClass,
boolean editable,
boolean viewable)
Create a DBFactory instance. |
|
protected EventUtil.OptionalEventFields |
createOptionalEventFieldsHandler()
Creates a generic custom EventUtil.OptionalEventFields instance |
|
protected void |
initPasswordHandler()
|
|
protected org.opengts.StartupInit.EVField[] |
parseFields(DBFactory factory,
java.lang.String[] flda)
|
|
void |
postInitialization()
Post-DBInitialization. This method is called after all startup initialization has completed. |
|
void |
preInitialization()
Pre-DBInitialization. This method is called just before the standard database factory classes are initialized/added. |
|
java.util.List<DBField> |
selectFields(DBFactory factory,
java.util.List<DBField> fields)
Augment DBFactory fields. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StartupInit()
Method Detail |
---|
public void preInitialization()
preInitialization
in interface DBConfig.DBInitialization
public void addTableFactories()
addTableFactories
in interface DBConfig.DBInitialization
protected org.opengts.StartupInit.EVField[] parseFields(DBFactory factory, java.lang.String[] flda)
protected EventUtil.OptionalEventFields createOptionalEventFieldsHandler()
public void postInitialization()
postInitialization
in interface DBConfig.DBInitialization
protected void initPasswordHandler()
public <T extends DBRecord<T>> DBFactory<T> createDBFactory(java.lang.String tableName, DBField[] field, DBFactory.KeyType keyType, java.lang.Class<T> rcdClass, java.lang.Class<? extends DBRecordKey<T>> keyClass, boolean editable, boolean viewable)
createDBFactory
in interface DBFactory.CustomFactoryHandler
tableName
- The name of the tablefield
- The DBFields in the tablekeyType
- The table key typercdClass
- The DBRecord subclass representing the tablekeyClass
- The DBRecordKey subclass representing the table keyeditable
- True if this table should be editable, false otherwise.
This value is used by the GTSAdmin application.viewable
- True if this table should be viewable, false otherwise.
An 'editable' table is automatically considered viewable.
This value is used by the GTSAdmin application.
public java.util.List<DBField> selectFields(DBFactory factory, java.util.List<DBField> fields)
selectFields
in interface DBFactory.CustomFactoryHandler
factory
- The DBFactoryfields
- The list of fields scheduled to be added to the DBFactory
protected void addDBFields(java.lang.String tblName, java.util.List<DBField> tblFields, java.lang.String key, boolean defaultAdd, DBField[] customFields)
tblName
- The table nametblFields
- The list of table fieldskey
- The boolean key used to check for permission to add these fieldsdefaultAdd
- The default if the property is not explicitly specfifiedcustomFields
- The fields to add, assuming the boolean key returns true.protected void addDBFields(java.lang.String tblName, java.util.List<DBField> tblFields, java.lang.String key, boolean defaultAdd, DBField[] customFields, int maxCount)
tblName
- The table nametblFields
- The list of table fieldskey
- The boolean key used to check for permission to add these fieldsdefaultAdd
- The default if the property is not explicitly specfifiedcustomFields
- The fields to add, assuming the boolean key returns true.maxCount
- The maximum number of fields to add from the customFields array
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |