public class Subscription extends DBPersist
NewsGroup Subscription
Handles subscriptions of users from k_users table to newsgroups from k_newsgroups table
Modifier and Type | Field and Description |
---|---|
static short |
ACTIVE |
static short |
ACTIVE_MY_FOR_THREADS_ONLY |
static short |
GROUP_DIGEST |
static short |
GROUP_NONE |
static short |
UNACTIVE |
Constructor and Description |
---|
Subscription()
Default constructor
|
Subscription(JDCConnection oConn,
java.lang.String sNewsGroupId,
java.lang.String sUserId) |
Modifier and Type | Method and Description |
---|---|
static boolean |
activate(JDCConnection oConn,
java.lang.String sNewsGroupId,
java.lang.String sUserId)
Activate a Subscription
Set k_newsgroup_subscriptions.id_status=ACTIVE
|
static boolean |
deactivate(JDCConnection oConn,
java.lang.String sNewsGroupId,
java.lang.String sUserId)
Deactivate a Subscription
Set k_newsgroup_subscriptions.id_status=UNACTIVE
|
static boolean |
subscribe(JDCConnection oConn,
java.lang.String sNewsGroupId,
java.lang.String sUserId)
Subscribe ACLUser to a NewsGroup
Message format is TXT with no grouping by default.
|
static boolean |
subscribe(JDCConnection oConn,
java.lang.String sNewsGroupId,
java.lang.String sUserId,
java.lang.String sMessageFormat,
short iMessagesGrouping)
Subscribe ACLUser to a NewsGroup
Newly created subscriptions are activated by default.
|
static boolean |
unsubscribe(JDCConnection oConn,
java.lang.String sNewsGroupId,
java.lang.String sUserId)
Unsubscribe ACLUser to a NewsGroup
The ACLUser is removed from table k_newsgroup_subscriptions for given NewsGroup.
|
allcaps, allcaps, clear, clone, columns, containsKey, containsValue, delete, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getIntArray, getInteger, getIntegerArray, getIntervalPart, getItemMap, getItems, getMoney, getPrimaryKey, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTime, getTimeOfDay, getTimestamp, isEmpty, isNull, iterator, keySet, load, load, parseXML, put, put, put, put, put, put, 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, replace, setAuditTransact, setAuditUser, setCreationDate, setPrimaryKey, size, store, toLowerCase, toUpperCase, toXML, toXML, toXML, values
public static final short UNACTIVE
public static final short ACTIVE
public static final short ACTIVE_MY_FOR_THREADS_ONLY
public static final short GROUP_NONE
public static final short GROUP_DIGEST
public Subscription()
public Subscription(JDCConnection oConn, java.lang.String sNewsGroupId, java.lang.String sUserId) throws java.sql.SQLException
java.sql.SQLException
public static boolean subscribe(JDCConnection oConn, java.lang.String sNewsGroupId, java.lang.String sUserId, java.lang.String sMessageFormat, short iMessagesGrouping) throws java.sql.SQLException
Subscribe ACLUser to a NewsGroup
Newly created subscriptions are activated by default.
oConn
- JDBC Database ConnectionsNewsGroupId
- NewsGroup GUIDsUserId
- ACLUser GUIDsMessageFormat
- Message Format {TXT | HTM}sUserId
- iMessagesGrouping Message Grouping { GROUP_NONE | GROUP_DIGEST }java.sql.SQLException
public static boolean subscribe(JDCConnection oConn, java.lang.String sNewsGroupId, java.lang.String sUserId) throws java.sql.SQLException
Subscribe ACLUser to a NewsGroup
Message format is TXT with no grouping by default.
oConn
- JDBC Database ConnectionsNewsGroupId
- NewsGroup GUIDsUserId
- ACLUser GUIDjava.sql.SQLException
public static boolean unsubscribe(JDCConnection oConn, java.lang.String sNewsGroupId, java.lang.String sUserId) throws java.sql.SQLException
Unsubscribe ACLUser to a NewsGroup
The ACLUser is removed from table k_newsgroup_subscriptions for given NewsGroup.
If you want to remove an e-mail directly first call ACLUser.getIdFromEmail() method.
oConn
- JDBC Database ConnectionsNewsGroupId
- NewsGroup GUIDsUserId
- ACLUser GUIDjava.sql.SQLException
public static boolean activate(JDCConnection oConn, java.lang.String sNewsGroupId, java.lang.String sUserId) throws java.sql.SQLException
Activate a Subscription
Set k_newsgroup_subscriptions.id_status=ACTIVE
oConn
- JDBC Database ConnectionsNewsGroupId
- Newsgroup GUIDsUserId
- ACLUser GUIDjava.sql.SQLException
public static boolean deactivate(JDCConnection oConn, java.lang.String sNewsGroupId, java.lang.String sUserId) throws java.sql.SQLException
Deactivate a Subscription
Set k_newsgroup_subscriptions.id_status=UNACTIVE
oConn
- JDBC Database ConnectionsNewsGroupId
- Newsgroup GUIDsUserId
- ACLUser GUIDjava.sql.SQLException