| com.knowgate.crm.DistributionList com.knowgate.crm.DirectList
DirectList | public class DirectList extends DistributionList (Code) | | DirectList
A subclass of DistributionList with methods for loading List Members from
text files.
Copyright: Copyright (c) KnowGate 2003-2006
author: Sergio Montoro Ten version: 3.0 |
Method Summary | |
public int | errorLine() | public int | getColumnPosition(String sColumnName) | public String | getField(int iCol, int iRow) Get value for a field at a given row and column.
Column indexes are zero based. | public String | getField(String sCol, int iRow) | public String | getLine(int iLine) Get line from a parsed file.
Lines are delimited by the Line Feed (LF, CHAR(10), '\n') character
Parameters: iLine - Line Number [0..getLineCount()-1] Full Text for Line. | public int | getLineCount() | public int[] | parseFile(String sFilePath, String sFileDescriptor) Parse a delimited text file
Parameters: sFilePath - File Path Parameters: sFileDescriptor - Delimited Column List. The only valid column names are { tx_email, tx_name, tx_surname, id_format, tx_salutation }. Column names may be delimited by ',' ';' or '\t'.Columns names may be quoted. | public void | removeFromList(JDCConnection oConn, String sListId) | public void | updateList(JDCConnection oConn, String sListId, short iStatus) |
CHECK_INVALID_EMAIL | final public static int CHECK_INVALID_EMAIL(Code) | | |
CHECK_INVALID_FORMAT | final public static int CHECK_INVALID_FORMAT(Code) | | |
CHECK_INVALID_NAME | final public static int CHECK_INVALID_NAME(Code) | | |
CHECK_INVALID_SALUTATION | final public static int CHECK_INVALID_SALUTATION(Code) | | |
CHECK_INVALID_SURNAME | final public static int CHECK_INVALID_SURNAME(Code) | | |
CHECK_NAME_TOO_LONG | final public static int CHECK_NAME_TOO_LONG(Code) | | |
CHECK_OK | final public static int CHECK_OK(Code) | | |
CHECK_SALUTATION_TOO_LONG | final public static int CHECK_SALUTATION_TOO_LONG(Code) | | |
CHECK_SURNAME_TOO_LONG | final public static int CHECK_SURNAME_TOO_LONG(Code) | | |
ClassId | final public static short ClassId(Code) | | |
DirectList | public DirectList()(Code) | | Default constructor
|
DirectList | public DirectList(String sCharSetName)(Code) | | Constructor
Parameters: String - Name of character set to be used when parsing files (ISO-8859-1, UTF-8, etc.) since: 3.0 |
errorLine | public int errorLine()(Code) | | Get last error line
int |
getColumnPosition | public int getColumnPosition(String sColumnName)(Code) | | Parameters: sColumnName - Column Name Zero based index for column position or -1 if column was not found. |
getLine | public String getLine(int iLine) throws IllegalStateException(Code) | | Get line from a parsed file.
Lines are delimited by the Line Feed (LF, CHAR(10), '\n') character
Parameters: iLine - Line Number [0..getLineCount()-1] Full Text for Line. If iLine<0 or iLine>=getLineCount() then null throws: IllegalStateException - If parseFile() has not been called prior to getLine() |
getLineCount | public int getLineCount()(Code) | | Get line count after parsing a text file
int |
parseFile | public int[] parseFile(String sFilePath, String sFileDescriptor) throws ArrayIndexOutOfBoundsException, NullPointerException, IllegalArgumentException, UnsupportedEncodingException, IOException, FileNotFoundException(Code) | | Parse a delimited text file
Parameters: sFilePath - File Path Parameters: sFileDescriptor - Delimited Column List. The only valid column names are { tx_email, tx_name, tx_surname, id_format, tx_salutation }. Column names may be delimited by ',' ';' or '\t'.Columns names may be quoted. Array of status for each parsed line.
CHECK_OK | Line is OK | CHECK_INVALID_EMAIL | tx_email is longer than 100 characters or it is rejected by method Gadgets.checkEMail() | CHECK_NAME_TOO_LONG | tx_name is longer than 100 characters | CHECK_INVALID_NAME | tx_name contains forbidden characters { ',' ';' '`' '¨' '?' '"' } | CHECK_SURNAME_TOO_LONG | tx_surname is longer than 100 characters | CHECK_INVALID_SURNAME | tx_surname contains forbidden characters { ',' ';' '`' '¨' '?' '"' } | CHECK_INVALID_FORMAT | id_format is longer than 4 characters | CHECK_SALUTATION_TOO_LONG | tx_salutation is longer than 16 characters | CHECK_INVALID_SALUTATION | tx_salutation contains forbidden characters { ',' ';' '`' '¨' '?' '"' } |
throws: ArrayIndexOutOfBoundsException - throws: FileNotFoundException - throws: IllegalArgumentException - throws: IOException - throws: NullPointerException - throws: UnsupportedEncodingException - See Also: com.knowgate.misc.CSVParser |
Methods inherited from com.knowgate.crm.DistributionList | public String activeCompanies(JDCConnection oConn) throws SQLException(Code)(Java Doc) public String activeContacts(JDCConnection oConn) throws SQLException(Code)(Java Doc) public String activeMembers(JDCConnection oConn) throws SQLException, IllegalStateException(Code)(Java Doc) public void append(JDCConnection oConn, String sListGUID) throws SQLException, IllegalArgumentException, IllegalStateException, ClassCastException(Code)(Java Doc) public String blackList(JDCConnection oConn) throws SQLException, IllegalStateException(Code)(Java Doc) public String clone(JDCConnection oConn) throws SQLException(Code)(Java Doc) public boolean contains(JDCConnection oConn, String sMember) throws SQLException(Code)(Java Doc) public boolean delete(JDCConnection oConn) throws SQLException(Code)(Java Doc) public static boolean delete(JDCConnection oConn, String sListGUID) throws SQLException(Code)(Java Doc) public int memberCount(JDCConnection oConn) throws SQLException(Code)(Java Doc) public void overwrite(JDCConnection oConn, String sListGUID) throws SQLException, IllegalArgumentException, ClassCastException, IllegalStateException(Code)(Java Doc) public String print(JDCConnection oConn, boolean bPrintHeader) throws SQLException(Code)(Java Doc) public boolean store(JDCConnection oConn) throws SQLException(Code)(Java Doc) public void substract(JDCConnection oConn, String sListGUID) throws SQLException, IllegalArgumentException, IllegalStateException, ClassCastException(Code)(Java Doc)
|
|
|