Node Director
|
The Tools class is a collection of useful static methods. More...
Static Public Member Functions | |
static Object | saveOurClass (Object anInstance) |
Classes of objects registered via this method are protected against the class garbage collection. | |
static synchronized String | uniqId () |
Returns a (hopefully) system-wide unique ID. | |
static String | secUniqId () |
static< T > Iterable< T > | emptyIfNull (Iterable< T > iterable) |
Return an empty iterable if argument is null, the iterable itself otherwise. | |
static boolean | copy (InputStream fin, OutputStream fout, boolean continuous) throws DirectorException |
Copy all the data from an InputStream to an OutputStream. | |
static void | copy (InputStream fin, OutputStream fout) throws DirectorException |
Copy in non-continuous mode. | |
static long | digestData (InputStream fin, MessageDigest digest) throws IOException |
Read all data from InputStream and update a digest accordingly. | |
static MessageDigest | md5sum (File file) throws DirectorException |
Compute md5 checksum for a file. | |
static MessageDigest | md5sum (InputStream in) throws DirectorException |
Compute md5 checksum for a file. | |
static long | copyData (InputStream fin, OutputStream out) throws IOException |
Copy all data from an InputStream to an OutputStream. | |
static long | copyObject (Object source, OutputStream out, boolean closeOnTerm) throws IOException |
Copy object from into an OutputStream. | |
static long | copyObject (Object source, File out) throws IOException |
Copy object into a file. | |
static int | readEntire (InputStream in, byte buffer[], int offset, int length) throws IOException |
Read a block of data from an InputStream. | |
static int | readEntire (InputStream in, byte buffer[], int length) throws IOException |
Read a block of data from an InputStream. | |
static String | readEntireText (BufferedReader in, boolean closeOnExit) throws IOException |
static String | readEntireText (File in) throws IOException |
static String | readEntireText (InputStream in, boolean closeOnExit) throws IOException |
static void | debug (LogEntry log) |
Log a debug message. | |
static void | debug (int level, String message) |
Log a debug message if debug level is high enough for the message to be logged. | |
static void | log (LogEntry log) |
Log a message. | |
static void | log (int level, String message) |
Log a message at the specified priority level. | |
static void | exit () |
Exit without an error. | |
static void | exit (int exitcode) |
Exit with specified exit code. | |
static void | waitThreads (long timeout) |
static void | rememberCleanup (CleanUpable cleanup) |
Mark an object as to be cleaned up by exit(). | |
static String | join (Vector list, String separator) |
Join the string representation of a list of objects into one single resulting string. | |
static String | join (Enumeration list, String separator) |
Join the string representation of an enumeration of strings into one single resulting string. | |
static Hashtable | hashtable (Enumeration list) |
build a hash table from an Enumeration with key/value being both the respective objects | |
static Vector | split (String str, String separator) |
Split a string into a vector of strings. | |
static Vector | split (String str) |
Split a string into a vector of strings. | |
static Hashtable | getOpt (String args[], String argopts[]) throws ArgumentException |
Process command line arguments. | |
static void | attachErrorLogger (final Process proc) |
Attach an thread to a process' error stream logging every error message via the default logger. | |
static void | attachErrorLogger (final InputStream in) |
static void | attachErrorLogger (final Process proc, final OutputStream out) |
static void | attachErrorLogger (final InputStream in, final OutputStream out) |
static Process | exec (String cmd) throws IOException |
Execute a command. | |
static Process | exec (String cmd[]) throws IOException |
Execute a command. | |
static Vector | runParsePerl (String split, String code, String args[]) throws DirectorException |
static int | execWait (String cmd[]) |
Execute a command, attach an error logger, wait for the command's termination and return its exit code to the caller. | |
static String[] | ShellCommand (String command) |
Accepts a shell command string, returns a String array containing the same command ready for execution via exec() and the system's command shell. | |
static int | execWait (String cmd[], boolean logErrors) |
Execute a command, optionally attach an error logger, wait for the command's termination and return its exit code to the caller. | |
static int | execWait (String cmd[], boolean logErrors, long timeout) |
Execute a command, optionally attach an error logger, wait for the command's termination and return its exit code to the caller. | |
static void | consume (final InputStream stream) |
static int | workingWaitFor (Process process, boolean outConsumed, boolean errorConsumed) throws InterruptedException |
static int | workingWaitFor (Process process, boolean outConsumed, boolean errorConsumed, final long timeout) throws InterruptedException |
do a Process.waitFor() and consume the exec()-ed commands output in order to avoid hangs. | |
static Enumeration | execUtility (String cmd[]) throws DirectorException |
run a command and read its output via an Enumeration. | |
static Enumeration | execUtility (String cmd[], boolean errout) throws DirectorException |
static Enumeration | execFilter (String cmd[], final Object source) throws DirectorException |
static Enumeration | execFilter (String cmd[], final Object source, boolean errout) throws DirectorException |
run a command, pipe the source string in and make the output accessible via the returned Enumeration. | |
static String | findAuth (String principal) |
Find an authentication database entry for a given principal (login name). | |
static int | findUidNumber (int start) throws DirectorException |
By using the people database find an unused uid number higher than the specified start limit. | |
static int | findUidNumber (int start, int end) throws DirectorException |
By using the people database find an unused uid between two given limits. | |
static int | findGidNumber (int start) throws DirectorException |
By using the people database find an unused gid number higher than the specified start limit. | |
static int | findGidNumber (int start, int end) throws DirectorException |
By using the people database find an unused uid between two given limits. | |
static int | findFreeNumber (int start, int end, String field) throws DirectorException |
By using the people database find an unused uid or gid number between two given limits. | |
static int | findFreeNumber (int start, int end, String field, String dir) throws DirectorException |
static void | sort (Vector v, MyComparator c) |
Sort a vector in the order specified by the given comparator. | |
static void | sort (Object arr[], MyComparator c) |
Sort an array in the order specified by the given comparator. | |
static String | expand (String str, final DBObject dbo) throws DirectorException |
Expand variable references in a string using the attributes of the given database entry as variable/value pairs. | |
static String | expand (String str, final ExpandVars expander) throws DirectorException |
Expand variable references in a string using the given ExpandVars class to expand variable names into their values. | |
static String | applyModifier (String modifier, String val, final ExpandVars expander) throws DirectorException |
Apply a variable modifier to a value. | |
static void | background () |
Put the current thread into the background (= decrease its priority). | |
static void | executeLocalqueue () |
Do something reasonable with the jobs in the local job queue. | |
static void | doEvent (DBObject dbo, final DBConnection dir, final Record data, final String type) |
static void | doEvent (DBObject dbo, final DBConnection dir, final Record data, final String type, boolean warnIfNotApplicable) |
Execute an event for a given database entry and the given corresponding object editor data. | |
static void | makeZip (File what, String prefix, OutputStream out) throws DirectorException |
Zip the given file and send the zip file to the given stream. | |
static void | makeZip (File what, String prefix, ZipOutputStream out) throws DirectorException |
static String | ticketid () |
static String | minTimeStamp () |
Return a string representing the current time in a format in minute precision only. | |
static String | timeStamp () |
Return a string representing the current time in a (director) standard format. | |
static String | timeStamp (Date time) |
Return a string representing the passed time in a (director) standard format. | |
static void | main (String args[]) |
static DBObject | fieldToDBObject (Field f) |
static Record | toDBEditRecord (DBObject dbo) |
static DBObject | toDBObject (Record rec) |
static String | getUser () |
static void | trackJob (Workflow workflow) throws DirectorException |
static String | stacktrace (Throwable e) |
static Enumeration | getHostnames (String name) |
Get all names of a specific host/alias from the hosts directory. | |
static void | removeDir (File dir) throws DirectorException |
Remove a file/directory recursively. | |
static String | asciify (String str) |
translate some international characters in a string into an ASCII representation | |
static String | daytimeStamp (Date time) |
Return a string representing the current day time. | |
static String | daytimeStamp () |
static void | setThreadSubStatus (String status) |
static void | backupFile (File file) |
Same as backupFile(), but saves file without checking if there is already an identical backup copy. | |
static void | backupFile (File target, boolean onlyIfDifferent) |
Save a backup copy of the given file. | |
static void | shutdown () |
Try to do some cleanup before system shutdown. | |
static boolean | isHostReady (String hostname) |
static PrintStream | debugfile () |
Static Public Attributes | |
static int | debuglev = 0 |
The program's debug level. | |
static PrintStream | debugout = System.err |
The Stream where debug output is sent to. | |
static Vector | classRefs = new Vector() |
Vector used to store references to classes for the saveOurClass mechanism. | |
static Hashtable | progOptions = new Hashtable() |
This hash stores the command line options of the current program. |
The Tools class is a collection of useful static methods.
Note that some of the methods are covered by recent Java versions but are re-implemented here for compatibility reasons.
|
static |
Apply a variable modifier to a value.
References sfi.director.util.Cache.add(), sfi.director.util.Tools.asciify(), sfi.director.util.XmlCreator.encode(), sfi.director.util.Tools.execFilter(), sfi.director.util.Tools.findFreeNumber(), sfi.director.util.Tools.findGidNumber(), sfi.director.util.Tools.findUidNumber(), sfi.director.util.Cache.get(), sfi.director.repository.config.DirectoryAccess.getClassMembers(), sfi.director.util.Setup.hostsdir, sfi.director.util.Tools.log(), sfi.director.util.Setup.masterhost, sfi.director.util.Tools.minTimeStamp(), sfi.director.util.Setup.peopledb, sfi.director.repository.DBConnection.search(), sfi.director.util.Tools.split(), sfi.director.util.Tools.ticketid(), sfi.director.repository.DBConnection.unwrap(), and sfi.director.util.Logger.WARNING.
Referenced by sfi.director.util.Tools.expand().
|
static |
translate some international characters in a string into an ASCII representation
Referenced by sfi.director.util.Tools.applyModifier(), sfi.director.repository.transform.AD2Group.transform(), and sfi.director.repository.transform.AD2User.transform().
|
static |
Attach an thread to a process' error stream logging every error message via the default logger.
Referenced by sfi.director.invoker.SSHInvoker.alternateBootstrap(), sfi.director.repository.CupsPPDDir.append(), sfi.director.util.Tools.attachErrorLogger(), sfi.director.invoker.RSHInvoker.bootstrap(), sfi.director.repository.NISTable.close(), sfi.director.invoker.StreamCmdInvoker.connect(), sfi.director.executor.CmdExecutor.connect(), sfi.director.application.scripttask.CreateHomeDB.exec(), sfi.director.util.Tools.execWait(), sfi.director.application.DirectorPackage.packCpio(), and sfi.director.application.DirectorPackage.unpackUsingArchiver().
|
static |
References sfi.director.util.Tools.attachErrorLogger().
|
static |
References sfi.director.util.Tools.attachErrorLogger().
|
static |
|
static |
Put the current thread into the background (= decrease its priority).
Referenced by sfi.director.util.Tools.doEvent().
|
static |
Same as backupFile(), but saves file without checking if there is already an identical backup copy.
Referenced by sfi.director.retriever.BackupFileRetriever.BackupFile.close(), and sfi.director.application.config.ConfigFileHandler.restore().
|
static |
Save a backup copy of the given file.
The copy is made in the backup directory as configured via the option ConfigBackup.Dir in sfidirector.conf. If the boolean argument is true, then backupFile() checks if there is already an identical backup copy (identical MD5 checksum) in which case no new copy is made. Existing old backup files are rotated, thus multiple versions are kept. The ConfigBackup.Keep sfidirector.conf option defines how many versions are kept.
target | The file to be backed up |
onlyIfDifferent | if true, the file is only backed up if there is no existing identical backup copy |
References sfi.director.system.Files.chgrp(), sfi.director.system.Files.chmod(), sfi.director.system.Files.chown(), sfi.director.util.Tools.copy(), sfi.director.util.Tools.digestData(), sfi.director.system.FileStats.getMtime(), sfi.director.util.MyProperties.getProperty(), sfi.director.util.MyProperties.getPropertyInteger(), sfi.director.util.Tools.log(), sfi.director.util.Setup.properties, sfi.director.system.Files.stat(), and sfi.director.util.Logger.WARNING.
|
static |
Referenced by sfi.director.invoker.SSHInvoker.alternateBootstrap(), sfi.director.repository.NISTable.close(), sfi.director.executor.CmdExecutor.connect(), sfi.director.application.scripttask.CreateHomeDB.exec(), sfi.director.util.Tools.execFilter(), sfi.director.util.Tools.execWait(), sfi.director.application.DirectorPackage.packCpio(), sfi.director.retriever.PipeRetriever.setupExec(), sfi.director.application.DirectorPackage.unpackUsingArchiver(), and sfi.director.util.Tools.workingWaitFor().
|
static |
Copy all the data from an InputStream to an OutputStream.
After copying is complete the streams will be closed.
fin | The input stream |
fout | The output stream |
continuous | If true copy() will only return after copying all data or after an error occured, if false copy() will return after each block of data. |
Referenced by sfi.director.repository.CupsPPDDir.append(), sfi.director.util.Tools.backupFile(), sfi.director.util.Tools.copy(), sfi.director.application.autodoc.DocBuilder.copyMedia(), sfi.director.application.scripttask.PublishApplication.exec(), sfi.director.util.Tools.execFilter(), sfi.director.application.autodoc.DocURNHandler.fetchInto(), sfi.director.application.autodoc.Formatsdep.generate(), sfi.director.application.autodoc.Formatsplithtml.generateHTML(), sfi.director.application.autodoc.Formathtml.generateHTML(), sfi.director.invoker.Recorder.infile(), sfi.director.application.DirectorPackage.install(), sfi.director.retriever.RemoteFile.retrieve(), sfi.director.retriever.RemoteFile.send(), sfi.director.retriever.PipeRetriever.setupExec(), sfi.director.invoker.RSHInvoker.shellbootstrap(), sfi.director.util.FileStore.store(), and sfi.director.util.StreamPseudoSocket.StreamPseudoSocket().
|
static |
Copy in non-continuous mode.
References sfi.director.util.Tools.copy().
|
static |
Copy all data from an InputStream to an OutputStream.
In opposition to copy() this method will not close the streams after copying has finished.
Referenced by sfi.director.util.Tools.copyObject(), sfi.director.application.executor.InstallFromZIP.exec(), sfi.director.util.ZipArchive.extract(), sfi.director.application.DirectorPackage.extractMetaFiles(), sfi.director.util.Tools.makeZip(), sfi.director.application.DirectorPackage.packCpio(), sfi.director.util.ZipArchive.store(), sfi.director.util.Archive.store(), and sfi.director.application.DirectorPackage.unpackUsingArchiver().
|
static |
Copy object from into an OutputStream.
The behaviour depends on the type of the source object. For most objects the string value of the source object is emitted.
References sfi.director.util.Tools.copyData().
Referenced by sfi.director.util.Tools.copyObject(), sfi.director.application.scripttask.Report.create(), sfi.director.application.scripttask.ChainEvent.create(), and sfi.director.util.Tools.execFilter().
|
static |
Copy object into a file.
References sfi.director.util.Tools.copyObject().
|
static |
Return a string representing the current day time.
|
static |
|
static |
Log a debug message.
References sfi.director.util.Logger.log(), and sfi.director.util.Setup.logger.
Referenced by sfi.director.executor.AppExecutor.accept(), sfi.director.invoker.MasterLoopbackInvoker.accept(), sfi.director.invoker.ShellLoopbackInvoker.accept(), sfi.director.invoker.LoopbackInvoker.accept(), sfi.director.jobs.Job.addNotify(), sfi.director.invoker.StreamConnection.agentlistener(), sfi.director.invoker.SSHInvoker.alternateBootstrap(), sfi.director.repository.LDIFDir.append(), sfi.director.repository.JDBC.append(), sfi.director.repository.config.DirectoryAccess.apply(), sfi.director.schedule.ParallelScheduler.attach(), sfi.director.invoker.InvokerManager.bootstrap(), sfi.director.invoker.RSHInvoker.bootstrap(), sfi.director.application.ClassDefine.ClassDefine(), sfi.director.application.DirectorPackage.cleanUpSub(), sfi.director.invoker.StreamConnection.commonListen(), sfi.director.application.autodoc.DependencyGraph.compute(), sfi.director.invoker.SSLInvoker.connect(), sfi.director.repository.GenericDriver.connect(), sfi.director.retriever.ServerRetriever.connect(), sfi.director.invoker.StreamCmdInvoker.connect(), sfi.director.executor.CmdExecutor.connect(), sfi.director.invoker.RSHInvoker.connect(), sfi.director.application.scripttask.FireEvent.create(), sfi.director.application.scripttask.Report.create(), sfi.director.application.scripttask.WakeOnLan.create(), sfi.director.application.scripttask.EmulateRoot.create(), sfi.director.application.scripttask.GroupOfMembers.create(), sfi.director.application.scripttask.ResolveDependencies.create(), sfi.director.application.scripttask.ReloadService.create(), sfi.director.application.scripttask.UpdateDomainsFor.create(), sfi.director.application.scripttask.ChainEvent.create(), sfi.director.application.scripttask.RemoveUserRef.create(), sfi.director.application.scripttask.SetVHost.create(), sfi.director.application.scripttask.CollectSysinfo.create(), sfi.director.application.scripttask.SetHostIP.create(), sfi.director.application.scripttask.SetUserRef.create(), sfi.director.application.scripttask.StoreAsDBChoice.create(), sfi.director.application.scripttask.ConfigureNetwork.create(), sfi.director.application.scripttask.RepositoryScan.create(), sfi.director.application.scripttask.ScheduleBuildDependingDomains.create(), sfi.director.application.scripttask.ZoneUpdated.create(), sfi.director.application.scripttask.DoAppInventory.create(), sfi.director.application.scripttask.Shell.create(), sfi.director.application.scripttask.CreateHome.create(), sfi.director.application.scripttask.CreateReleaseDir.create(), sfi.director.application.scripttask.ApplyDomainTemplate.create(), sfi.director.application.scripttask.SubscribeApps.create(), sfi.director.application.scripttask.D3HostDefine.create(), sfi.director.application.scripttask.DomainDepends.create(), sfi.director.application.scripttask.BootStrapDirector.create(), sfi.director.application.scripttask.ClassMemberApply.create(), sfi.director.application.scripttask.BuildDependingDomains.create(), sfi.director.application.scripttask.CreateHomeDB.create(), sfi.director.application.scripttask.DomainBuild.create(), sfi.director.application.scripttask.FreezeApplication.create(), sfi.director.application.scripttask.SetServerPassword.create(), sfi.director.application.scripttask.DoAppImport.create(), sfi.director.application.scripttask.INFAppModules.create(), sfi.director.application.scripttask.InjectUserSettings.create(), sfi.director.application.scripttask.CupsDrivers.create(), sfi.director.application.scripttask.ConfigHost.create(), sfi.director.application.scripttask.PublishApplication.create(), sfi.director.application.scripttask.AppInstallHost.create(), sfi.director.application.InstallerOpenLDAP.createConf(), sfi.director.util.Tools.debug(), sfi.director.jobs.Job.die(), sfi.director.application.objevents.Workflow.doEvent(), sfi.director.util.Tools.doEvent(), sfi.director.application.autodoc.DocBuilder.domaindoc(), sfi.director.repository.JDBC.enumerateTables(), sfi.director.application.executor.scanRepositoryPush.exec(), sfi.director.application.scripttask.SetHostIP.exec(), sfi.director.application.scripttask.BuildDependingDomains.exec(), sfi.director.schedule.ParallelScheduler.executeCmd(), sfi.director.schedule.Scheduler.executeCmd(), sfi.director.schedule.Scheduler.executeDSUpdate(), sfi.director.invoker.Recorder.executeJob(), sfi.director.application.autodoc.DocURNHandler.fetchInto(), sfi.director.util.Tools.findAuth(), sfi.director.application.PackageList.findPackage(), sfi.director.application.HostPackages.forPkg(), sfi.director.application.autodoc.Formatsplithtml.generateHTML(), sfi.director.application.autodoc.FormatODF.generateODF(), sfi.director.application.autodoc.DocBuilder.genericObjDoc(), sfi.director.repository.JDBC.getColumns(), sfi.director.application.objevents.EventEnvironment.getConfig(), sfi.director.repository.config.DirectoryAccess.getConfig(), sfi.director.repository.DBManager.getConnection(), sfi.director.repository.JDBC.getConnection(), sfi.director.util.UnixDomainSocket.getConnector(), sfi.director.repository.config.Directory.getDirectory(), sfi.director.schedule.ParallelScheduler.goThroughQueue(), sfi.director.schedule.SimpleScheduler.goThroughVector(), sfi.director.application.FrontendHTTPServer.handleRpc(), sfi.director.application.HostDefine.HostDefine(), sfi.director.application.autodoc.DocBuilder.hostdoc(), sfi.director.invoker.StreamConnection.imDone(), sfi.director.application.autodoc.DocBuilder.insertDependencyGraph(), sfi.director.application.DirectorPackage.install(), sfi.director.application.PackageSession.installPkg(), sfi.director.invoker.InvokerManager.invoke(), sfi.director.invoker.StreamConnection.leanBackAndWait(), sfi.director.application.autodoc.DocBuilder.locationdoc(), sfi.director.util.Lock.Lock(), sfi.director.application.FilePackageHandler.makeAndRunCommand(), sfi.director.invoker.StreamConnection.masterlistener(), sfi.director.jobs.JobNode.Notify(), sfi.director.application.DaemonObjectEdit.ObjectDefine(), sfi.director.application.objevents.Workflow.openMonitor(), sfi.director.schedule.ParallelScheduler.parallelizedExec(), sfi.director.util.Stub.register(), sfi.director.repository.JDBC.replace(), sfi.director.schedule.ParallelScheduler.saveQueue(), sfi.director.schedule.Scheduler.scheduleJob(), sfi.director.repository.LDIFDir.search(), sfi.director.invoker.StreamConnection.send_string(), sfi.director.application.SetPassword.setPasswordByFilter(), sfi.director.jobs.Job.setStatus(), sfi.director.gui.fields.HostClass.setTemplate(), sfi.director.util.Init.setup_base(), sfi.director.retriever.PipeRetriever.setupExec(), sfi.director.repository.JDBC.setURL(), sfi.director.repository.LDAP.setURL(), sfi.director.repository.LDAPndk.setURL(), sfi.director.invoker.RSHInvoker.shellbootstrap(), sfi.director.application.autodoc.DocBuilder.slurpExternalDocs(), and sfi.director.repository.DirectoryServiceMerger.targetJob().
|
static |
Log a debug message if debug level is high enough for the message to be logged.
References sfi.director.util.Logger.DEBUG, and sfi.director.util.Tools.debug().
|
static |
|
static |
Read all data from InputStream and update a digest accordingly.
Referenced by sfi.director.util.Tools.backupFile(), sfi.director.util.Tools.md5sum(), and sfi.director.application.config.ConfigFileHandler.restore().
|
static |
|
static |
Execute an event for a given database entry and the given corresponding object editor data.
References sfi.director.application.objevents.EventEnvironment.add(), sfi.director.util.Tools.background(), sfi.director.util.Logger.close(), sfi.director.util.Tools.debug(), sfi.director.util.Logger.ERR, sfi.director.repository.DBConnection.get(), sfi.director.repository.DBAccessor.getDBObject(), sfi.director.repository.DBObject.getDN(), sfi.director.repository.DBObject.getValue(), sfi.director.util.Logger.log(), sfi.director.util.Tools.log(), sfi.director.util.Setup.logger, sfi.director.util.Logger.NOTICE, sfi.director.util.Logger.setTitle(), and sfi.director.util.Logger.WARNING.
|
static |
Return an empty iterable if argument is null, the iterable itself otherwise.
Referenced by sfi.director.application.ReportFreeMarker.apply(), sfi.director.repository.transform.GroupOfMembers.transform(), and sfi.director.repository.transform.ExpandGroupOfGroups.transform().
|
static |
Execute a command.
Referenced by sfi.director.repository.CupsPPDDir.append(), sfi.director.invoker.RSHInvoker.bootstrap(), sfi.director.repository.NISTable.close(), sfi.director.application.scripttask.CreateHomeDB.exec(), sfi.director.util.Tools.execFilter(), sfi.director.util.Tools.execWait(), sfi.director.application.DirectorPackage.packCpio(), sfi.director.application.executor.appInventory.rpmInventory(), sfi.director.retriever.PipeRetriever.setupExec(), sfi.director.application.FrontendInterface.startSession(), sfi.director.application.executor.appInventory.sunpkgInventory(), and sfi.director.application.DirectorPackage.unpackUsingArchiver().
|
static |
Execute a command.
|
static |
|
static |
run a command, pipe the source string in and make the output accessible via the returned Enumeration.
See also: execUtility
References sfi.director.util.Tools.consume(), sfi.director.util.Tools.copy(), sfi.director.util.Tools.copyObject(), sfi.director.util.Tools.exec(), sfi.director.util.Tools.log(), sfi.director.util.Logger.NOTICE, and sfi.director.util.Tools.workingWaitFor().
|
static |
Do something reasonable with the jobs in the local job queue.
Depending on the configuration this means that jobs are executed and stored in the job queue database if they fail retryable, or that jobs are directly stored in the job queue database without first trying to execute them.
References sfi.director.jobs.JobStatus.aborted, sfi.director.jobs.JobStatus.done, sfi.director.jobs.JobStatus.equals(), sfi.director.util.Logger.ERR, sfi.director.jobs.JobStatus.failed, sfi.director.jobs.Job.getDescr(), sfi.director.jobs.Job.getId(), sfi.director.util.MyProperties.getProperty(), sfi.director.jobs.Job.getStatus(), sfi.director.schedule.Scheduler.goThroughVector(), sfi.director.util.Setup.localjobqueue, sfi.director.util.Logger.log(), sfi.director.util.Setup.logger, sfi.director.util.Logger.NOTICE, sfi.director.util.Setup.properties, sfi.director.jobs.JobStatus.runnable, sfi.director.schedule.Scheduler.scheduleJob(), and sfi.director.util.Setup.scheduler.
Referenced by sfi.director.application.FrontendInterface.executeCommand().
|
static |
run a command and read its output via an Enumeration.
References sfi.director.util.Tools.execFilter().
Referenced by sfi.director.application.DEBPackageHandler.aptPkgFromFile(), sfi.director.application.autodoc.ConfigFile.citeFile(), sfi.director.application.autodoc.CollectUnixPartitions.collect(), sfi.director.application.autodoc.CollectLshw.collect(), sfi.director.util.Tools.exit(), sfi.director.util.UnixDomainSocket.getConnector(), sfi.director.application.autodoc.CollectUnixPartitions.guessDisks(), sfi.director.util.ImageInfo.identify(), sfi.director.application.SUNPatchPackageHandler.inventory(), sfi.director.application.INFAppUpdatePackageHandler.inventory(), sfi.director.application.RPMPackageHandler.inventory(), sfi.director.application.DEBPackageHandler.inventory(), sfi.director.application.INFAppUpdatePackageHandler.inventoryPkg(), sfi.director.application.DEBPackageHandler.inventoryPkg(), sfi.director.application.autodoc.sinfo.InfoCmd.mkInfo(), sfi.director.application.autodoc.sinfo.InfoSamba.mkInfo(), sfi.director.application.autodoc.sinfo.InfoNFS.mkInfo(), sfi.director.application.RPMPackageHandler.pkgFromFile(), sfi.director.application.SUNPackageHandler.pkgsFromCommand(), and sfi.director.util.Tools.runParsePerl().
|
static |
References sfi.director.util.Tools.execFilter().
|
static |
Execute a command, attach an error logger, wait for the command's termination and return its exit code to the caller.
Referenced by sfi.director.system.Files.chgrp(), sfi.director.system.Files.chmod(), sfi.director.system.Files.chown(), sfi.director.repository.NISTable.close(), sfi.director.application.InstallerOpenLDAP.createDomain(), sfi.director.application.InstallerOpenLDAP.deleteDomain(), sfi.director.application.scripttask.ZoneUpdated.exec(), sfi.director.application.scripttask.ReloadService.exec(), sfi.director.application.scripttask.D3HostDefine.exec(), sfi.director.application.DirectorPackage.execScript(), sfi.director.util.Tools.execWait(), sfi.director.cli.passwd.finalize(), sfi.director.application.Report.generate(), sfi.director.application.autodoc.GraphvizGraph.genPNG(), sfi.director.application.FilePackageHandler.makeAndRunCommand(), sfi.director.application.DEBPackageHandler.makeTaskPackage(), sfi.director.cli.passwd.noechoPrompt(), sfi.director.application.config.RestartServer.restart(), sfi.director.cli.keyinit.run(), sfi.director.application.config.RunCommand.run(), sfi.director.application.InstallerOpenLDAP.service(), sfi.director.system.Files.symlink(), sfi.director.util.ImageInfo.thumbnail(), and sfi.director.util.SyslogThread.work().
|
static |
Execute a command, optionally attach an error logger, wait for the command's termination and return its exit code to the caller.
References sfi.director.util.Tools.execWait().
|
static |
Execute a command, optionally attach an error logger, wait for the command's termination and return its exit code to the caller.
Returns after at most timeout msecs.
References sfi.director.util.Tools.attachErrorLogger(), sfi.director.util.Tools.consume(), sfi.director.util.Tools.exec(), and sfi.director.util.Tools.workingWaitFor().
|
static |
Exit without an error.
Programs should always call Tools.exit() when shutting down. Due to Java's broken JVM shutdown mechanism's the program will not gracefully give up resources otherwise.
Referenced by sfi.director.cli.create.edit(), sfi.director.cli.class_define.main(), sfi.director.cli.replay.run(), sfi.director.cli.passwd.run(), sfi.director.cli.frinterface.run(), sfi.director.util.Init.set_db(), sfi.director.util.Init.setup_base(), sfi.director.util.Init.setup_objectregistry(), sfi.director.cli.class_define.usage(), sfi.director.cli.sfidirector.usage(), and sfi.director.util.AutoReaper.work().
|
static |
Exit with specified exit code.
Programs should always call Tools.exit() when shutting down. Due to Java's broken JVM shutdown mechanism's the program will not gracefully give up resources otherwise.
References sfi.director.util.CleanUpable.cleanup(), sfi.director.util.Tools.execUtility(), sfi.director.util.MyProperties.getPropertyBoolean(), sfi.director.util.Setup.properties, sfi.director.util.Tools.ShellCommand(), sfi.director.util.Tools.shutdown(), and sfi.director.util.Tools.waitThreads().
|
static |
Expand variable references in a string using the attributes of the given database entry as variable/value pairs.
References sfi.director.util.Tools.join().
Referenced by sfi.director.repository.DivertDB.append(), sfi.director.repository.config.DirectoryAccess.apply(), sfi.director.repository.transform.AD2User.applyDefaults(), sfi.director.executor.CmdExecutor.connect(), sfi.director.application.scripttask.FireEvent.create(), sfi.director.application.scripttask.StoreAsDBChoice.create(), sfi.director.application.scripttask.RepositoryScan.create(), sfi.director.application.scripttask.BootStrapDirector.create(), sfi.director.application.scripttask.DoAppImport.create(), sfi.director.application.scripttask.PublishApplication.create(), sfi.director.application.InstallerOpenLDAP.createConf(), sfi.director.application.DaemonObjectEdit.expand(), sfi.director.application.autodoc.urn.FetcherImpl.expandUrnParts(), sfi.director.gui.importers.Expand.exportRecord(), sfi.director.repository.transform.HostAssignedUsers.handleUser(), sfi.director.application.FilePackageHandler.makeJob(), sfi.director.application.scripttask.ApplyDomainTemplate.readTemplate(), sfi.director.repository.SchemaEnforcer.reduce(), and sfi.director.application.autodoc.DocInfo.templateText().
|
static |
Expand variable references in a string using the given ExpandVars class to expand variable names into their values.
References sfi.director.util.Tools.applyModifier().
References com.graeff.dbedit.Record.get(), com.graeff.dbedit.Field.getArgs(), com.graeff.dbedit.Arguments.getArgument(), com.graeff.dbedit.Arguments.getArgumentNames(), com.graeff.dbedit.Field.getAttribute(), com.graeff.dbedit.Record.getAttributes(), com.graeff.dbedit.Field.getMaster(), com.graeff.dbedit.Arguments.getProcedure(), com.graeff.dbedit.Field.getSchema(), sfi.director.repository.DBObject.removeAttribute(), sfi.director.repository.DBObject.setDN(), and sfi.director.util.Tools.split().
Referenced by sfi.director.application.FrontendInterface.executeCommand(), and sfi.director.application.FrontendHTTPServer.fieldsToJSON().
|
static |
Find an authentication database entry for a given principal (login name).
References sfi.director.util.Setup.authdb, sfi.director.repository.DBConnection.completeDN(), sfi.director.util.Tools.debug(), sfi.director.repository.DN.get(), sfi.director.repository.DBObject.getDN(), and sfi.director.repository.DBConnection.search().
Referenced by sfi.director.util.Credentials.findAuth(), and sfi.director.cli.storepassword.run().
|
static |
By using the people database find an unused uid or gid number between two given limits.
Referenced by sfi.director.util.Tools.applyModifier(), sfi.director.util.Tools.findGidNumber(), and sfi.director.util.Tools.findUidNumber().
|
static |
References sfi.director.repository.SchemaEnforcer.addMandatory(), sfi.director.repository.SchemaEnforcer.addSchema(), sfi.director.repository.SchemaEnforcer.deleteSchema(), sfi.director.repository.DBManager.getConnection(), sfi.director.repository.DBAccessor.getDBObject(), sfi.director.repository.DBObject.getEValue(), sfi.director.repository.DBObject.getValue(), sfi.director.util.Setup.peopledb, sfi.director.repository.DBConnection.search(), sfi.director.repository.DBConnection.SEARCH_SCHEMA, sfi.director.util.Options.setOption(), and sfi.director.util.Tools.uniqId().
|
static |
By using the people database find an unused gid number higher than the specified start limit.
Referenced by sfi.director.util.Tools.applyModifier().
|
static |
By using the people database find an unused uid between two given limits.
References sfi.director.util.Tools.findFreeNumber().
|
static |
By using the people database find an unused uid number higher than the specified start limit.
Referenced by sfi.director.util.Tools.applyModifier(), and sfi.director.cli.debug.debug().
|
static |
By using the people database find an unused uid between two given limits.
References sfi.director.util.Tools.findFreeNumber().
|
static |
Get all names of a specific host/alias from the hosts directory.
Also expand "localhost" to the name of the local host, "MasterHost" to the name of the master.
References sfi.director.repository.config.DirectoryAccess.get(), sfi.director.util.Setup.hostname, sfi.director.util.Setup.hostsdir, and sfi.director.util.Setup.masterhost.
Referenced by sfi.director.application.scripttask.DomainBuild.create().
|
static |
Process command line arguments.
Besides returning processed options to the calling procedure this also sets the progOptions variable.
args | The command line arguments as passed to the main() method |
argopts | The acceptable command line arguments |
References sfi.director.util.Tools.progOptions.
Referenced by sfi.director.cli.class_define.main(), and sfi.director.cli.sfidirector.main().
|
static |
|
static |
build a hash table from an Enumeration with key/value being both the respective objects
|
static |
|
static |
Join the string representation of a list of objects into one single resulting string.
Referenced by sfi.director.repository.DHCPfile.encodeNet(), sfi.director.util.Tools.expand(), sfi.director.application.autodoc.sinfo.InfoNFS.mkInfo(), sfi.director.application.autodoc.sinfo.InfoISCBind.mkInfo(), sfi.director.application.autodoc.sinfo.InfoISCDHCP.mkInfo(), sfi.director.application.autodoc.sinfo.InfoOpenLDAP.mkInfo(), sfi.director.application.autodoc.sinfo.InfoCups.mkInfo(), sfi.director.application.autodoc.sinfo.InfoApache1.mkInfo(), and sfi.director.application.DirectorPackage.writeInfo().
|
static |
Join the string representation of an enumeration of strings into one single resulting string.
|
static |
Log a message.
References sfi.director.util.Logger.log(), and sfi.director.util.Setup.logger.
Referenced by sfi.director.invoker.StreamConnection.agentlistener(), sfi.director.repository.DivertDB.append(), sfi.director.repository.config.DirectoryAccess.apply(), sfi.director.util.Tools.applyModifier(), sfi.director.application.DEBPackageHandler.aptPkgFromFile(), sfi.director.util.Tools.attachErrorLogger(), sfi.director.application.HostPackages.autosubscribe(), sfi.director.util.Tools.backupFile(), sfi.director.invoker.RSHInvoker.bootstrap(), sfi.director.cli.build.buildAll(), sfi.director.application.autodoc.ConfigFile.citeFile(), sfi.director.application.autodoc.DocBuilder.cleanDocMedia(), sfi.director.util.Logger.clearLoggers(), sfi.director.application.autodoc.CollectWinWMIHW.collect(), sfi.director.application.autodoc.CollectWinWMIPartitions.collect(), sfi.director.application.autodoc.CollectWinWMIApps.collect(), sfi.director.application.autodoc.CollectLshw.collect(), sfi.director.application.autodoc.CollectServices.collect(), sfi.director.application.autodoc.InfoCollector.collectInto(), sfi.director.repository.GenericDriver.connect(), sfi.director.executor.CmdExecutor.connect(), sfi.director.application.scripttask.FireEvent.create(), sfi.director.application.scripttask.ReloadService.create(), sfi.director.application.scripttask.ZoneUpdated.create(), sfi.director.application.scripttask.D3HostDefine.create(), sfi.director.application.scripttask.BootStrapDirector.create(), sfi.director.application.scripttask.ClassMemberApply.create(), sfi.director.application.scripttask.AppInstallHost.createPackage(), sfi.director.application.config.RestoreConfigEnvironment.currentFilename(), sfi.director.application.InstallerOpenLDAP.delDB(), sfi.director.schedule.ParallelScheduler.detach(), sfi.director.application.objevents.Workflow.doEvent(), sfi.director.util.Tools.doEvent(), sfi.director.application.autodoc.DocBuilder.domaindoc(), sfi.director.cli.create.edit(), sfi.director.application.FrontendHTTPServer.emulateRootUser(), sfi.director.application.scripttask.WakeOnLan.exec(), sfi.director.application.executor.appInventoryPush.exec(), sfi.director.application.executor.scanRepositoryPush.exec(), sfi.director.application.scripttask.ChainEvent.exec(), sfi.director.application.scripttask.ApplyDomainTemplate.exec(), sfi.director.application.scripttask.ZoneUpdated.exec(), sfi.director.application.scripttask.StoreAsDBChoice.exec(), sfi.director.application.executor.InstallFromArchive.exec(), sfi.director.application.scripttask.ReloadService.exec(), sfi.director.application.scripttask.BuildDependingDomains.exec(), sfi.director.application.scripttask.CreateHomeDB.exec(), sfi.director.application.executor.InstallFromZIP.exec(), sfi.director.util.Tools.execFilter(), sfi.director.schedule.ParallelScheduler.executeCmd(), sfi.director.schedule.Scheduler.executeCmd(), sfi.director.application.FrontendInterface.executeCommand(), sfi.director.invoker.Recorder.executeJob(), sfi.director.schedule.Scheduler.executePendingDSUpdate(), sfi.director.util.Credentials.fileCredentials(), sfi.director.schedule.ParallelScheduler.finalize(), sfi.director.application.HostPackages.forPkg(), sfi.director.application.DirectorPackage.freeze(), sfi.director.application.Report.generate(), sfi.director.util.MyProperties.getPropertyBoolean(), sfi.director.util.MyProperties.getPropertyInteger(), sfi.director.schedule.ParallelScheduler.goThroughQueue(), sfi.director.schedule.SimpleScheduler.goThroughVector(), sfi.director.repository.NCUserSettingsFile.init(), sfi.director.application.config.ConfigEngine.init(), sfi.director.application.autodoc.DocBuilder.insertDependencyGraph(), sfi.director.application.DirectorPackage.install(), sfi.director.application.InstallerOpenLDAP.installSchema(), sfi.director.application.DEBPackageHandler.inventory(), sfi.director.invoker.StreamConnection.leanBackAndWait(), sfi.director.application.AdminServer.listen(), sfi.director.util.Lock.Lock(), sfi.director.util.Tools.log(), sfi.director.invoker.StreamConnection.masterlistener(), sfi.director.util.BackgroundProcessMonitor.monitor(), sfi.director.schedule.Scheduler.notifyServer(), sfi.director.application.objevents.Workflow.openMonitor(), sfi.director.schedule.ParallelScheduler.parallelizedExec(), sfi.director.application.SUNPackageHandler.pkgsFromCommand(), sfi.director.cli.serverstatus.printStatus(), sfi.director.schedule.Scheduler.purgeOldJobs(), sfi.director.application.config.GenericFileHandler.readConfig(), sfi.director.schedule.ParallelScheduler.removeOldJobs(), sfi.director.schedule.Scheduler.removeOldJobs(), sfi.director.application.config.RestartServer.restart(), sfi.director.application.config.ConfigFileHandler.restore(), sfi.director.application.config.ConfigEngine.restore(), sfi.director.application.autodoc.DocExtDocu.retrieve(), sfi.director.cli.docrefetch.run(), sfi.director.application.config.RunCommand.run(), sfi.director.cli.init.run(), sfi.director.cli.shutdown.run(), sfi.director.cli.replay.run(), sfi.director.cli.mkdepend.run(), sfi.director.cli.serverstatus.run(), sfi.director.cli.app_subscribe.run(), sfi.director.cli.queueworker.run(), sfi.director.cli.frinterface.run(), sfi.director.schedule.Scheduler.runThroughCmdQueue(), sfi.director.schedule.Scheduler.runThroughLockedQueue(), sfi.director.application.config.ConfigDir.save(), sfi.director.schedule.ParallelScheduler.saveQueue(), sfi.director.application.PackageManager.scanRepository(), sfi.director.application.DirectorPackage.scanRepository(), sfi.director.application.FrontendHTTPServer.serve(), sfi.director.util.Init.set_db(), sfi.director.jobs.Job.setStatus(), sfi.director.util.Init.setup_base(), sfi.director.util.Init.setup_objectregistry(), sfi.director.repository.JDBC.setURL(), sfi.director.repository.LDAP.setURL(), sfi.director.repository.LDAPndk.setURL(), sfi.director.application.AdminServer.startListen(), sfi.director.application.RPMPackageHandler.targetInstallPkgs(), sfi.director.application.DEBPackageHandler.targetInstallPkgs(), sfi.director.application.RPMPackageHandler.targetRemovePkgs(), sfi.director.application.DEBPackageHandler.targetRemovePkgs(), sfi.director.cli.sfidirector.trackJob(), sfi.director.util.Tools.trackJob(), sfi.director.repository.transform.ExpandGroupOfGroups.transform(), sfi.director.repository.DBSet.transform(), sfi.director.util.Lock.unlock(), sfi.director.application.scripttask.ZoneUpdated.updateSerial(), sfi.director.util.Tools.waitThreads(), sfi.director.application.autodoc.CollectWinProxy.wmiData(), and sfi.director.util.Tools.workingWaitFor().
|
static |
Log a message at the specified priority level.
References sfi.director.util.Tools.log().
|
static |
References sfi.director.util.Setup.fileSeparator, and sfi.director.util.Tools.makeZip().
|
static |
Zip the given file and send the zip file to the given stream.
If the file to be zipped is a directory it will be zipped recursively. The name of the file in the ZIP archive is passed via the prefix argument.
Referenced by sfi.director.application.executor.ZIPit.exec(), sfi.director.application.DirectorPackage.freeze(), sfi.director.util.Tools.main(), and sfi.director.util.Tools.makeZip().
|
static |
|
static |
Compute md5 checksum for a file.
Referenced by sfi.director.application.autodoc.InfoCollector.push().
|
static |
Compute md5 checksum for a file.
References sfi.director.util.Tools.digestData().
|
static |
Return a string representing the current time in a format in minute precision only.
Referenced by sfi.director.util.Tools.applyModifier().
|
static |
Read a block of data from an InputStream.
Unlike the original InputStream.read() method, this utility function reads exactly the given number of bytes, unless eof is reached.
Referenced by sfi.director.application.autodoc.InfoCollector.push(), and sfi.director.util.Tools.readEntire().
|
static |
Read a block of data from an InputStream.
Unlike the original InputStream.read() method, this utility function reads exactly the given number of bytes, unless eof is reached.
References sfi.director.util.Tools.readEntire().
|
static |
|
static |
References sfi.director.util.Tools.readEntireText().
|
static |
References sfi.director.util.Tools.readEntireText().
|
static |
Mark an object as to be cleaned up by exit().
Referenced by sfi.director.util.SyslogThread.SyslogThread(), and sfi.director.util.TempFile.TempFile().
|
static |
Remove a file/directory recursively.
References sfi.director.system.FileStats.DIRECTORY, sfi.director.util.Setup.fileSeparator, sfi.director.system.FileStats.getFileType(), and sfi.director.system.Files.lstat().
Referenced by sfi.director.application.InstallerOpenLDAP.deleteDomain(), and sfi.director.application.DEBPackageHandler.makeTaskPackage().
|
static |
|
static |
Classes of objects registered via this method are protected against the class garbage collection.
Early versions of Java used to love kicking out classes no matter if they contained valuable static information. Director classes which prefer to keep their static information will register via saveOurClass()
References sfi.director.util.Tools.classRefs.
|
static |
Referenced by sfi.director.application.FrontendHTTPServer.file_retrieve().
|
static |
Referenced by sfi.director.application.AdminServer.connectAdminServer(), sfi.director.schedule.Scheduler.executePendingDSUpdate(), sfi.director.schedule.ParallelScheduler.goThroughCmds(), sfi.director.invoker.StreamConnection.master(), sfi.director.invoker.StreamConnection.masterlistener(), sfi.director.schedule.Scheduler.rescan(), sfi.director.schedule.ParallelScheduler.saveQueue(), and sfi.director.invoker.StreamConnection.send_cmd().
|
static |
Accepts a shell command string, returns a String array containing the same command ready for execution via exec() and the system's command shell.
Typically, e.g. "echo abc" will be translated into { "/bin/sh", "-c", "echo abc" }. This is thought to become platform-independent once we support non-UNIX platforms, so on a windows system this might return something like { "cmd.exe", "/c", "echo abc" }.
References sfi.director.util.Setup.iswindows.
Referenced by sfi.director.application.DEBPackageHandler.aptInstall(), sfi.director.executor.CmdExecutor.connect(), sfi.director.application.scripttask.ZoneUpdated.exec(), sfi.director.application.scripttask.ReloadService.exec(), sfi.director.util.Tools.exit(), sfi.director.application.SUNPackageHandler.install(), sfi.director.application.DEBPackageHandler.inventoryPkg(), sfi.director.application.DEBPackageHandler.makeTaskPackage(), sfi.director.application.autodoc.sinfo.InfoCmd.mkInfo(), sfi.director.application.config.GenericFileHandler.performPostRestore(), sfi.director.application.SUNPackageHandler.remove(), and sfi.director.retriever.PipeRetriever.setupExec().
|
static |
Try to do some cleanup before system shutdown.
Release locks, force garbage collection, run finalization.
References sfi.director.util.Setup.scheduler, and sfi.director.util.Lock.shutdown().
Referenced by sfi.director.util.Tools.exit().
|
static |
Sort a vector in the order specified by the given comparator.
Referenced by sfi.director.application.DirectorPackage.cleanUpSub(), sfi.director.application.autodoc.DocBuilder.configfilesdoc(), sfi.director.application.scripttask.ConfigHost.create(), sfi.director.application.autodoc.DocBuilder.domaindoc(), sfi.director.application.autodoc.ConfigFile.fileHistory(), sfi.director.application.config.ConfigFileHandler.findFile(), sfi.director.application.autodoc.DocBuilder.genericDocu(), sfi.director.util.ObjectRegistry.getByClass(), sfi.director.application.autodoc.ServiceDepContainer.getClassByMembers(), sfi.director.application.autodoc.DocBuilder.hostdoc(), sfi.director.util.AlienCfgFileReader.include(), sfi.director.application.autodoc.DocBuilder.locations(), sfi.director.application.autodoc.sinfo.InfoApache1.mkInfo(), sfi.director.retriever.CfgFileReader.readLine(), sfi.director.invoker.Recorder.replay(), sfi.director.cli.init.run(), sfi.director.repository.transform.DHCPSort.transform(), and sfi.director.repository.transform.Sort.transform().
|
static |
Sort an array in the order specified by the given comparator.
References sfi.director.util.MyComparator.compare().
|
static |
Split a string into a vector of strings.
Split at positions where the separator string is located at the same time dropping the separator string. This is similiar but not identical to using StringTokenizers.
Referenced by sfi.director.application.autodoc.ConfigFile.addAlternativeSpec(), sfi.director.application.PackageList.addPackages(), sfi.director.repository.transform.AD2User.applyDefaults(), sfi.director.util.Tools.applyModifier(), sfi.director.system.SystemArchitecture.architecture(), sfi.director.repository.NISTable.close(), sfi.director.application.autodoc.CollectUnixPartitions.collect(), sfi.director.application.autodoc.CollectConfigFiles.collect(), sfi.director.application.autodoc.DependencyGraph.compute(), sfi.director.repository.transform.Script.connect(), sfi.director.application.scripttask.Shell.create(), sfi.director.application.scripttask.PublishApplication.create(), sfi.director.repository.PopmapFile.decode(), sfi.director.repository.ShadowFile.decode(), sfi.director.repository.ApacheGroupFile.decode(), sfi.director.repository.SambaPasswdFile.decode(), sfi.director.repository.BootparamsFile.decode(), sfi.director.repository.MailertableFile.decode(), sfi.director.repository.GroupFile.decode(), sfi.director.repository.AutomounterFile.decode(), sfi.director.repository.FileWrapperDB.decode(), sfi.director.repository.ServicesFile.decode(), sfi.director.repository.HostsFile.decode(), sfi.director.repository.TimezoneFile.decode(), sfi.director.repository.ApachePasswdFile.decode(), sfi.director.repository.ProtocolsFile.decode(), sfi.director.repository.CupsPrintersFile.decode(), sfi.director.repository.PasswdFile.decode(), sfi.director.repository.NidumpFile.decode_nidump(), sfi.director.repository.NetgroupFile.decodeEntry(), sfi.director.application.FrontendHTTPServer.edit_data(), sfi.director.application.config.SendmailMasquerade.emit(), sfi.director.application.config.SendmailCW.emit(), sfi.director.application.config.SimpleKeyHandler.emit(), sfi.director.application.config.NTPConf.emit(), sfi.director.repository.NameListFile.encode(), sfi.director.repository.VirtusertableFile.encode(), sfi.director.repository.transform.NISfromNetgroup.encodeEntry(), sfi.director.repository.NCOdbcIniFile.encodeEntry(), sfi.director.application.executor.scanRepositoryPush.exec(), sfi.director.application.FrontendInterface.executeCommand(), sfi.director.application.DaemonObjectEdit.expand(), sfi.director.gui.importers.PasswordHash.exportRecord(), sfi.director.util.Tools.fieldToDBObject(), sfi.director.application.FrontendHTTPServer.fillRel(), sfi.director.application.PackageList.findPackage(), sfi.director.repository.config.AppPackages.get(), sfi.director.cli.create.getBase(), sfi.director.application.autodoc.DocInfo.getDocOpts(), sfi.director.application.autodoc.DocInfo.getImageOpts(), sfi.director.application.DirectorPackage.getInfo(), sfi.director.util.Options.getOptionsStrings(), sfi.director.repository.SchemaEnforcer.getSchemaEnforcer(), sfi.director.application.autodoc.CollectUnixPartitions.guessDisks(), sfi.director.cli.help.help(), sfi.director.application.autodoc.DocBuilder.hostdoc(), sfi.director.util.ImageInfo.identify(), sfi.director.application.Director3PackageHandler.inventory(), sfi.director.application.RPMPackageHandler.inventory(), sfi.director.application.DEBPackageHandler.makeDependency(), sfi.director.application.executor.InstallFromZIP.mangleName(), sfi.director.application.autodoc.sinfo.InfoCmd.mkInfo(), sfi.director.application.AdminServer.oneConnection(), sfi.director.application.DEBPackageHandler.parseDepends(), sfi.director.repository.JDBC.parseDN(), sfi.director.repository.LDIFTree.path(), sfi.director.repository.LDIFDir.path(), sfi.director.cli.create.prettyPrint(), sfi.director.cli.serverstatus.printStatus(), sfi.director.application.scripttask.AppInstallHost.pushScheduled(), sfi.director.repository.DN.RDNattrs(), sfi.director.application.PackageList.remove(), sfi.director.application.executor.appInventory.rpmInventory(), sfi.director.cli.copy.run(), sfi.director.cli.app_subscribe.run(), sfi.director.cli.frinterface.run(), sfi.director.util.Tools.runParsePerl(), sfi.director.application.scripttask.ConfigHost.save(), sfi.director.application.config.Automounter.saveFile(), sfi.director.application.PackageManager.scanRepository(), sfi.director.application.DirectorPackage.scanRepository(), sfi.director.repository.LDIFTree.search(), sfi.director.repository.LDAP.search(), sfi.director.repository.LDAPndk.search(), sfi.director.application.autodoc.ServiceDepContainer.serviceBySpec(), sfi.director.util.Options.setOption(), sfi.director.application.DirectorPackage.setRelease(), sfi.director.util.Init.setup_base(), sfi.director.application.autodoc.InfoCollector.setupProxy(), sfi.director.repository.OnDemandDBConnection.setURL(), sfi.director.application.executor.appInventory.sfiInventory(), sfi.director.application.PackageList.sort(), sfi.director.util.Tools.split(), sfi.director.application.PackageManager.stringToPkg(), sfi.director.application.DirectorPackage.topkgdb(), sfi.director.gui.fields.Application.toString(), sfi.director.util.LogEntry.toVector(), sfi.director.repository.transform.ADProxyAddresses.transform(), sfi.director.repository.transform.HostAssignedGroups.transform(), sfi.director.repository.transform.NISfromMailaliases.transform(), sfi.director.repository.transform.HostAssignedUsers.transform(), sfi.director.repository.transform.ReDN.transform(), sfi.director.repository.transform.NISfromRevNetgroup.transform(), sfi.director.repository.transform.Mail2Netscape.transform(), and sfi.director.application.PackageList.versionCompare().
|
static |
Split a string into a vector of strings.
Split at whitespace locations where 'whitespace' is one or more spaces or tabs.
References sfi.director.util.Tools.split().
|
static |
|
static |
Referenced by sfi.director.util.Tools.applyModifier().
|
static |
Return a string representing the current time in a (director) standard format.
Referenced by sfi.director.util.DebugThreads.dumpStatus(), sfi.director.application.DirectorPackage.install(), sfi.director.jobs.JobMonitor.log(), sfi.director.application.FrontendHTTPServer.sessionProxy(), sfi.director.jobs.JobMonitor.traverse(), and sfi.director.util.AutoReaper.work().
|
static |
Return a string representing the passed time in a (director) standard format.
References com.graeff.dbedit.Record.add(), sfi.director.repository.DN.flat(), sfi.director.repository.DN.get(), sfi.director.repository.DBObject.getAttribute(), sfi.director.repository.DBObject.getAttributes(), sfi.director.repository.DBObject.getDN(), sfi.director.repository.DN.parent(), and com.graeff.dbedit.Record.set().
Referenced by sfi.director.application.DaemonObjectEdit.DaemonObjectEdit(), sfi.director.application.FrontendHTTPServer.db_event(), sfi.director.application.objevents.EventEnvironment.EventEnvironment(), and sfi.director.application.FrontendInterface.executeCommand().
References com.graeff.dbedit.Record.get(), com.graeff.dbedit.Record.getAttributes(), and sfi.director.repository.DBObject.setDN().
Referenced by sfi.director.application.ReportFreeMarker.apply(), sfi.director.application.objevents.EventEnvironment.dump(), sfi.director.gui.importers.Expand.exportRecord(), and sfi.director.application.DaemonObjectEdit.getDBObject().
|
static |
|
static |
Returns a (hopefully) system-wide unique ID.
References sfi.director.util.Setup.programid.
Referenced by sfi.director.schedule.Scheduler.executePendingDSUpdate(), sfi.director.application.autodoc.DocExtDocu.fetch(), sfi.director.util.Tools.findFreeNumber(), sfi.director.application.Report.generate(), sfi.director.application.autodoc.DocInfo.genLabel(), and sfi.director.application.FilePackageInstaller.id().
|
static |
References sfi.director.util.Tools.log(), sfi.director.util.Setup.program_cmdline, and sfi.director.util.Logger.WARNING.
Referenced by sfi.director.util.Tools.exit().
|
static |
Referenced by sfi.director.repository.NISTable.close(), sfi.director.invoker.StreamCmdInvoker.connect(), sfi.director.executor.CmdExecutor.connect(), sfi.director.util.Tools.execFilter(), sfi.director.util.Tools.execWait(), sfi.director.application.DirectorPackage.freeze(), sfi.director.application.DirectorPackage.packCpio(), sfi.director.retriever.PipeRetriever.setupExec(), and sfi.director.application.DirectorPackage.unpackUsingArchiver().
|
static |
do a Process.waitFor() and consume the exec()-ed commands output in order to avoid hangs.
References sfi.director.util.Tools.consume(), sfi.director.util.Tools.log(), sfi.director.util.StoppableThread.stopGracefully(), and sfi.director.util.Logger.WARNING.
|
static |
Vector used to store references to classes for the saveOurClass mechanism.
Referenced by sfi.director.util.Tools.saveOurClass().
|
static |
The program's debug level.
Higher debug level means more verbose debug output.
Referenced by sfi.director.invoker.StreamConnection.agentlistener(), sfi.director.invoker.SSLInvoker.connect(), sfi.director.invoker.StreamCmdInvoker.connect(), sfi.director.executor.CmdExecutor.connect(), sfi.director.invoker.AgentLogger.iLog(), sfi.director.jobs.JobLogger.iLog(), sfi.director.cli.CLILogger.iLog(), sfi.director.application.FrontendLogger.iLog(), sfi.director.util.Logger.iLog(), sfi.director.cli.testdb.main(), sfi.director.application.HostPackages.main(), sfi.director.application.DirectorPackage.main(), sfi.director.invoker.StreamConnection.masterlistener(), sfi.director.util.Stub.register(), sfi.director.cli.debug.run(), and sfi.director.invoker.StreamConnection.send_string().
|
static |
The Stream where debug output is sent to.
|
static |
This hash stores the command line options of the current program.
Referenced by sfi.director.util.Tools.getOpt().