|
ElegantJ Data Tables Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.elegantj.data.dataprovider.AbstractDataProvider
com.elegantj.data.dataprovider.text.TextDataProvider
com.elegantj.data.dataprovider.ftp.FTPTextDataProvider
This class encapsulates functionality of an FTP text data provider.
The basic functionality can be summarized as follows:
- Connect to FTP Server by specifying host, port, username and password.
- Retrieve the data and store it in text data provider or save the data to
the remote file on FTP Server.
- Close the connection.
This bean provides powerful designing aspects by providing following user friendly property.
DataProvider the data provider
File the path of the remote file
RowSeparator the row separator string
ColumnSeparator the column separator string
TextQualifier the text qualifier string
FirstRowAsColumnNames indicates whether the first row of the retrieved data is column names or not
ColumnsDelimited indicates whether the columns are delimited or fixed width
SkippedColumns the comma separated indexes of the columns to be skipped
ColumnsWidth the comma separated width of the columns
SortCriteria the criteria for sorting the data
FilterCriteria the criteria for filtering the data
FilterState indicates whether the filter criteria is applied or not
SaveOnlyFilteredData indicates to save only filtered rows or all rows
FetchSize the maximum number of rows which can be retrieved
AppendDataOnFetchNext indicates whether the next fetched data is appended or replaced to existing data
SkippedRows the total number of rows to be skipped
HostName the name or IP address of the remote host
Port the FTP port number
UserName the name of the FTP user
Password the password associated with the FTP user
| Field Summary |
| Fields inherited from class com.elegantj.data.dataprovider.text.TextDataProvider |
DEFAULT_COLUMN_SEPARATOR, DEFAULT_ROW_SEPARATOR, DEFAULT_TEXT_QUALIFIER, forInput, in, out |
| Fields inherited from class com.elegantj.data.dataprovider.AbstractDataProvider |
c1, changes, clientTable, columnNames, currentIndex, dataTable |
| Constructor Summary | |
FTPTextDataProvider()
|
|
| Method Summary | |
void |
changeToParentDirectory()
Changes to remote parent directory. |
void |
changeWorkingDirectory(java.lang.String remotePath)
Changes a working remote directory. |
boolean |
close()
Closes input / output stream of the text file |
boolean |
connect()
Connects to FTP server. |
boolean |
disconnect()
Disconnects from FTP server. |
java.lang.String |
getCurrentWorkingDirectory()
Returns name of current working remote directory. |
java.lang.String |
getFileList()
Returns a list of files in current working remote directory. |
java.lang.String |
getHostName()
Returns the FTP Server host name. |
java.lang.String |
getPassword()
Returns the password. |
int |
getPort()
Returns the FTP port. |
java.lang.String |
getUserName()
Returns the username. |
boolean |
open(boolean input)
Opens input stream or output stream of the text file |
void |
readExternal(java.io.ObjectInput in)
|
void |
retrieveDataFromServer(java.lang.String remotePath)
Retrieves the data from the remote file on FTP Server. |
void |
saveDataToServer(java.lang.String remoteFile)
Saves the data to remote file on FTP Server. |
void |
setHostName(java.lang.String newHost)
Sets the FTP Server host name. |
void |
setPassword(java.lang.String newPassword)
Sets the password to logging into FTP Server. |
void |
setPort(int newPort)
Sets the FTP port. |
void |
setURL(java.lang.String fileURL)
Not applicable |
void |
setURLConnectionEnabled(boolean b)
Not applicable |
void |
setUserName(java.lang.String newUser)
Sets the username to logging into FTP Server. |
void |
writeExternal(java.io.ObjectOutput out)
Externalizable interface implementation to save and retrieve the state of this bean |
| Methods inherited from class com.elegantj.data.dataprovider.text.TextDataProvider |
getFile, getSkippedColumns, getURL, isFetchNext, isURLConnectionEnabled, nextData, retrieve, retrieveData, save, saveData, setFile, setSkippedColumns |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FTPTextDataProvider()
| Method Detail |
public void setURL(java.lang.String fileURL)
setURL in class TextDataProviderfileURL - the URL of the text filepublic void setURLConnectionEnabled(boolean b)
setURLConnectionEnabled in class TextDataProviderb - true to enable the URL connectionpublic boolean open(boolean input)
open in class TextDataProviderinput - true to open the input stream, false to open the output stream
public boolean close()
close in class TextDataProviderpublic boolean connect()
public boolean disconnect()
public void changeWorkingDirectory(java.lang.String remotePath)
public void retrieveDataFromServer(java.lang.String remotePath)
remotePath - The path of the remote file on FTP Server.public void saveDataToServer(java.lang.String remoteFile)
remoteFile - The path of the remote file on FTP Server.public void changeToParentDirectory()
public java.lang.String getFileList()
public java.lang.String getCurrentWorkingDirectory()
public void setHostName(java.lang.String newHost)
newHost - The FTP Server host name.public java.lang.String getHostName()
public void setPort(int newPort)
newPort - The FTP port.public int getPort()
public void setUserName(java.lang.String newUser)
newUser - The username to logging into FTP Server.public java.lang.String getUserName()
public void setPassword(java.lang.String newPassword)
newPassword - The password to logging into FTP Server.public java.lang.String getPassword()
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class TextDataProviderjava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class TextDataProviderjava.io.IOException
java.lang.ClassNotFoundException
|
ElegantJ Data Tables Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||