|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.knowgate.dataobjs.DBPersist
com.knowgate.hipergate.Category
com.knowgate.forums.NewsGroup
public class NewsGroup
NewsGroup
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Field Summary | |
|---|---|
static short |
ClassId
|
static short |
FREE
|
static short |
MODERATED
|
| Fields inherited from class com.knowgate.hipergate.Category |
|---|
BROWSE_BOTTOMUP, BROWSE_DOWN, BROWSE_TOPDOWN, BROWSE_UP |
| Fields inherited from class com.knowgate.dataobjs.DBPersist |
|---|
AllVals, sAuditCls, sAuditUsr, sTransactId |
| Constructor Summary | |
|---|---|
NewsGroup()
Create empty newsgroup |
|
NewsGroup(JDCConnection oConn,
java.lang.String sIdNewsGroup)
Create newsGroup and load properties from Database Both field sets from k_categories and k_newsgroups are loaded into internal properties collection upon load. |
|
NewsGroup(java.lang.String sIdNewsGroup)
Create NewsGroup and set its Category GUID |
|
| Method Summary | |
|---|---|
int |
countMessages(JDCConnection oConn)
Count messages for this NewsGroup |
int |
countMessages(JDCConnection oConn,
short iMsgStatus)
Count messages for this NewsGroup in a given status |
boolean |
delete(JDCConnection oConn)
Delete this NewsGroup and all its messages |
static boolean |
delete(JDCConnection oConn,
java.lang.String sNewsGroupGUID)
Delete NewsGroup and all its messages. |
DBSubset |
getTopLevelMessages(JDCConnection oConn,
int nMaxMsgs,
java.lang.String sOrderBy)
Get messages |
boolean |
isSubscriber(JDCConnection oConn,
java.lang.String sUserId)
Get whether or not a user is subcribed this news group |
boolean |
load(JDCConnection oConn,
java.lang.Object[] PKVals)
Load NewsGroup from database Both field sets from k_categories and k_newsgroups are loaded into internal properties collection upon load. |
static java.lang.String |
store(JDCConnection oConn,
int iDomain,
java.lang.String sWorkArea,
java.lang.String sCategoryId,
java.lang.String sParentId,
java.lang.String sCategoryName,
short iIsActive,
int iDocStatus,
java.lang.String sOwner,
java.lang.String sIcon1,
java.lang.String sIcon2)
Store Newsgroup |
DBSubset |
subscribers(JDCConnection oConn)
Get ACLUsers subscribed to this NewsGroup |
| Methods inherited from class com.knowgate.hipergate.Category |
|---|
addObject, browse, checkIn, checkOut, create, expand, getACLGroups, getACLUsers, getChilds, getDomainId, getGroupPermissions, getIdFromName, getIsRoot, getLabel, getNames, getObjects, getObjectsOfClass, getParents, getPath, getProducts, getUserPermissions, inheritPermissions, isChildOf, isParentOf, level, makeName, removeGroupPermissions, removeObject, removeObject, removeUserPermissions, resetParent, setGroupPermissions, setIsRoot, setParent, setUserPermissions, store, store, storeLabels, toXMLWithLabels, toXMLWithLabels, toXMLWithLabels, uploadDirectory |
| 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, 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 short ClassId
public static final short FREE
public static final short MODERATED
| Constructor Detail |
|---|
public NewsGroup()
public NewsGroup(java.lang.String sIdNewsGroup)
throws java.sql.SQLException
sIdNewsGroup - GUID of NewsGroup/Category
java.sql.SQLException
public NewsGroup(JDCConnection oConn,
java.lang.String sIdNewsGroup)
throws java.sql.SQLException
Create newsGroup and load properties from Database
Both field sets from k_categories and k_newsgroups are loaded into internal properties collection upon load.
oConn - Database ConenctionsIdNewsGroup - GUID of newsGroup to be loaded
java.sql.SQLException| Method Detail |
|---|
public int countMessages(JDCConnection oConn)
throws java.sql.SQLException
Count messages for this NewsGroup
oConn - Database connection
java.sql.SQLException - If NewsGroup does not exist
public int countMessages(JDCConnection oConn,
short iMsgStatus)
throws java.sql.SQLException
Count messages for this NewsGroup in a given status
oConn - Database connectioniMsgStatus - One of { NewsMessage.STATUS_VALIDATED, NewsMessage.STATUS_PENDING, NewsMessage.STATUS_DISCARDED, NewsMessage.STATUS_EXPIRED }
java.sql.SQLException - If NewsGroup does not exist
public boolean load(JDCConnection oConn,
java.lang.Object[] PKVals)
throws java.sql.SQLException
Load NewsGroup from database
Both field sets from k_categories and k_newsgroups are loaded into internal properties collection upon load.
load in class DBPersistoConn - Database ConenctionPKVals - A single element array containing the GUID of NewsGroup to be
loaded. For example: oNewsGrpObj.load(oConnection, new object[]{"123456789012345678901234567890AB"});
java.sql.SQLException
public DBSubset subscribers(JDCConnection oConn)
throws java.sql.SQLException
Get ACLUsers subscribed to this NewsGroup
oConn - JDBC Database Connection
| gu_user | tx_email | id_msg_type | tp_subscrip |
| ACLUser GUID | ACLUser main e-mail | Message Format {TXT | HTM} | Message Grouping {GROUP_NONE | GROUP_DIGEST} |
java.sql.SQLException
public boolean isSubscriber(JDCConnection oConn,
java.lang.String sUserId)
throws java.sql.SQLException
Get whether or not a user is subcribed this news group
oConn - JDBC Database ConnectionsUserId - User GUID
java.sql.SQLException
public boolean delete(JDCConnection oConn)
throws java.sql.SQLException
Delete this NewsGroup and all its messages
delete in class CategoryoConn - JDBC Database Connection
java.sql.SQLException
public DBSubset getTopLevelMessages(JDCConnection oConn,
int nMaxMsgs,
java.lang.String sOrderBy)
throws java.sql.SQLException,
java.lang.IllegalArgumentException,
java.lang.IllegalStateException
Get messages
oConn - Database ConnectionnMaxMsgs - Maximum number of messages to getsOrderBy - Attribute to sort messages. By default it is dt_published which corresponds to publishing date. Can be also nu_votes to sort messages by number of votes or nm_author to sort by author.
java.sql.SQLException
java.lang.IllegalArgumentException - If nMaxMsgs<=0
java.lang.IllegalStateException - If this Newsgroup message has not been previously loaded
public static java.lang.String store(JDCConnection oConn,
int iDomain,
java.lang.String sWorkArea,
java.lang.String sCategoryId,
java.lang.String sParentId,
java.lang.String sCategoryName,
short iIsActive,
int iDocStatus,
java.lang.String sOwner,
java.lang.String sIcon1,
java.lang.String sIcon2)
throws java.sql.SQLException
Store Newsgroup
oConn - Database ConnectioniDomain - Identifier of Domain to with the NewsGroup will belong.sWorkArea - GUID of WorkArea to with the NewsGroup will belong.sCategoryId - Category GUID (newsgroups are subregisters of categories)sParentId - GUID of Parent Group (groups, as categories, are hierarchical)sCategoryName - Category name (k_categories.nm_category)iIsActive - 1 if group is activem, 0 if it is inactive.iDocStatus - Initial Document Status. One of { Newsgroup.FREE, Newsgroup.MODERATED }sOwner - GUID of User owner of this NewsGroupsIcon1 - Closed Folder IconsIcon2 - Opened Folder Icon
java.sql.SQLException
public static boolean delete(JDCConnection oConn,
java.lang.String sNewsGroupGUID)
throws java.sql.SQLException
Delete NewsGroup and all its messages.
Delete all files attached to messages contained in group and then call k_sp_del_newsgroup stored procedure.
oConn - Database ConnectionsNewsGroupGUID - GUID of NewsGroup to be deleted.
java.sql.SQLExceptionProduct.delete(JDCConnection)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||