LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.peer.file
Class LyImportFileDataProvider

java.lang.Object
  extended by leon.peer.LyDataProvider
      extended by leon.peer.LyPeerDataProvider
          extended by leon.peer.util.LyTableDataProvider
              extended by leon.peer.file.LyFileDataProvider
                  extended by leon.peer.file.LyFileInfoDataProvider
                      extended by leon.peer.file.LyImportFileDataProvider

public class LyImportFileDataProvider
extends LyFileInfoDataProvider

This class is used by DataSources to transmit their requests to an instance of RequestEncoder.

See Also:
LyRowObject, LyTableClass, LyColumnField, LyFileRequestEncoder, LyFileConnection, LyImportFileConnection

Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class leon.peer.file.LyFileDataProvider
SAVE_XML_FILES
 
Constructor Summary
LyImportFileDataProvider(LyApplication application, LyLocation location)
          Default constructor Initialization is done with the init method.
LyImportFileDataProvider(LyApplication application, java.lang.String id, java.lang.String filePath)
          Deprecated. use LyImportFileDataProvider(LyApplication, LyLocation) instead.
 
Method Summary
 void addErrorLine(int lineNumber)
          Adds a line containing an error.
 LyConnection createConnection()
          This class is a factory to create a LyConnection instance.
 java.util.BitSet getErrorLines()
          Returns the list of lines containing errors.
 void setDecodingType(int decodingType)
          Sets the decoding type.
 void setFileFieldIds(java.util.Vector<java.lang.String> fieldIds)
          Sets the list of the fields contained in the file.
 void setFilePath(java.lang.String filePath)
           
 void setLogicalClass(LyClassInfo classInfo)
          Sets the logical class associated with this import data provider.
 void setStartLine(int startLine)
          Sets the start line.
 
Methods inherited from class leon.peer.file.LyFileInfoDataProvider
validate
 
Methods inherited from class leon.peer.file.LyFileDataProvider
close, getRequestEncoder, setLocation
 
Methods inherited from class leon.peer.LyPeerDataProvider
getPeerClass, invalidate, load, resetPeerClasses, validate, validateNotifier
 
Methods inherited from class leon.peer.LyDataProvider
canBeFullyLoaded, dumpConnections, getApplication, getConnection, getEnvironment, getEventNotifier, getId, getLocation, getNbAvailableConnection, getNbConnection, hasLostConnection, isConnectionReady, isModified, isModified, isNotifierReady, isXASupported, releaseConnection, save, setEventNotifier, setModified, setNbConnection, sleep, validate, wakeUp
 
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

LyImportFileDataProvider

public LyImportFileDataProvider(LyApplication application,
                                LyLocation location)
Default constructor Initialization is done with the init method.


LyImportFileDataProvider

public LyImportFileDataProvider(LyApplication application,
                                java.lang.String id,
                                java.lang.String filePath)
Deprecated. use LyImportFileDataProvider(LyApplication, LyLocation) instead.

Constructor.

Parameters:
application -
id -
filePath -
Method Detail

setFilePath

public void setFilePath(java.lang.String filePath)

setDecodingType

public void setDecodingType(int decodingType)
Sets the decoding type.

Parameters:
decodingType - one of the following:

setFileFieldIds

public void setFileFieldIds(java.util.Vector<java.lang.String> fieldIds)
Sets the list of the fields contained in the file.

Parameters:
fields - the list of the fields contained in the file.

setLogicalClass

public void setLogicalClass(LyClassInfo classInfo)
Sets the logical class associated with this import data provider.

Parameters:
fields - the list of the fields contained in the file.

setStartLine

public void setStartLine(int startLine)
Sets the start line.

Parameters:
startLine - the index of the first line of the imported file containing real data.

addErrorLine

public void addErrorLine(int lineNumber)
Adds a line containing an error.

Parameters:
lineNumber - the index of the line containing the error.

getErrorLines

public java.util.BitSet getErrorLines()
Returns the list of lines containing errors.

Returns:
a bitset with the indexes of lines containing errors.

createConnection

public LyConnection createConnection()
Description copied from class: LyFileDataProvider
This class is a factory to create a LyConnection instance. Current implementation only return null, so this method must be overriden. This instance depends on the nature of the connection and must provide services such as opening/closing the connection, and (specific) accessor to the connection service.

This method is ovberriden and used internally. Use getConnection() to access to a connection instance.

Parent class LyDataProvider implements a connection pool so this Method may be called several times.

Overrides:
createConnection in class LyFileInfoDataProvider
Returns:
a new Connection instance. The connection instance is used in the specific LyRequest encoder implementation.
See Also:
LyDataProvider.getConnection(), LyDataProvider.releaseConnection(leon.peer.LyConnection)

(c) January 2013 - W4 S.A.

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