|
Oracle Discussions Java API Reference 10g Release 1 (10.1.2) B25496-01 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
oracle.discussions.sdk.TdContainer | +--oracle.discussions.sdk.TdBoard | +--oracle.discussions.sdk.TdAnnouncementsBoard
Announcements Board extends the conventional TdBoard class.
An announcement is any special thread which is intended to all the users of the board posted by either administrator or moderator. TdAnnouncementsBoard is a class, describing an anouncements board. An announcements board is a special board which is implicit. Only administrator and moderator will be able to post threads into an announcements board. It is always public, meaning that any user can read the contant posted to the board. Once created, an announcements board cannot be edited. The parents facility of the announcements board si always null and the announcements board cannot be locked just like any other board.
Oracle discussions elements names have been changed in the webui compared to that of sdk portion. The existing names to the new names mapping is as shown.
Sample code snippet illustrating the usage of TdAnnouncmentsBoard.
TdAnnouncementsBoard tdab = null; String annFullPath = null; try { annFullPath = AnnouncementsHandler.getAnnouncementsFolderName(null, _tdsession) // _tdsession is a TdSession object OracleFolder fAnn = (OracleFolder) AnnouncementsHandler.getAnnouncementsFolder(annFullPath, _tdsession); String namespace = _tdsession.getAdminNamespace(); String folderName = annFullPath.substring(namespac.length() + 1); tdab = new TdAnnouncementsBoard(_tdsession.getAdminStore(), _tdsession.getAdminStore(), _tdsession, folderName, fAnn.getFolderId(), namespace); } catch(Exception e) {}
TdBoard
Fields inherited from class oracle.discussions.sdk.TdBoard |
s_dmsAppendMessage, s_dmsDelete, s_dmsEditMessage, s_dmsEraseMessages, s_dmsGetLastPost, s_dmsGetThread, s_dmsGetThreads, s_dmsGrantBoardModerator, s_dmsGrantBoardReader, s_dmsGrantBoardWriter, s_dmsLock, s_dmsMarkPublic, s_dmsRevokeBoardModerator, s_dmsRevokeBoardReader, s_dmsRevokeBoardWriter, s_dmsUnlock, s_nBoard, s_processRequest |
Constructor Summary | |
TdAnnouncementsBoard(oracle.mail.sdk.esmail.OracleStore admstore, oracle.mail.sdk.esmail.OracleStore usrstore, oracle.discussions.sdk.impl.TdSession tdsession, java.lang.String folderName, long lFolderId, java.lang.String nameSpace) Constructor. |
Method Summary | |
void |
addToFavorites() Adds the board to the list of favorites. |
void |
delete() Deletes the board. |
TdBoard |
getAnnouncementsBoard() Returns the announcements board. |
java.lang.String |
getDisplayName() Returns board display name. |
TdFacility |
getParentFacility() Returns the parent container which holds the board. |
TdThread |
getThread(int iThreadId) Returns a particular thread in the board given its Thread ID. |
TdIterator |
getThreads(int iFetchStart, boolean bSortByCreation, boolean bAscending) Returns a thread iterator comprising of threads in the announcements board. |
void |
grantBoardModerator(TdUser tdUser) Grants Board Moderator role to the user passed. |
void |
grantBoardReader(TdUser tdUser) Grants Board Reader role to the user passed. |
void |
grantBoardWriter(TdUser tdUser) Grants Board Writer role to the user passed. |
void |
initPermissions() |
boolean |
isFavorite() Returns if the board is marked as a favorite container. |
boolean |
isLocked() Returns a boolean status indicating is the board is locked. |
boolean |
isPublic() Returns if the board is marked for the public access. |
void |
lock() Tries to lock the board so that only moderator and administrator can write to the board. |
void |
markPublic(boolean bPublic) Marks the board for public access. |
void |
removeFromFavorites() Removes the board from list of favorites. |
void |
revokeBoardModerator(TdUser tdUser) Revokes Board Moderator role from the user passed. |
void |
revokeBoardReader(TdUser tdUser) Revokes Board Reader role from the user passed. |
void |
revokeBoardWriter(TdUser tdUser) Revokes Board Writer role from the user passed. |
void |
setDescription(java.lang.String description) Sets the description for the board. |
void |
unlock() Unlocks the Board so that the board writers can post messages to the board. |
void |
updateGranteeRoles(java.util.List lstOfRoles) Updates the user roles from the list of roles passed as the argument. |
Methods inherited from class oracle.discussions.sdk.TdBoard |
appendMessage, convertUserFlag, createMessageForEdit, createMessageReply, createMessageReply, createMessageReply, createMessageTopic, createMessageTopic, editMessage, eraseMessages, getBoardSettings, getBoardSettings, getContainerType, getLastPost, getMessageCount, getNewMessageCount, getThreadCount, getThreads, getUnreadMessageCount, hasNewMessages |
Constructor Detail |
public TdAnnouncementsBoard(oracle.mail.sdk.esmail.OracleStore admstore, oracle.mail.sdk.esmail.OracleStore usrstore, oracle.discussions.sdk.impl.TdSession tdsession, java.lang.String folderName, long lFolderId, java.lang.String nameSpace)
admstore
- Oracle Email Admin Store for shared foldersusrstore
- Oracle Email User Store for shared folder storagetdsession
- Threaded Discussions Session Object for this td instancefolderName
- Shared Folder NamelFolderId
- The Shared Folder IDnameSpace
- The Shared Folder NamespaceTdBoard
Method Detail |
public void grantBoardModerator(TdUser tdUser) throws TdException
Grants Board Moderator role to the user passed to it. Once the board moderator role is granted to the user, he will be able to post announcements into the board. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited.
tdUser
- a Threaded Discussions user to whom the board moderator role is to be grantedpublic void grantBoardReader(TdUser tdUser) throws TdException
Grants Board Reader role to the user passed to it. Once the user is a board reader, he will be able to read the threads, messages in that board. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited.
tdUser
- a Threaded Discussions user to whom the board moderator role is to be grantedpublic void grantBoardWriter(TdUser tdUser) throws TdException
Grants Board Writer role to the user passed to it. Once the user is a board writer, he will be able to post threads to the board. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited
tdUser
- a Threaded Discussions user to whom the board moderator role is to be grantedpublic void revokeBoardModerator(TdUser tdUser) throws TdException
Revokes Board Moderator role from the user passed to it. Once the board moderator role is revoked, the user will not be able to post announcements in that board. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited.
tdUser
- a Threaded Discussions user from whom the Board Moderator role is to be revokedpublic void revokeBoardReader(TdUser tdUser) throws TdException
Revokes Board Reader role from the user passed to it. Once the board reader role is revoked, the user will not be able to read the threads in the board. He cannnot access the board at all. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited.
tdUser
- a Threaded Discussions user from whom the board reader role is to be revokedpublic void revokeBoardWriter(TdUser tdUser) throws TdException
Revokes Board Writer role from the user passed to it. Once the Board Writer role is revoked, the user will not be able to post messages to the board. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited.
tdUser
- a Threaded Discussions user from whom the board writer role is to be revokedpublic boolean isPublic() throws TdException
Returns a true boolean status indicating the board is marked for public viewing. An Announcements board is always public so that the announcements are seen by all the members of the discussions community.
public void markPublic(boolean bPublic) throws TdException
Marks the board for the public usage. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited.
bPublic
- boolean variable indicating whether the public usage is to be turned on/offpublic void lock() throws TdException
Applies lock to the board. Only moderator and administrator can post messages to a locked board. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited
public void unlock() throws TdException
Unlocks the Announcements board. Once a board is unlocked, board writers can also post messages to the board. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited
public boolean isLocked() throws TdException
Returns a boolean value indicating if the board is locked/unlocked. Since an announcements board is always marked for the public access, this method always returns false.
public void delete() throws TdException
This method tries to delete the board. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited.
public TdFacility getParentFacility() throws TdException
Returns the parent container which holds the board. In the case of an announcements board, the parent container is null since the board is at root level. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited
public void setDescription(java.lang.String description) throws TdException, javax.mail.MessagingException
Sets the description of the board. Description indicates the type of discussions hosted in the board. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited
description
- The description which is set to the boardpublic java.lang.String getDisplayName()
Returns board display name. Display name can be changed once the board is created.
public boolean isFavorite() throws TdException, javax.mail.MessagingException
Returns a boolean status indicating if the board is marked as a favorite board. Since the announcements board is an implicit board, it cannot be marked as a favorite board. Hence the method always returns false.
public void addToFavorites() throws TdException, javax.mail.MessagingException
Adds the specified board to the list of favorites. Since an announcements board is implicit, it cannot be added to the list of favorites. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited
public void removeFromFavorites() throws TdException, javax.mail.MessagingException
Removes the specified container from the list of favorites. Since an announcement board is implicit, it can be neither added nor removed from favorites If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited.
public void updateGranteeRoles(java.util.List lstOfRoles) throws TdException
Updates user roles from the list of roles provided. If the Board is AnnouncementsBoard, it throws TdException because announcements board is a special board into which the administrator only can post messages and the board permissions cannot be edited.
lstOfRoles
- the list of user roles to be appliedpublic TdBoard getAnnouncementsBoard() throws TdException
Returns the announcements board under the current container.
TdBoard
public TdThread getThread(int iThreadId) throws TdException, javax.mail.MessagingException
This method returns a TdThread object from the announcements board given the thread id.
iThreadId
- Thread id for which the thread object is to be returnedThreadCache
, TdThreadInfo
public TdIterator getThreads(int iFetchStart, boolean bSortByCreation, boolean bAscending) throws TdException
Takes in the thread start id, the boolean value indicating the sort type and another boolean variable indicating the sort order and returns a TdIterator object containing TdThread objects sorted in the order specified by bSortByCreation bAscending boolean variables.
iFetchStart
- variable indicating the starting thread numberbSortByCreation
- boolean variable indicating if threads are to be sorted by creation datebAscending
- boolean variable indicating if threads are to be sorted in ascending orderCacheManager
, BoardCache
public void initPermissions()
|
Oracle Discussions Java API Reference 10g Release 1 (10.1.2) B25496-01 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |