Node Director
|
implements read/write of files in /etc/netgroup format. More...
Public Member Functions | |
NetgroupFile () | |
NetgroupFile (String url) | |
Public Member Functions inherited from sfi.director.repository.FileDB | |
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 |
Static Public Member Functions | |
static DBObject | decodeEntry (String record) |
transform a line in /etc/netgroup format into a nisNetgroup DBobject | |
static String | encodeEntry (DBObject dbo, boolean withName, int maxlen) |
transform a nisNetgroup DBObject into one or multiple lines in /etc/netgroup format. |
Protected Member Functions | |
String | readRecord (BufferedReader in) throws Exception |
DBObject | decode (String record) |
transform a line in /etc/netgroup format into a nisNetgroup DBObject. | |
String | encode (DBObject dbo) throws DirectorException |
transform a nisNetgroup DBObject into one or multiple lines in /etc/netgroup format. | |
Protected Member Functions inherited from sfi.director.repository.FileDB | |
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_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 |
String | file (DBObject dbo) throws DirectorException |
Additional Inherited Members | |
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" |
Protected Attributes inherited from sfi.director.repository.FileDB | |
RemoteFile | file = null |
OutputStream | out = null |
implements read/write of files in /etc/netgroup format.
When writing netgroup files limit record size to 1024 bytes (or the limit supplied using the "LineSize" option).
sfi.director.repository.NetgroupFile.NetgroupFile | ( | ) |
sfi.director.repository.NetgroupFile.NetgroupFile | ( | String | url | ) |
|
protected |
transform a line in /etc/netgroup format into a nisNetgroup DBObject.
Reimplemented from sfi.director.repository.FileDB.
References sfi.director.repository.NetgroupFile.decodeEntry().
|
static |
transform a line in /etc/netgroup format into a nisNetgroup DBobject
References sfi.director.repository.DBObject.getValue(), sfi.director.repository.DBObject.setDN(), and sfi.director.util.Tools.split().
Referenced by sfi.director.repository.NetgroupFile.decode(), and sfi.director.repository.transform.NISfromNetgroup.encodeEntry().
|
protected |
transform a nisNetgroup DBObject into one or multiple lines in /etc/netgroup format.
This method invokes encodeEntry. The maximum line length is set to 1024 bytes by default. This default can be overriden via the LineSize option.
Reimplemented from sfi.director.repository.FileDB.
References sfi.director.repository.NetgroupFile.encodeEntry(), and sfi.director.repository.DBConnection.getOption().
|
static |
transform a nisNetgroup DBObject into one or multiple lines in /etc/netgroup format.
If the withName argument is true the lines start with the netgroup name followed by a space, if it is false only the group members are listed. The maxlen argument specifies the maximum line (record) length. Some services, like e.g. NIS limit record lengths. If a netgroup entry's size exceeds the maxlen limit it is automatically split up into multiple subgroups.
References sfi.director.repository.DBObject.getAttribute(), sfi.director.repository.DBObject.getValue(), and sfi.director.repository.DBObject.isMember().
Referenced by sfi.director.repository.NetgroupFile.encode().
|
protected |
Reimplemented from sfi.director.repository.FileDB.
References sfi.director.repository.FileDB.readRecord_freemultiline().