Node Director
|
config file handler. More...
Public Member Functions | |
GenericFileHandler () | |
String[] | Packages (String id) |
String | description (String id) |
String | configPrefixById (String id) |
void | save (SaveConfigEnvironment env) throws DirectorException |
save this file if the ConfigEnvironment demands it. | |
synchronized void | restore (RestoreConfigEnvironment env) throws DirectorException |
restore one config file from config environment env. | |
void | archiveStart (OutputStream outstream) |
void | archiveWrite (byte[] buffer, int size) throws IOException |
void | archiveClose () throws IOException |
void | performPostRestore (RestoreConfigEnvironment env) |
Public Member Functions inherited from sfi.director.application.config.ConfigFileHandler | |
void | saveFile (SaveConfigEnvironment env, String file, String id) throws DirectorException |
boolean | isInScope (SaveConfigEnvironment env) |
does the ConfigEnvironment imply this config file must be saved. | |
String | findFile (ConfigEnvironment env, boolean force) |
try to find the best matching file out of the filesel list. | |
String | id () |
String[] | Packages () |
Protected Member Functions | |
void | readConfig () |
void | setupFilesel (DBObject pkgDef) |
synchronized void | savePkg (SaveConfigEnvironment env, DBObject pkgDef) throws DirectorException |
void | setupRestarts (DBObject pkgDef) |
DBObject | pkgDef () |
DBObject | pkgDef (DBObject pkgDef) |
Protected Member Functions inherited from sfi.director.application.config.ConfigFileHandler | |
ConfigFileHandler () | |
ConfigFileHandler (String id, String[] packages, String[] filesel) | |
RestoreConfigEnvironment | restEnv () |
void | restEnv (RestoreConfigEnvironment env) |
void | id (String newid) |
void | Packages (String[] newpackages) |
void | Filesel (String[] newfilesel) |
String[] | Filesel () |
String[] | restartIfProcs () |
void | restartIfProcs (String[] procs) |
String[] | restartServices () |
void | restartServices (String[] services) |
String | configPrefix () |
void | configPrefix (String prefix) |
void | processLine (RestoreConfigEnvironment env, String line) throws IOException |
Vector | dropThem () |
Hashtable | needInsert () |
void | startFile (RestoreConfigEnvironment env) |
void | endFile (RestoreConfigEnvironment env) throws IOException |
place holder for handler specific finalization code | |
void | emit (String key) throws IOException |
void | emit (String key, String value) throws IOException |
config file handler.
Classes derived from this class handle one specific config file.
sfi.director.application.config.GenericFileHandler.GenericFileHandler | ( | ) |
void sfi.director.application.config.GenericFileHandler.archiveClose | ( | ) | throws IOException |
Reimplemented from sfi.director.application.config.ConfigFileHandler.
References sfi.director.application.config.ConfigFileHandler.archiveClose().
void sfi.director.application.config.GenericFileHandler.archiveStart | ( | OutputStream | outstream | ) |
Reimplemented from sfi.director.application.config.ConfigFileHandler.
References sfi.director.application.config.ConfigFileHandler.archiveStart().
void sfi.director.application.config.GenericFileHandler.archiveWrite | ( | byte[] | buffer, |
int | size | ||
) | throws IOException |
Reimplemented from sfi.director.application.config.ConfigFileHandler.
References sfi.director.application.config.ConfigFileHandler.archiveWrite().
String sfi.director.application.config.GenericFileHandler.configPrefixById | ( | String | id | ) |
Reimplemented from sfi.director.application.config.ConfigFileHandler.
References sfi.director.repository.DBObject.getValue(), and sfi.director.application.config.GenericFileHandler.pkgDef().
String sfi.director.application.config.GenericFileHandler.description | ( | String | id | ) |
Reimplemented from sfi.director.application.config.ConfigFileHandler.
References sfi.director.repository.DBObject.getValue(), and sfi.director.application.config.GenericFileHandler.pkgDef().
String [] sfi.director.application.config.GenericFileHandler.Packages | ( | String | id | ) |
Reimplemented from sfi.director.application.config.ConfigFileHandler.
References sfi.director.repository.DBObject.getAttribute(), and sfi.director.application.config.GenericFileHandler.pkgDef().
void sfi.director.application.config.GenericFileHandler.performPostRestore | ( | RestoreConfigEnvironment | env | ) |
Reimplemented from sfi.director.application.config.ConfigFileHandler.
References sfi.director.application.config.RestoreConfigEnvironment.addPostRestore(), sfi.director.repository.DBObject.getAttribute(), sfi.director.application.config.ConfigFileHandler.performPostRestore(), sfi.director.application.config.GenericFileHandler.pkgDef(), and sfi.director.util.Tools.ShellCommand().
|
protected |
Referenced by sfi.director.application.config.GenericFileHandler.configPrefixById(), sfi.director.application.config.GenericFileHandler.description(), sfi.director.application.config.GenericFileHandler.Packages(), sfi.director.application.config.GenericFileHandler.performPostRestore(), sfi.director.application.config.GenericFileHandler.pkgDef(), sfi.director.application.config.GenericFileHandler.restore(), and sfi.director.application.config.GenericFileHandler.savePkg().
|
protected |
References sfi.director.util.Setup.fileSeparator, sfi.director.repository.DBObject.getAttribute(), sfi.director.repository.DBManager.getConnection(), sfi.director.repository.DBObject.getDN(), sfi.director.util.MyProperties.getProperty(), sfi.director.repository.DBObject.getValue(), sfi.director.util.Tools.log(), sfi.director.application.config.ConfigFileHandler.Packages(), sfi.director.util.Setup.properties, sfi.director.application.config.ConfigEngine.RegisterAlias(), sfi.director.repository.DBConnection.search(), sfi.director.repository.DBConnection.unwrap(), and sfi.director.util.Logger.WARNING.
Referenced by sfi.director.application.config.GenericFileHandler.GenericFileHandler().
synchronized void sfi.director.application.config.GenericFileHandler.restore | ( | RestoreConfigEnvironment | env | ) | throws DirectorException |
restore one config file from config environment env.
Reimplemented from sfi.director.application.config.ConfigFileHandler.
References sfi.director.application.config.ConfigFileHandler.ConfigFileHandler(), sfi.director.repository.DBObject.getValue(), sfi.director.application.config.GenericFileHandler.pkgDef(), sfi.director.application.config.GenericFileHandler.setupFilesel(), and sfi.director.application.config.GenericFileHandler.setupRestarts().
void sfi.director.application.config.GenericFileHandler.save | ( | SaveConfigEnvironment | env | ) | throws DirectorException |
save this file if the ConfigEnvironment demands it.
Reimplemented from sfi.director.application.config.ConfigFileHandler.
References sfi.director.repository.DBObject.getAttribute(), sfi.director.application.config.ConfigFileHandler.isInScope(), and sfi.director.application.config.GenericFileHandler.savePkg().
|
protected |
References sfi.director.application.config.ConfigFileHandler.ConfigFileHandler(), sfi.director.application.config.ConfigFileHandler.findFile(), sfi.director.repository.DBObject.getValue(), sfi.director.application.config.GenericFileHandler.pkgDef(), sfi.director.application.config.ConfigFileHandler.saveFile(), and sfi.director.application.config.GenericFileHandler.setupFilesel().
Referenced by sfi.director.application.config.GenericFileHandler.save().
|
protected |
|
protected |