|
Oracle Collaboration Suite Discussions Java API Reference 10g (10.1.1) Part No. B16232-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
javax.mail.Folder
oracle.mail.sdk.esmail.OracleFolder
oracle.mail.sdk.esmail.OracleSharedFolder
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.java
Nested Class Summary |
Nested classes inherited from class oracle.mail.sdk.esmail.OracleFolder |
oracle.mail.sdk.esmail.OracleFolder.OracleFlag |
Nested classes inherited from class javax.mail.UIDFolder |
javax.mail.UIDFolder.FetchProfileItem |
Field Summary |
Fields inherited from class oracle.discussions.sdk.TdContainer |
TD_BOARD, TD_FACILITY |
Fields inherited from class javax.mail.Folder |
HOLDS_FOLDERS, HOLDS_MESSAGES, READ_ONLY, READ_WRITE |
Fields inherited from interface javax.mail.UIDFolder |
LASTUID |
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. |
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 |
updateContainerSettings(TdContainerSettings tdCntSettings) Updates the board settings with the settings object passed. |
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, getContainerType, getLastPost, getMessageCount, getNewMessageCount, getThreadCount, getThreads, getUnreadMessageCount, hasNewMessages |
Methods inherited from class oracle.mail.sdk.esmail.OracleSharedFolder |
_setFlags, getNamespace, hasDigitPermission |
Methods inherited from class oracle.mail.sdk.esmail.OracleFolder |
_doSearch, addACI, addACI, appendMessages, convertFlag, convertFlag, convertUsrFlag, getCounts, getFolderExpiry, getFolderId, getFolderSize, getFolderSize, getFullName, getFullPath, getName, getSeparator, getType, getURLName, isInheritedACI, removeACI, removeACI, setFolderExpiry |
Methods inherited from class javax.mail.Folder |
addConnectionListener, addFolderListener, addMessageChangedListener, addMessageCountListener, getDeletedMessageCount, getMode, getStore, listSubscribed, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, toString |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 IDTdBoard
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.
grantBoardModerator
in class TdBoard
tdUser
- a Threaded Discussions user to whom the board moderator role is to be grantedTdException
- A generic threaded discussions exception encapsulating the error message indicating that the current user is not authorized to edit announcements board.public 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.
grantBoardReader
in class TdBoard
tdUser
- a Threaded Discussions user to whom the board moderator role is to be grantedTdException
- A generic threaded discussions exception encapsulating the error message indicating that the current user is not authorized to edit announcements board.public 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
grantBoardWriter
in class TdBoard
tdUser
- a Threaded Discussions user to whom the board moderator role is to be grantedTdException
- A generic threaded discussions exception encapsulating the error message indicating that the current user is not authorized to edit announcements board.public 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.
revokeBoardModerator
in class TdBoard
tdUser
- a Threaded Discussions user from whom the Board Moderator role is to be revokedTdException
- A generic threaded discussions exception encapsulating the error message indicating that the current user is not authorized to edit announcements board.public 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.
revokeBoardReader
in class TdBoard
tdUser
- a Threaded Discussions user from whom the board reader role is to be revokedTdException
- A generic threaded discussions exception encapsulating the error message indicating that the current user is not authorized to edit announcements board.public 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.
revokeBoardWriter
in class TdBoard
tdUser
- a Threaded Discussions user from whom the board writer role is to be revokedTdException
- A generic threaded discussions exception encapsulating the error message indicating that the current user is not authorized to edit announcements board.public 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.
isPublic
in class TdBoard
TdException
- A generic threaded discussions exception. This method doesnot throw exception in practice. A throws clause is added to preserve the inheritane syntax.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/offTdException
- A generic threaded discussions exception encapsulating the error message indicating that the current user is not authorized to edit announcements board.public 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
lock
in class TdBoard
TdException
- A generic threaded discussions exception encapsulating the error message indicating that the current user is not authorized to lock announcements board.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
unlock
in class TdBoard
TdException
- A generic threaded discussions exception encapsulating the error message indicating that the current user is not authorized to unlock announcements board.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.
isLocked
in class TdBoard
TdException
- A generic threaded discussions exception. This method doesnot throw the exception in practice. A throws clause is added to preserve the inheritance syntax.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.
delete
in class TdBoard
TdException
- A generic threaded discussions exception encapsulating the error message indicating that the current user is not authorized to delete announcements board.oracle.discussions.sdk.TdStore#deleteFacility
public void updateContainerSettings(TdContainerSettings tdCntSettings) throws TdException
Updates board settings with the new settings from the settings object passed. 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.
updateContainerSettings
in class TdContainer
tdCntSettings
- Container Settings object with which the board settings are updatedTdException
- A generic thrreaed discussions exception encapsulating the error message indicating that the current user is not authorized to edit announcements board.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
getParentFacility
in class TdContainer
TdException
- A generic threaded discussions exception. The exception is not thrown by this method in practice. A throws clause is added to preserve inheritence syntax.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 boardTdException
- A generic threaded discussions exception encapsulating the error message indicating that the current user is not authorized to edit announcements board.javax.mail.MessagingException
- Oracle Email Specific Exception. This exception is not throws by this method in practice. A throws clause is added to preserve the inheritance syntax.public java.lang.String getDisplayName()
Returns board display name. Display name can be changed once the board is created.
getDisplayName
in class TdContainer
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.
isFavorite
in interface TdFavorite
isFavorite
in class TdContainer
TdException
- A Generic Threaded Discussions exceptionjavax.mail.MessagingException
- Oracle Email specific exception. The method does not throw any exception in practice. throws clause is added to preserve the inheritence syntax.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
addToFavorites
in interface TdFavorite
addToFavorites
in class TdContainer
TdException
- A Generic Threaded Discussions exception encapsulating the error message indicating that the current user is not authorized to edit announcements board.javax.mail.MessagingException
- Oracle Email Specific exception. This is not thrown by this method in practice. throws clause is added to preserve the inheritance syntax.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.
removeFromFavorites
in interface TdFavorite
removeFromFavorites
in class TdContainer
TdException
- A Generic Threaded Discussions exception encapsulating the error message indicating that the current user is not authorized to edit announcements board.javax.mail.MessagingException
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.
updateGranteeRoles
in class TdContainer
lstOfRoles
- the list of user roles to be appliedTdException
- A Generic Threaded Discussions exception encapsulating the error message indicating that the current user is not authorized to edit announcements board.public TdBoard getAnnouncementsBoard() throws TdException
Returns the announcements board under the current container.
getAnnouncementsBoard
in class TdContainer
TdException
- Exception is not thrown by this method in practice. a throws clause is added to preserve the inheritance syntaxTdBoard.java
public TdThread getThread(int iThreadId) throws TdException, javax.mail.MessagingException
This method returns a TdThread object from the announcements board given the thread id.
getThread
in class TdBoard
iThreadId
- Thread id for which the thread object is to be returnedTdException
- A Generic Threaded Discussions exception, may be thrown by ThreadCache, while trying to retrieve thread information.javax.mail.MessagingException
- Oracle Email Specific exception, which also may be thrown by ThreadCache, while trying to retrieve thread informationThreadCache.java
, TdThreadInfo.java
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.
getThreads
in class TdBoard
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 orderTdException
- A Generic Threaded Discussions exception, may be thrown by
CacheManager.java
, BoardCache.java
, TdThreadIterator.java
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |