|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.knowgate.dataobjs.DBPersist
com.knowgate.crm.DistributionList
com.knowgate.crm.DirectList
public class DirectList
DirectList
A subclass of DistributionList with methods for loading List Members from text files.
Copyright: Copyright (c) KnowGate 2003-2006
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Field Summary | |
|---|---|
static int |
CHECK_INVALID_EMAIL
|
static int |
CHECK_INVALID_FORMAT
|
static int |
CHECK_INVALID_NAME
|
static int |
CHECK_INVALID_SALUTATION
|
static int |
CHECK_INVALID_SURNAME
|
static int |
CHECK_NAME_TOO_LONG
|
static int |
CHECK_OK
|
static int |
CHECK_SALUTATION_TOO_LONG
|
static int |
CHECK_SURNAME_TOO_LONG
|
static short |
ClassId
|
| Fields inherited from class com.knowgate.crm.DistributionList |
|---|
TYPE_BLACK, TYPE_DIRECT, TYPE_DYNAMIC, TYPE_STATIC |
| Fields inherited from class com.knowgate.dataobjs.DBPersist |
|---|
AllVals, sAuditCls, sAuditUsr, sTransactId |
| Constructor Summary | |
|---|---|
DirectList()
Default constructor |
|
DirectList(java.lang.String sCharSetName)
Constructor |
|
| Method Summary | |
|---|---|
int |
errorLine()
Get last error line |
int |
getColumnPosition(java.lang.String sColumnName)
|
java.lang.String |
getField(int iCol,
int iRow)
Get value for a field at a given row and column. |
java.lang.String |
getField(java.lang.String sCol,
int iRow)
Get value for a field at a given row and column. |
java.lang.String |
getLine(int iLine)
Get line from a parsed file. |
int |
getLineCount()
Get line count after parsing a text file |
int[] |
parseFile(java.lang.String sFilePath,
java.lang.String sFileDescriptor)
Parse a delimited text file |
void |
removeFromList(JDCConnection oConn,
java.lang.String sListId)
Remove members from a Static, Direct or Black Distribution List. |
void |
updateList(JDCConnection oConn,
java.lang.String sListId,
short iStatus)
Adds members to a Static, Direct or Black Distribution List. |
| Methods inherited from class com.knowgate.crm.DistributionList |
|---|
activeCompanies, activeContacts, activeMembers, append, blackList, clone, contains, delete, delete, memberCount, overwrite, print, store, substract |
| Methods inherited from class com.knowgate.dataobjs.DBPersist |
|---|
allcaps, allcaps, changelog, clear, clone, containsKey, containsValue, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getInteger, getIntervalPart, getItemMap, getItems, getMoney, getShort, getSQLDate, getSQLTime, getString, getStringNull, getTable, getTable, getTableName, getTime, getTimeOfDay, getTimestamp, getUIdFromName, isEmpty, isNull, iterator, keySet, load, load, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, size, toLowerCase, toUpperCase, toXML, toXML, toXML, toXML, values |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
public static final int CHECK_OK
public static final int CHECK_INVALID_EMAIL
public static final int CHECK_NAME_TOO_LONG
public static final int CHECK_SURNAME_TOO_LONG
public static final int CHECK_INVALID_FORMAT
public static final int CHECK_SALUTATION_TOO_LONG
public static final int CHECK_INVALID_NAME
public static final int CHECK_INVALID_SURNAME
public static final int CHECK_INVALID_SALUTATION
public static final short ClassId
| Constructor Detail |
|---|
public DirectList()
public DirectList(java.lang.String sCharSetName)
String - Name of character set to be used when parsing files (ISO-8859-1, UTF-8, etc.)| Method Detail |
|---|
public int errorLine()
public int getLineCount()
public int[] parseFile(java.lang.String sFilePath,
java.lang.String sFileDescriptor)
throws java.lang.ArrayIndexOutOfBoundsException,
java.lang.NullPointerException,
java.lang.IllegalArgumentException,
java.io.UnsupportedEncodingException,
java.io.IOException,
java.io.FileNotFoundException
sFilePath - File PathsFileDescriptor - Delimited Column List.| 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 { ',' ';' '`' '¨' '?' '"' } |
java.lang.ArrayIndexOutOfBoundsException
java.io.FileNotFoundException
java.lang.IllegalArgumentException
java.io.IOException
java.lang.NullPointerException
java.io.UnsupportedEncodingExceptionCSVParserpublic int getColumnPosition(java.lang.String sColumnName)
sColumnName - Column Name
public java.lang.String getLine(int iLine)
throws java.lang.IllegalStateException
Get line from a parsed file.
Lines are delimited by the Line Feed (LF, CHAR(10), '\n') character
iLine - Line Number [0..getLineCount()-1]
java.lang.IllegalStateException - If parseFile() has not been called prior to getLine()
public java.lang.String getField(int iCol,
int iRow)
throws java.lang.ArrayIndexOutOfBoundsException
Get value for a field at a given row and column.
Column indexes are zero based. Row indexes range from 0 to getLineCount()-1.
iCol - Column IndexiRow - Row Index
java.lang.IllegalStateException - If parseFile() method was not called prior to
getField()
java.lang.ArrayIndexOutOfBoundsException - If Column or Row Index is out of bounds.
public java.lang.String getField(java.lang.String sCol,
int iRow)
throws java.lang.ArrayIndexOutOfBoundsException
Get value for a field at a given row and column.
sCol - Column NameiRow - Row Name
java.lang.ArrayIndexOutOfBoundsException
public void updateList(JDCConnection oConn,
java.lang.String sListId,
short iStatus)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException,
java.lang.ClassCastException,
java.sql.SQLException
Adds members to a Static, Direct or Black Distribution List.
oConn - Database connectionsListId - DistributionList GUIDiStatus - 1 if loaded members are to be set as active, 0 if loaded member are to be set as unactive.
java.lang.IllegalArgumentException - If DistributionList does not exist.
java.lang.ClassCastException - If sListId type is DYNAMIC.
java.lang.IllegalStateException - If parseFile() has not been called prior to updateList()
java.lang.StringIndexOutOfBoundsException - If a row if malformed
java.sql.SQLException
public void removeFromList(JDCConnection oConn,
java.lang.String sListId)
throws java.lang.IllegalArgumentException,
java.sql.SQLException,
java.lang.ClassCastException
Remove members from a Static, Direct or Black Distribution List.
Members are matched by their e-mail address (tx_email column)
oConn - Database connectionsListId - DistributionList GUID
java.lang.IllegalArgumentException - If DistributionList does not exist.
java.lang.ClassCastException - If sListId type is DYNAMIC
java.lang.IllegalStateException - If parseFile() has not been called prior to updateList()
java.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||