Node Director
|
config file handler. More...
Public Member Functions | |
void | save (SaveConfigEnvironment env) throws DirectorException |
save this file if the ConfigEnvironment demands it. | |
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. | |
synchronized void | restore (RestoreConfigEnvironment env) throws DirectorException |
restore one config file from config environment env. | |
String | id () |
String[] | Packages () |
String[] | Packages (String id) |
String | description (String id) |
String | configPrefixById (String id) |
void | archiveStart (OutputStream out) |
void | archiveWrite (byte[] data, int size) throws IOException |
void | archiveClose () throws IOException |
Protected Member Functions | |
ConfigFileHandler () | |
ConfigFileHandler (String id, String[] packages, String[] filesel) | |
void | performPostRestore (RestoreConfigEnvironment env) |
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.
|
protected |
|
protected |
void sfi.director.application.config.ConfigFileHandler.archiveClose | ( | ) | throws IOException |
Implements sfi.director.util.ArchiveFilter.
Reimplemented in sfi.director.application.config.GenericFileHandler.
References sfi.director.application.config.ConfigFileHandler.endFile(), sfi.director.application.config.ConfigFileHandler.processLine(), and sfi.director.application.config.ConfigFileHandler.restEnv().
Referenced by sfi.director.application.config.GenericFileHandler.archiveClose().
void sfi.director.application.config.ConfigFileHandler.archiveStart | ( | OutputStream | out | ) |
Implements sfi.director.util.ArchiveFilter.
Reimplemented in sfi.director.application.config.GenericFileHandler.
References sfi.director.application.config.ConfigFileHandler.restEnv(), and sfi.director.application.config.ConfigFileHandler.startFile().
Referenced by sfi.director.application.config.GenericFileHandler.archiveStart().
void sfi.director.application.config.ConfigFileHandler.archiveWrite | ( | byte[] | data, |
int | size | ||
) | throws IOException |
Implements sfi.director.util.ArchiveFilter.
Reimplemented in sfi.director.application.config.GenericFileHandler.
References sfi.director.application.config.ConfigFileHandler.processLine(), and sfi.director.application.config.ConfigFileHandler.restEnv().
Referenced by sfi.director.application.config.GenericFileHandler.archiveWrite().
|
protected |
Referenced by sfi.director.application.config.Automounter.Automounter(), sfi.director.application.config.CompatPasswd.CompatPasswd(), sfi.director.application.config.ConfigFileHandler.configPrefix(), sfi.director.application.config.ConfigFileHandler.configPrefixById(), sfi.director.application.config.CupsConf.CupsConf(), sfi.director.application.config.CupsPrinters.CupsPrinters(), sfi.director.application.config.EtcServices.EtcServices(), sfi.director.application.config.InitTab.InitTab(), sfi.director.application.config.LoginDefs.LoginDefs(), sfi.director.application.config.MgettyConfig.MgettyConfig(), sfi.director.application.config.MgettyDialin.MgettyDialin(), sfi.director.application.config.MgettyLogin.MgettyLogin(), sfi.director.application.config.NamedConf.NamedConf(), sfi.director.application.config.NetgroupFile.NetgroupFile(), sfi.director.application.config.NFSDFSTab.NFSDFSTab(), sfi.director.application.config.NFSExports.NFSExports(), sfi.director.application.config.NTPConf.NTPConf(), sfi.director.application.config.NTPKeys.NTPKeys(), sfi.director.application.config.NTPTickers.NTPTickers(), sfi.director.application.config.ResolvConf.ResolvConf(), sfi.director.application.config.SendmailAccess.SendmailAccess(), sfi.director.application.config.SendmailCF.SendmailCF(), sfi.director.application.config.SendmailCW.SendmailCW(), sfi.director.application.config.SendmailMasquerade.SendmailMasquerade(), sfi.director.application.config.SquidConf.SquidConf(), sfi.director.application.config.ConfigFileHandler.startFile(), sfi.director.application.config.UUCPCall.UUCPCall(), sfi.director.application.config.UUCPConfig.UUCPConfig(), sfi.director.application.config.UUCPDial.UUCPDial(), sfi.director.application.config.UUCPDialcode.UUCPDialcode(), sfi.director.application.config.UUCPPasswd.UUCPPasswd(), sfi.director.application.config.UUCPPort.UUCPPort(), and sfi.director.application.config.UUCPSys.UUCPSys().
|
protected |
String sfi.director.application.config.ConfigFileHandler.configPrefixById | ( | String | id | ) |
Reimplemented in sfi.director.application.config.GenericFileHandler.
References sfi.director.application.config.ConfigFileHandler.configPrefix().
Referenced by sfi.director.application.config.ConfigEngine.configPrefixById().
String sfi.director.application.config.ConfigFileHandler.description | ( | String | id | ) |
Reimplemented in sfi.director.application.config.GenericFileHandler.
References sfi.director.application.config.ConfigFileHandler.Filesel().
Referenced by sfi.director.application.config.ConfigEngine.description().
|
protected |
Referenced by sfi.director.application.config.InitTab.processLine(), sfi.director.application.config.UUCPCall.processLine(), sfi.director.application.config.SimpleKeyHandler.processLine(), sfi.director.application.config.NTPTickers.processLine(), sfi.director.application.config.NTPKeys.processLine(), sfi.director.application.config.SquidConf.processLine(), sfi.director.application.config.NTPConf.processLine(), sfi.director.application.config.SendmailCF.processLine(), sfi.director.application.config.NamedConf.processLine(), and sfi.director.application.config.ConfigFileHandler.startFile().
|
protected |
|
protected |
Reimplemented in sfi.director.application.config.Automounter, sfi.director.application.config.NamedConf, sfi.director.application.config.NTPConf, sfi.director.application.config.SendmailCF, sfi.director.application.config.SquidConf, sfi.director.application.config.NTPKeys, sfi.director.application.config.SimpleKeyHandler, sfi.director.application.config.SendmailCW, sfi.director.application.config.NTPTickers, sfi.director.application.config.SendmailMasquerade, sfi.director.application.config.NFSDFSTab, sfi.director.application.config.NFSExports, sfi.director.application.config.NetgroupFile, sfi.director.application.config.InitTab, sfi.director.application.config.UUCPCall, sfi.director.application.config.HerkeoisFbConf, and sfi.director.application.config.NoConfigHandler.
|
protected |
place holder for handler specific finalization code
Reimplemented in sfi.director.application.config.CompatPasswd.
References sfi.director.application.config.ConfigFileHandler.emit(), and sfi.director.application.config.ConfigFileHandler.needInsert().
Referenced by sfi.director.application.config.ConfigFileHandler.archiveClose().
|
protected |
|
protected |
String sfi.director.application.config.ConfigFileHandler.findFile | ( | ConfigEnvironment | env, |
boolean | force | ||
) |
try to find the best matching file out of the filesel list.
References sfi.director.util.Tools.sort().
Referenced by sfi.director.application.config.ConfigFileHandler.restore(), sfi.director.application.config.ConfigFileHandler.save(), and sfi.director.application.config.GenericFileHandler.savePkg().
|
protected |
String sfi.director.application.config.ConfigFileHandler.id | ( | ) |
boolean sfi.director.application.config.ConfigFileHandler.isInScope | ( | SaveConfigEnvironment | env | ) |
does the ConfigEnvironment imply this config file must be saved.
Referenced by sfi.director.application.config.ConfigFileHandler.save(), and sfi.director.application.config.GenericFileHandler.save().
|
protected |
Referenced by sfi.director.application.config.ConfigFileHandler.emit(), sfi.director.application.config.ConfigFileHandler.endFile(), sfi.director.application.config.SendmailMasquerade.processLine(), sfi.director.application.config.SendmailCW.processLine(), sfi.director.application.config.NamedConf.processLine(), and sfi.director.application.config.ConfigFileHandler.startFile().
|
protected |
Referenced by sfi.director.application.config.ConfigEngine.packages().
String [] sfi.director.application.config.ConfigFileHandler.Packages | ( | ) |
String [] sfi.director.application.config.ConfigFileHandler.Packages | ( | String | id | ) |
Reimplemented in sfi.director.application.config.GenericFileHandler.
References sfi.director.application.config.ConfigFileHandler.Packages().
|
protected |
Reimplemented in sfi.director.application.config.GenericFileHandler, sfi.director.application.config.NFSDFSTab, sfi.director.application.config.NFSExports, and sfi.director.application.config.SendmailAccess.
References sfi.director.application.config.RestoreConfigEnvironment.addPostRestore(), sfi.director.application.config.RestartServer.canRestart(), sfi.director.system.SysProcess.isRunning(), sfi.director.application.config.ConfigFileHandler.restartIfProcs(), and sfi.director.application.config.ConfigFileHandler.restartServices().
Referenced by sfi.director.application.config.GenericFileHandler.performPostRestore(), and sfi.director.application.config.ConfigFileHandler.restore().
|
protected |
Reimplemented in sfi.director.application.config.NamedConf, sfi.director.application.config.SambaSMBConf, sfi.director.application.config.SendmailCF, sfi.director.application.config.NTPConf, sfi.director.application.config.SendmailCW, sfi.director.application.config.SquidConf, sfi.director.application.config.NTPKeys, sfi.director.application.config.SendmailMasquerade, sfi.director.application.config.NTPTickers, sfi.director.application.config.SimpleKeyHandler, sfi.director.application.config.InitTab, sfi.director.application.config.UUCPCall, and sfi.director.application.config.CompatPasswd.
Referenced by sfi.director.application.config.ConfigFileHandler.archiveClose(), and sfi.director.application.config.ConfigFileHandler.archiveWrite().
|
protected |
Referenced by sfi.director.application.config.Automounter.Automounter(), sfi.director.application.config.CupsConf.CupsConf(), sfi.director.application.config.CupsPrinters.CupsPrinters(), sfi.director.application.config.NamedConf.NamedConf(), sfi.director.application.config.NTPConf.NTPConf(), sfi.director.application.config.NTPKeys.NTPKeys(), sfi.director.application.config.ConfigFileHandler.performPostRestore(), sfi.director.application.config.ConfigFileHandler.restartIfProcs(), sfi.director.application.config.SambaSMBConf.SambaSMBConf(), sfi.director.application.config.SendmailCF.SendmailCF(), sfi.director.application.config.SendmailCW.SendmailCW(), sfi.director.application.config.SendmailMasquerade.SendmailMasquerade(), sfi.director.application.config.GenericFileHandler.setupRestarts(), and sfi.director.application.config.SquidConf.SquidConf().
|
protected |
|
protected |
Referenced by sfi.director.application.config.Automounter.Automounter(), sfi.director.application.config.CupsConf.CupsConf(), sfi.director.application.config.CupsPrinters.CupsPrinters(), sfi.director.application.config.NamedConf.NamedConf(), sfi.director.application.config.NTPConf.NTPConf(), sfi.director.application.config.NTPKeys.NTPKeys(), sfi.director.application.config.ConfigFileHandler.performPostRestore(), sfi.director.application.config.ConfigFileHandler.restartServices(), sfi.director.application.config.SambaSMBConf.SambaSMBConf(), sfi.director.application.config.SendmailCF.SendmailCF(), sfi.director.application.config.SendmailCW.SendmailCW(), sfi.director.application.config.SendmailMasquerade.SendmailMasquerade(), sfi.director.application.config.GenericFileHandler.setupRestarts(), and sfi.director.application.config.SquidConf.SquidConf().
|
protected |
|
protected |
Referenced by sfi.director.application.config.ConfigFileHandler.archiveClose(), sfi.director.application.config.ConfigFileHandler.archiveStart(), sfi.director.application.config.ConfigFileHandler.archiveWrite(), sfi.director.application.config.UUCPCall.emit(), sfi.director.application.config.InitTab.emit(), sfi.director.application.config.NTPTickers.emit(), sfi.director.application.config.SendmailMasquerade.emit(), sfi.director.application.config.SendmailCW.emit(), sfi.director.application.config.SimpleKeyHandler.emit(), sfi.director.application.config.NTPKeys.emit(), sfi.director.application.config.SquidConf.emit(), sfi.director.application.config.SendmailCF.emit(), sfi.director.application.config.NTPConf.emit(), sfi.director.application.config.NamedConf.emit(), sfi.director.application.config.ConfigFileHandler.restEnv(), and sfi.director.application.config.ConfigFileHandler.restore().
|
protected |
synchronized void sfi.director.application.config.ConfigFileHandler.restore | ( | RestoreConfigEnvironment | env | ) | throws DirectorException |
restore one config file from config environment env.
Reimplemented in sfi.director.application.config.GenericFileHandler.
References sfi.director.util.Tools.backupFile(), sfi.director.system.Files.chgrp(), sfi.director.system.Files.chmod(), sfi.director.system.Files.chown(), sfi.director.util.TempFile.create(), sfi.director.util.Tools.digestData(), sfi.director.application.config.ConfigFileHandler.findFile(), sfi.director.util.Tools.log(), sfi.director.util.Logger.NOTICE, sfi.director.application.config.ConfigFileHandler.performPostRestore(), sfi.director.application.config.ConfigFileHandler.restEnv(), and sfi.director.system.Files.stat().
Referenced by sfi.director.application.config.ConfigEngine.restore().
void sfi.director.application.config.ConfigFileHandler.save | ( | SaveConfigEnvironment | env | ) | throws DirectorException |
save this file if the ConfigEnvironment demands it.
Reimplemented in sfi.director.application.config.GenericFileHandler, and sfi.director.application.config.ConfigDir.
References sfi.director.application.config.ConfigFileHandler.findFile(), sfi.director.application.config.ConfigFileHandler.isInScope(), and sfi.director.application.config.ConfigFileHandler.saveFile().
void sfi.director.application.config.ConfigFileHandler.saveFile | ( | SaveConfigEnvironment | env, |
String | file, | ||
String | id | ||
) | throws DirectorException |
Reimplemented in sfi.director.application.config.Automounter.
Referenced by sfi.director.application.config.ConfigFileHandler.save(), and sfi.director.application.config.GenericFileHandler.savePkg().
|
protected |
Reimplemented in sfi.director.application.config.NamedConf, and sfi.director.application.config.CompatPasswd.
References sfi.director.application.config.ConfigFileHandler.configPrefix(), sfi.director.application.config.ConfigFileHandler.dropThem(), sfi.director.util.Options.getOption(), sfi.director.application.config.ConfigFileHandler.needInsert(), and sfi.director.application.config.RestoreConfigEnvironment.options().
Referenced by sfi.director.application.config.ConfigFileHandler.archiveStart().