sfi.director.repository.NetgroupFile Class Reference

Inheritance diagram for sfi.director.repository.NetgroupFile:

sfi.director.repository.FileDB sfi.director.repository.DBConnection List of all members.

Detailed Description

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).


Public Member Functions

 NetgroupFile ()
 NetgroupFile (String url)

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.


Constructor & Destructor Documentation

sfi.director.repository.NetgroupFile.NetgroupFile  ) 
 

sfi.director.repository.NetgroupFile.NetgroupFile String  url  ) 
 


Member Function Documentation

DBObject sfi.director.repository.NetgroupFile.decode String  record  )  [protected]
 

transform a line in /etc/netgroup format into a nisNetgroup DBObject.

See also:
decodeEntry(String)

Reimplemented from sfi.director.repository.FileDB.

static DBObject sfi.director.repository.NetgroupFile.decodeEntry String  record  )  [static]
 

transform a line in /etc/netgroup format into a nisNetgroup DBobject

String sfi.director.repository.NetgroupFile.encode DBObject  dbo  )  throws DirectorException [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.

See also:
encodeEntry(DBObject,boolean,int)

Reimplemented from sfi.director.repository.FileDB.

static String sfi.director.repository.NetgroupFile.encodeEntry DBObject  dbo,
boolean  withName,
int  maxlen
[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.

String sfi.director.repository.NetgroupFile.readRecord BufferedReader  in  )  throws Exception [protected]
 

Reimplemented from sfi.director.repository.FileDB.


The documentation for this class was generated from the following file:
Generated on Sat Feb 11 01:20:25 2012 for Node Director by  doxygen 1.4.5