| java.lang.Object com.knowgate.dataobjs.DBPersist com.knowgate.forums.Subscription
Subscription | public class Subscription extends DBPersist (Code) | | NewsGroup Subscription
Handles subscriptions of users from k_users table to newsgroups from k_newsgroups table
author: Sergio Montoro Ten version: 2.0 |
Method Summary | |
public static boolean | activate(JDCConnection oConn, String sNewsGroupId, String sUserId) | public static boolean | deactivate(JDCConnection oConn, String sNewsGroupId, String sUserId) | public static boolean | subscribe(JDCConnection oConn, String sNewsGroupId, String sUserId, String sMessageFormat, short iMessagesGrouping) | public static boolean | subscribe(JDCConnection oConn, String sNewsGroupId, String sUserId) | public static boolean | unsubscribe(JDCConnection oConn, String sNewsGroupId, String sUserId) |
ACTIVE | final public static short ACTIVE(Code) | | |
GROUP_DIGEST | final public static short GROUP_DIGEST(Code) | | |
GROUP_NONE | final public static short GROUP_NONE(Code) | | |
UNACTIVE | final public static short UNACTIVE(Code) | | |
Subscription | public Subscription()(Code) | | Default constructor
|
activate | public static boolean activate(JDCConnection oConn, String sNewsGroupId, String sUserId) throws SQLException(Code) | | Activate a Subscription
Set k_newsgroup_subscriptions.id_status=1
Parameters: oConn - JDBC Database Connection Parameters: sNewsGroupId - Newsgroup GUID Parameters: sUserId - ACLUser GUID true if subscription from ACLUser was successfully activated, false if no ACLUser with such GUID was found at k_newsgroup_subscriptions. throws: SQLException - |
deactivate | public static boolean deactivate(JDCConnection oConn, String sNewsGroupId, String sUserId) throws SQLException(Code) | | Deactivate a Subscription
Set k_newsgroup_subscriptions.id_status=0
Parameters: oConn - JDBC Database Connection Parameters: sNewsGroupId - Newsgroup GUID Parameters: sUserId - ACLUser GUID true if subscription from ACLUser was successfully deactivated, false if no ACLUser with such GUID was found at k_newsgroup_subscriptions. throws: SQLException - |
subscribe | public static boolean subscribe(JDCConnection oConn, String sNewsGroupId, String sUserId, String sMessageFormat, short iMessagesGrouping) throws SQLException(Code) | | Subscribe ACLUser to a NewsGroup
Newly created subscriptions are activated by default.
Parameters: oConn - JDBC Database Connection Parameters: sNewsGroupId - NewsGroup GUID Parameters: sUserId - ACLUser GUID Parameters: sMessageFormat - Message Format {TXT | HTM} Parameters: sUserId - iMessagesGrouping Message Grouping { GROUP_NONE | GROUP_DIGEST } true if ACLUser was successfully subscribed to NewsGroup, false if no ACLUser with such GUID was found at k_users table. throws: SQLException - |
subscribe | public static boolean subscribe(JDCConnection oConn, String sNewsGroupId, String sUserId) throws SQLException(Code) | | Subscribe ACLUser to a NewsGroup
Message format is TXT with no grouping by default.
Parameters: oConn - JDBC Database Connection Parameters: sNewsGroupId - NewsGroup GUID Parameters: sUserId - ACLUser GUID true if ACLUser was successfully subscribed to NewsGroup, false if no ACLUser with such GUID was found at k_users table. throws: SQLException - |
unsubscribe | public static boolean unsubscribe(JDCConnection oConn, String sNewsGroupId, String sUserId) throws SQLException(Code) | | 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.
Parameters: oConn - JDBC Database Connection Parameters: sNewsGroupId - NewsGroup GUID Parameters: sUserId - ACLUser GUID true if ACLUser was successfully unsubscribed from NewsGroup, false if no ACLUser with such GUID was found at k_newsgroup_subscriptions. throws: SQLException - |
Methods inherited from com.knowgate.dataobjs.DBPersist | public void allcaps(boolean bAllValuesUpperCase)(Code)(Java Doc) public boolean allcaps()(Code)(Java Doc) protected HashMap changelog(DBPersist oOldInstance)(Code)(Java Doc) public void clear()(Code)(Java Doc) public void clone(DBPersist oSource)(Code)(Java Doc) public boolean containsKey(Object oKey) throws NullPointerException(Code)(Java Doc) public boolean containsValue(Object oKey)(Code)(Java Doc) public boolean delete(JDCConnection oConn) throws SQLException(Code)(Java Doc) public Set entrySet()(Code)(Java Doc) public boolean exists(JDCConnection oConn) throws SQLException(Code)(Java Doc) public Object get(String sKey)(Code)(Java Doc) public Object get(Object oKey) throws NullPointerException(Code)(Java Doc) public String getAuditClassName()(Code)(Java Doc) public Date getCreationDate(JDCConnection oConn) throws SQLException(Code)(Java Doc) public java.util.Date getDate(String sKey) throws ClassCastException(Code)(Java Doc) public String getDateFormated(String sKey, String sFormat) throws ClassCastException(Code)(Java Doc) public String getDateShort(String sKey) throws ClassCastException(Code)(Java Doc) public String getDateTime(String sKey)(Code)(Java Doc) public String getDateTime24(String sKey)(Code)(Java Doc) public BigDecimal getDecimal(String sKey) throws ClassCastException, NumberFormatException(Code)(Java Doc) public String getDecimalFormated(String sKey, String sPattern) throws ClassCastException, NumberFormatException, NullPointerException, IllegalArgumentException(Code)(Java Doc) public double getDouble(String sKey) throws NullPointerException, NumberFormatException(Code)(Java Doc) public String getDoubleFormated(String sKey, String sPattern) throws ClassCastException, NumberFormatException, NullPointerException, IllegalArgumentException(Code)(Java Doc) public float getFloat(String sKey) throws NullPointerException, NumberFormatException(Code)(Java Doc) public String getFloatFormated(String sKey, String sPattern) throws ClassCastException, NumberFormatException, NullPointerException, IllegalArgumentException(Code)(Java Doc) public int getInt(String sKey) throws NullPointerException, NumberFormatException(Code)(Java Doc) public Integer getInteger(String sKey) throws NumberFormatException(Code)(Java Doc) public int getIntervalPart(String sKey, String sPart) throws NullPointerException, NumberFormatException, IllegalArgumentException(Code)(Java Doc) public HashMap getItemMap()(Code)(Java Doc) public Set getItems()(Code)(Java Doc) public Money getMoney(String sKey) throws NumberFormatException(Code)(Java Doc) public java.sql.Date getSQLDate(String sKey) throws ClassCastException(Code)(Java Doc) public Time getSQLTime(String sKey) throws ClassCastException(Code)(Java Doc) public short getShort(String sKey) throws java.lang.NullPointerException(Code)(Java Doc) public String getString(String sKey) throws NullPointerException(Code)(Java Doc) public String getStringNull(String sKey, String sDefault)(Code)(Java Doc) public DBTable getTable()(Code)(Java Doc) public DBTable getTable(JDCConnection oConn) throws SQLException, IllegalStateException(Code)(Java Doc) public String getTableName()(Code)(Java Doc) public String getTime(String sKey) throws ClassCastException(Code)(Java Doc) public Time getTimeOfDay(String sKey)(Code)(Java Doc) public Timestamp getTimestamp(String sKey)(Code)(Java Doc) protected static String getUIdFromName(JDCConnection oConn, Integer iDomainId, String sInstanceNm, String sStoredProc) throws SQLException(Code)(Java Doc) public boolean isEmpty()(Code)(Java Doc) public boolean isNull(String sKey)(Code)(Java Doc) public Iterator iterator()(Code)(Java Doc) public Set keySet()(Code)(Java Doc) public boolean load(JDCConnection oConn, Object[] PKVals) throws SQLException(Code)(Java Doc) public boolean load(JDCConnection oConn, String sKey) throws SQLException(Code)(Java Doc) public void parseXML(String sXMLFilePath) throws SAXException, SAXNotRecognizedException, SAXNotSupportedException, SAXParseException, IOException, ClassNotFoundException, IllegalAccessException, InstantiationException(Code)(Java Doc) public void put(String sKey, String sVal) throws NullPointerException(Code)(Java Doc) public void put(String sKey, Object oObj) throws NullPointerException(Code)(Java Doc) public Object put(Object sKey, Object oObj) throws NullPointerException(Code)(Java Doc) public void put(String sKey, int iVal)(Code)(Java Doc) public void put(String sKey, short iVal)(Code)(Java Doc) public void put(String sKey, Date dtVal)(Code)(Java Doc) public void put(String sKey, Time tmVal)(Code)(Java Doc) public void put(String sKey, String sDate, SimpleDateFormat oPattern) throws ParseException(Code)(Java Doc) public void put(String sKey, double dVal)(Code)(Java Doc) public void put(String sKey, BigDecimal oDecVal)(Code)(Java Doc) public void put(String sKey, String sDecVal, DecimalFormat oPattern) throws ParseException(Code)(Java Doc) public void put(String sKey, float fVal)(Code)(Java Doc) public void put(String sKey, Money mVal)(Code)(Java Doc) public void put(String sKey, File oFile) throws FileNotFoundException(Code)(Java Doc) public void put(String sKey, byte[] aBytes)(Code)(Java Doc) public void put(String sKey, char[] aChars)(Code)(Java Doc) public void put(String sKey, String sData, int iSQLType) throws FileNotFoundException, IllegalArgumentException, NullPointerException(Code)(Java Doc) public void putAll(Properties oPropsCollection) throws FileNotFoundException(Code)(Java Doc) public void putAll(Map oMap)(Code)(Java Doc) public void remove(String sKey)(Code)(Java Doc) public Object remove(Object oKey)(Code)(Java Doc) public void replace(String sKey, Object oObj)(Code)(Java Doc) public void replace(String sKey, int iVal)(Code)(Java Doc) public void replace(String sKey, short iVal)(Code)(Java Doc) public void replace(String sKey, float fVal)(Code)(Java Doc) public void setAuditTransact(String sAuditTransact)(Code)(Java Doc) public void setAuditUser(String sAuditUser)(Code)(Java Doc) public int size()(Code)(Java Doc) public boolean store(JDCConnection oConn) throws SQLException(Code)(Java Doc) public void toLowerCase(String sKey)(Code)(Java Doc) public void toUpperCase(String sKey)(Code)(Java Doc) protected String toXML(String sIdent, String sDelim, HashMap oAttrs) throws IllegalStateException(Code)(Java Doc) public String toXML(String sIdent, String sDelim) throws IllegalStateException(Code)(Java Doc) public String toXML(String sIdent)(Code)(Java Doc) public String toXML()(Code)(Java Doc) public Collection values()(Code)(Java Doc)
|
|
|