Node Director
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sfi.director.repository.FileDB Class Reference

subclasses implement a simple flat file based DBConnection usually used for accessing/writing objects in text based databases such as /etc/passwd More...

Inheritance diagram for sfi.director.repository.FileDB:
sfi.director.repository.DBConnection sfi.director.repository.ApacheGroupFile sfi.director.repository.ApachePasswdFile sfi.director.repository.AutomasterFile sfi.director.repository.AutomounterFile sfi.director.repository.BootparamsFile sfi.director.repository.CupsDriversFile sfi.director.repository.CupsPrintcapFile sfi.director.repository.CupsPrintersFile sfi.director.repository.DHCPfile sfi.director.repository.DNSfile sfi.director.repository.DNSrevfile sfi.director.repository.EthersFile sfi.director.repository.FileWrapperDB sfi.director.repository.GroupFile sfi.director.repository.HostsFile sfi.director.repository.JSONFile sfi.director.repository.LDIFFile sfi.director.repository.MailAccessFile sfi.director.repository.MailAliasFile sfi.director.repository.MailertableFile sfi.director.repository.MailNameFile sfi.director.repository.NameListFile sfi.director.repository.NCUserCfgFile sfi.director.repository.NetgroupFile sfi.director.repository.NetmasksFile sfi.director.repository.NidumpFile sfi.director.repository.PasswdFile sfi.director.repository.PopmapFile sfi.director.repository.ProtocolsFile sfi.director.repository.SambaPasswdFile sfi.director.repository.ServicesFile sfi.director.repository.ShadowFile sfi.director.repository.TimezoneFile sfi.director.repository.VirtusertableFile

Public Member Functions

 FileDB ()
 FileDB (String url)
void setURL (String url) throws DirectorException
 set URL of the RemoteFile used for input/output
Enumeration search (final String expr, Options searchopt) throws DirectorException
void append (DBObject dbo) throws DirectorException
void truncate () throws DirectorException
void close () throws DirectorException
- Public Member Functions inherited from sfi.director.repository.DBConnection
void setCredentials (Credentials cred)
String getURL ()
void setContext (RemoteJob context)
void setOption (String option)
void setOption (String option, String val)
void setOption (Options opt)
void setOption (SURL url)
String getOption (String option)
void setError (Exception e)
Exception getError ()
DN completeDN (DN dn)
Enumeration search (String expr) throws DirectorException
abstract Enumeration search (String expr, Options searchopt) throws DirectorException
void replace (DBObject dbo) throws DirectorException
void remove (DBObject dbo) throws DirectorException
DBAccessor get (DN dn) throws DirectorException
void modify (DBObject dbo, Vector attrs) throws DirectorException

Protected Member Functions

void finalize ()
DBAccessor readNext (BufferedReader in, Filter expr)
void open_append () throws DirectorException
int eatspace (String s, int idx)
int backeatspace (String s, int idx)
String readRecord (BufferedReader file) throws Exception
String readRecord_line (BufferedReader file) throws Exception
String readRecord_freeline (BufferedReader file) throws Exception
String readRecord_freemultiline (BufferedReader file) throws Exception
String readRecord_separator (BufferedReader file, String separator) throws Exception
String readRecord_separator (BufferedReader file, String separator, String comment) throws Exception
String readRecord_startSeparator (BufferedReader file, String separator) throws Exception
DBObject decode (String record) throws DirectorException
String encode (DBObject dbo) throws DirectorException
String file (DBObject dbo) throws DirectorException

Protected Attributes

RemoteFile file = null
OutputStream out = null
- Protected Attributes inherited from sfi.director.repository.DBConnection
String url
RemoteJob context
Options options = new Options()
Exception error = null

Additional Inherited Members

- Static Public Member Functions inherited from sfi.director.repository.DBConnection
static Enumeration unwrap (final Enumeration wrapped)
 Given an Enumeration of DBAccessor objects as returned by the search() method, returns an Enumeration of DBObject objects.
static String escapeSearchval (String val)
- Static Public Attributes inherited from sfi.director.repository.DBConnection
static final String SEARCH_BASEDN = "BaseDN"
 used in conjunction with the search() method to set the base DN of the subtree we are about to search (option)
static final String SEARCH_NOSUB = "Sub"
static final String SEARCH_WITHSTRUCT = "WithStruct"
static final String SEARCH_SORT = "Sort"
static final String SEARCH_SCHEMA = "Schema"

Detailed Description

subclasses implement a simple flat file based DBConnection usually used for accessing/writing objects in text based databases such as /etc/passwd

Constructor & Destructor Documentation

sfi.director.repository.FileDB.FileDB ( )
sfi.director.repository.FileDB.FileDB ( String  url)
  • Parameters
    url

References sfi.director.repository.FileDB.setURL().

Member Function Documentation

void sfi.director.repository.FileDB.append ( DBObject  dbo) throws DirectorException
virtual
int sfi.director.repository.FileDB.backeatspace ( String  s,
int  idx 
)
protected
void sfi.director.repository.FileDB.close ( ) throws DirectorException
DBObject sfi.director.repository.FileDB.decode ( String  record) throws DirectorException
protected
int sfi.director.repository.FileDB.eatspace ( String  s,
int  idx 
)
protected
String sfi.director.repository.FileDB.encode ( DBObject  dbo) throws DirectorException
protected
String sfi.director.repository.FileDB.file ( DBObject  dbo) throws DirectorException
protected
void sfi.director.repository.FileDB.finalize ( )
protected
void sfi.director.repository.FileDB.open_append ( ) throws DirectorException
protected
DBAccessor sfi.director.repository.FileDB.readNext ( BufferedReader  in,
Filter  expr 
)
protected
String sfi.director.repository.FileDB.readRecord ( BufferedReader  file) throws Exception
protected
String sfi.director.repository.FileDB.readRecord_freeline ( BufferedReader  file) throws Exception
protected
String sfi.director.repository.FileDB.readRecord_freemultiline ( BufferedReader  file) throws Exception
protected
String sfi.director.repository.FileDB.readRecord_line ( BufferedReader  file) throws Exception
protected
String sfi.director.repository.FileDB.readRecord_separator ( BufferedReader  file,
String  separator 
) throws Exception
protected
String sfi.director.repository.FileDB.readRecord_separator ( BufferedReader  file,
String  separator,
String  comment 
) throws Exception
protected
String sfi.director.repository.FileDB.readRecord_startSeparator ( BufferedReader  file,
String  separator 
) throws Exception
protected
Enumeration sfi.director.repository.FileDB.search ( final String  expr,
Options  searchopt 
) throws DirectorException
void sfi.director.repository.FileDB.setURL ( String  url) throws DirectorException

set URL of the RemoteFile used for input/output

Exceptions
DirectorException
Parameters
url

Reimplemented from sfi.director.repository.DBConnection.

References sfi.director.repository.FileDB.file, sfi.director.retriever.RetrieverManager.getConnection(), and sfi.director.repository.DBConnection.url.

Referenced by sfi.director.repository.FileDB.FileDB().

void sfi.director.repository.FileDB.truncate ( ) throws DirectorException
virtual

Member Data Documentation

RemoteFile sfi.director.repository.FileDB.file = null
protected
OutputStream sfi.director.repository.FileDB.out = null
protected

The documentation for this class was generated from the following file: