org.opennms.bb.eui.common.utils
Class UserProfWriter

java.lang.Object
  |
  +--org.opennms.bb.eui.common.utils.UserProfWriter
Direct Known Subclasses:
AdminMainUserProfWriter, DPControlUserProfWriter, EUIUserProfWriter, SMUserProfWriter, SnmpUserProfWriter

public class UserProfWriter
extends Object

UserProfWriter is a general user profile writer that each application
 can extend.

 It provides the mechanism to write the DTD, header and all other 
 applications. Also skips the old information for the current application
 All subclasses need to do is override the 'writeCurApplInfo()' method
 to write out the current application block and call the 'writeInto()'
 method with the appropriate filename

 It throws an IOException if the user profile file write fails for
 any reason

Author:
Sowmya

Field Summary
 String APPL_CLS
           
 String APPL_NAME
           
(package private)  String PERSPROF
           
(package private)  String PERSPROF_CLS
           
 
Constructor Summary
UserProfWriter(String applName)
          Writes into the filename passed in
 
Method Summary
(package private)  void readAfterCurAppl(FileReader fileReader, StringBuffer bufAfterCurAppl)
           
(package private)  void readDTD(FileReader fileReader, StringBuffer DTDBuffer)
           
(package private)  void readTillCurAppl(FileReader fileReader, StringBuffer bufTillCurAppl)
           
(package private)  void skipCurApplOldInfo(FileReader fileReader)
           
(package private)  void skipHeader(FileReader fileReader)
           
protected  void writeCurApplInfo(FileWriter fileWriter)
           
(package private)  void writeHeader(FileWriter fileWriter)
           
(package private)  void writeInfo(FileWriter fileWriter, StringBuffer infoBuffer)
           
protected  void writeInto(String fileName)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

APPL_NAME

public String APPL_NAME

APPL_CLS

public final String APPL_CLS

PERSPROF

final String PERSPROF

PERSPROF_CLS

final String PERSPROF_CLS
Constructor Detail

UserProfWriter

public UserProfWriter(String applName)
               throws IOException
Writes into the filename passed in
Method Detail

writeInto

protected void writeInto(String fileName)
                  throws IOException

writeInfo

void writeInfo(FileWriter fileWriter,
               StringBuffer infoBuffer)
         throws IOException

writeHeader

void writeHeader(FileWriter fileWriter)
           throws IOException

writeCurApplInfo

protected void writeCurApplInfo(FileWriter fileWriter)
                         throws IOException

readDTD

void readDTD(FileReader fileReader,
             StringBuffer DTDBuffer)
       throws IOException

skipHeader

void skipHeader(FileReader fileReader)
          throws IOException

readTillCurAppl

void readTillCurAppl(FileReader fileReader,
                     StringBuffer bufTillCurAppl)
               throws IOException

skipCurApplOldInfo

void skipCurApplOldInfo(FileReader fileReader)
                  throws IOException

readAfterCurAppl

void readAfterCurAppl(FileReader fileReader,
                      StringBuffer bufAfterCurAppl)
                throws IOException