LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.peer.xml.file
Class LyXmlFileConnection

java.lang.Object
  extended by leon.peer.LyConnection
      extended by leon.peer.xml.LyXmlConnection
          extended by leon.peer.xml.file.LyXmlFileConnection

public class LyXmlFileConnection
extends LyXmlConnection

This class is used as a connection for XML file provider.

See Also:
LyXmlConnection

Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LyXmlFileConnection(LyApplication application, java.lang.String xmlDirectory)
          Constructor.
 
Method Summary
 void closeFile(java.io.PrintWriter pw)
          Close the PrintWriter and write the end of file.
 java.io.Reader getReader(LyClass peerClass)
           
 java.io.PrintWriter openFile(LyClass peerClass)
          Open the file of peerClass and write the begining of file.
 void writeLine(java.lang.String line, java.io.PrintWriter pw)
          Write a line in the file containing objects data.
 boolean writeXml(LyClass peerClass, java.util.Vector<java.lang.String> lines)
          Write lines in the file containing objects data.
 
Methods inherited from class leon.peer.LyConnection
addValue, autoCommit, close, commit, dump, getError, getUID, getValue, isClosed, isReserved, prepareCommit, released, reserved, rollback, setDataProvider, setError, setUID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LyXmlFileConnection

public LyXmlFileConnection(LyApplication application,
                           java.lang.String xmlDirectory)
Constructor.

Method Detail

getReader

public java.io.Reader getReader(LyClass peerClass)
Overrides:
getReader in class LyXmlConnection

writeXml

public boolean writeXml(LyClass peerClass,
                        java.util.Vector<java.lang.String> lines)
Write lines in the file containing objects data.

Overrides:
writeXml in class LyXmlConnection
Returns:
true if the operation was successful.

openFile

public java.io.PrintWriter openFile(LyClass peerClass)
Open the file of peerClass and write the begining of file.

Overrides:
openFile in class LyXmlConnection
Returns:
the PrintWriter of file of peerClass.

writeLine

public void writeLine(java.lang.String line,
                      java.io.PrintWriter pw)
Write a line in the file containing objects data.

Overrides:
writeLine in class LyXmlConnection

closeFile

public void closeFile(java.io.PrintWriter pw)
Close the PrintWriter and write the end of file.

Overrides:
closeFile in class LyXmlConnection

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com