| com.knowgate.hipergate.Category com.knowgate.forums.NewsGroup
NewsGroup | public class NewsGroup extends Category (Code) | | NewsGroup
author: Sergio Montoro Ten version: 2.0 |
Field Summary | |
final public static short | ClassId | final public static short | FREE | final public static short | MODERATED |
Constructor Summary | |
public | NewsGroup() | public | NewsGroup(String sIdNewsGroup) | public | NewsGroup(JDCConnection oConn, 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. |
Method Summary | |
public int | countMessages(JDCConnection oConn) | public int | countMessages(JDCConnection oConn, short iMsgStatus) | public boolean | delete(JDCConnection oConn) | public static boolean | delete(JDCConnection oConn, String sNewsGroupGUID) | public boolean | isSubscriber(JDCConnection oConn, String sUserId) | public boolean | load(JDCConnection oConn, Object[] PKVals) Load NewsGroup from database
Both field sets from k_categories and k_newsgroups are loaded into
internal properties collection upon load.
Parameters: oConn - Database Conenction Parameters: PKVals - A single element array containing the GUID of NewsGroup to beloaded. | public static String | store(JDCConnection oConn, int iDomain, String sWorkArea, String sCategoryId, String sParentId, String sCategoryName, short iIsActive, int iDocStatus, String sOwner, String sIcon1, String sIcon2) Store Newsgroup
Parameters: oConn - atabase Connection Parameters: iDomain - Identifier of Domain to with the NewsGroup will belong. Parameters: sWorkArea - GUID of WorkArea to with the NewsGroup will belong. Parameters: sCategoryId - Category GUID (newsgroups are subregisters of categories) Parameters: sParentId - GUID of Parent Group (groups, as categories, are hierarchical) Parameters: sCategoryName - Category name (k_categories.nm_category) Parameters: iIsActive - 1 if group is activem, 0 if it is inactive. Parameters: iDocStatus - Initial Document Status. | public DBSubset | subscribers(JDCConnection oConn) |
ClassId | final public static short ClassId(Code) | | |
FREE | final public static short FREE(Code) | | |
MODERATED | final public static short MODERATED(Code) | | |
NewsGroup | public NewsGroup()(Code) | | Create empty newsgroup
|
NewsGroup | public NewsGroup(String sIdNewsGroup) throws SQLException(Code) | | Create NewsGroup and set its Category GUID
Parameters: sIdNewsGroup - GUID of NewsGroup/Category throws: SQLException - |
NewsGroup | public NewsGroup(JDCConnection oConn, String sIdNewsGroup) throws SQLException(Code) | | Create newsGroup and load properties from Database
Both field sets from k_categories and k_newsgroups are loaded into
internal properties collection upon load.
Parameters: oConn - Database Conenction Parameters: sIdNewsGroup - GUID of newsGroup to be loaded throws: SQLException - |
countMessages | public int countMessages(JDCConnection oConn) throws SQLException(Code) | | Count messages for this NewsGroup
Parameters: oConn - Database connection Message Count throws: SQLException - If NewsGroup does not exist |
countMessages | public int countMessages(JDCConnection oConn, short iMsgStatus) throws SQLException(Code) | | Count messages for this NewsGroup in a given status
Parameters: oConn - Database connection Parameters: iMsgStatus - One of { NewsMessage.STATUS_VALIDATED, NewsMessage.STATUS_PENDING, NewsMessage.STATUS_DISCARDED, NewsMessage.STATUS_EXPIRED } Message Count throws: SQLException - If NewsGroup does not exist |
isSubscriber | public boolean isSubscriber(JDCConnection oConn, String sUserId) throws SQLException(Code) | | Get whether or not a user is subcribed this news group
Parameters: oConn - JDBC Database Connection Parameters: sUserId - User GUID true if user is subscribed to this news group and he is active (k_newsgroup_subscriptions.id_status=1),false if user is not subscribed or if he is subscribed but unactive (k_newsgroup_subscriptions.id_status=0) throws: SQLException - |
load | public boolean load(JDCConnection oConn, Object[] PKVals) throws SQLException(Code) | | Load NewsGroup from database
Both field sets from k_categories and k_newsgroups are loaded into
internal properties collection upon load.
Parameters: oConn - Database Conenction Parameters: PKVals - A single element array containing the GUID of NewsGroup to beloaded. For example: oNewsGrpObj.load(oConnection, new object[]{"123456789012345678901234567890AB"}); true if NewsGroup was successfully loaded, false ifNewsgroup GUID was not found at k_newsgropus o k_categories tables. throws: SQLException - |
store | public static String store(JDCConnection oConn, int iDomain, String sWorkArea, String sCategoryId, String sParentId, String sCategoryName, short iIsActive, int iDocStatus, String sOwner, String sIcon1, String sIcon2) throws SQLException(Code) | | Store Newsgroup
Parameters: oConn - atabase Connection Parameters: iDomain - Identifier of Domain to with the NewsGroup will belong. Parameters: sWorkArea - GUID of WorkArea to with the NewsGroup will belong. Parameters: sCategoryId - Category GUID (newsgroups are subregisters of categories) Parameters: sParentId - GUID of Parent Group (groups, as categories, are hierarchical) Parameters: sCategoryName - Category name (k_categories.nm_category) Parameters: iIsActive - 1 if group is activem, 0 if it is inactive. Parameters: iDocStatus - Initial Document Status. One of { Newsgroup.FREE, Newsgroup.MODERATED } Parameters: sOwner - GUID of User owner of this NewsGroup Parameters: sIcon1 - Closed Folder Icon Parameters: sIcon2 - Opened Folder Icon GUID of newly created NewsGroup throws: SQLException - |
subscribers | public DBSubset subscribers(JDCConnection oConn) throws SQLException(Code) | | Get ACLUsers subscribed to this NewsGroup
Parameters: oConn - JDBC Database Connection A DBSubset with the following columns:
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} |
throws: SQLException - |
Methods inherited from com.knowgate.hipergate.Category | public int addObject(Connection oConn, String sIdObject, int iIdClass, int iAttribs, int iOdPosition) throws SQLException(Code)(Java Doc) public LinkedList browse(JDCConnection oConn, int iDirection, int iOrder) throws SQLException(Code)(Java Doc) public static String create(JDCConnection oConn, Object[] Values) throws SQLException(Code)(Java Doc) public boolean delete(JDCConnection oConn) throws SQLException(Code)(Java Doc) public static boolean delete(JDCConnection oConn, String sCategoryGUID) throws SQLException, IOException(Code)(Java Doc) public void expand(Connection oConn) throws SQLException(Code)(Java Doc) public DBSubset getACLGroups(JDCConnection oConn) throws SQLException(Code)(Java Doc) public DBSubset getACLUsers(JDCConnection oConn) throws SQLException(Code)(Java Doc) public DBSubset getChilds(JDCConnection oConn) throws SQLException(Code)(Java Doc) public int getGroupPermissions(Connection oConn, String sIdGroup) throws SQLException(Code)(Java Doc) public static String getIdFromName(JDCConnection oConn, String sCategoryNm) throws SQLException(Code)(Java Doc) public boolean getIsRoot(Connection oConn) throws SQLException(Code)(Java Doc) public String getLabel(Connection oConn, String sLanguage) throws SQLException(Code)(Java Doc) public DBSubset getNames(JDCConnection oConn) throws SQLException(Code)(Java Doc) public DBSubset getObjects(JDCConnection oConn) throws SQLException(Code)(Java Doc) public DBSubset getParents(JDCConnection oConn) throws SQLException(Code)(Java Doc) public String getPath(Connection oConn) throws SQLException(Code)(Java Doc) public int getUserPermissions(Connection oConn, String sIdUser) throws SQLException(Code)(Java Doc) public void inheritPermissions(JDCConnection oConn, String sFromCategory, short iRecurse, short iObjects) throws SQLException(Code)(Java Doc) public boolean isChildOf(Connection oConn, String sParentCategory) throws SQLException(Code)(Java Doc) public boolean isParentOf(Connection oConn, String sChildCategory) throws SQLException(Code)(Java Doc) public int level(JDCConnection oConn) throws SQLException(Code)(Java Doc) public static synchronized String makeName(JDCConnection oConn, String sCategoryNm) throws SQLException(Code)(Java Doc) public void removeGroupPermissions(Connection oConn, String sIdGroups, short iRecurse, short iObjects) throws SQLException(Code)(Java Doc) public int removeObject(Connection oConn, String sIdObject) throws SQLException(Code)(Java Doc) public void removeUserPermissions(Connection oConn, String sIdUsers, short iRecurse, short iObjects) throws SQLException(Code)(Java Doc) public void resetParent(Connection oConn, String sIdParent) throws SQLException(Code)(Java Doc) public void setGroupPermissions(Connection oConn, String sIdGroups, int iACLMask, short iRecurse, short iObjects) throws SQLException(Code)(Java Doc) public void setIsRoot(Connection oConn, boolean bIsRoot) throws SQLException(Code)(Java Doc) public void setParent(Connection oConn, String sIdParent) throws SQLException(Code)(Java Doc) public void setUserPermissions(Connection oConn, String sIdUsers, int iACLMask, short iRecurse, short iObjects) throws SQLException(Code)(Java Doc) public boolean store(JDCConnection oConn) throws SQLException(Code)(Java Doc) public static String store(JDCConnection oConn, String sCategoryId, String sParentId, String sCategoryName, short iIsActive, int iDocStatus, String sOwner, String sIcon1, String sIcon2) throws SQLException(Code)(Java Doc) public void storeLabels(JDCConnection oConn, String sNamesTable, String sRowDelim, String sColDelim) throws SQLException, NoSuchElementException(Code)(Java Doc) public void uploadDirectory(JDCConnection oConn, String sSourcePath, String sProtocol, String sServer, String sTargetPath, String sLanguage) throws Exception, IOException, SQLException(Code)(Java Doc)
|
|
|