Oracle Collaboration Suite Discussions Java API Reference
10g (10.1.1)

Part No. B16232-01


oracle.discussions.sdk
Class TdFacility

java.lang.Object
  extended byjavax.mail.Folder
      extended byoracle.mail.sdk.esmail.OracleFolder
          extended byoracle.mail.sdk.esmail.OracleSharedFolder
              extended byoracle.discussions.sdk.TdContainer
                  extended byoracle.discussions.sdk.TdFacility

All Implemented Interfaces:
TdFavorite, javax.mail.UIDFolder

public class TdFacility
extends TdContainer

This class represents a Facility container. Facilities can contain other Facilities or message Boards.

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.

Since:
OCS 10.1.1
See Also:
TdContainer.java, 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
TdFacility(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 to create an instance of the TdFacility.

Method Summary
TdBoard createBoard(java.lang.String boardName, java.lang.String boardDisplayName, java.lang.String boardDescription)
Creates a Board under this facility.
TdBoard createBoard(java.lang.String boardName, java.lang.String boardDisplayName, java.lang.String boardDescription, java.lang.String boardEmail)
Creates a Board under this facility.
TdBoard createBoard(java.lang.String boardName, java.lang.String boardDisplayName, java.lang.String boardDescription, java.lang.String boardEmail, boolean isPublic)
Creates a Board under this facility.
TdBoard createBoard(java.lang.String boardName, java.lang.String boardDisplayName, java.lang.String boardDescription, java.lang.String boardEmail, boolean isPublic, boolean bWithAnnouncementsBoard)
Creates a Board under this facility.
TdFacility createFacility(java.lang.String facilityName, java.lang.String facilityDisplayName, java.lang.String facilityDescription)
Creates a new TdFacility in this message store.
TdFacility createFacility(java.lang.String facilityName, java.lang.String facilityDisplayName, java.lang.String facilityDescription, boolean bWithAnnouncementsBoard)
Creates a new TdFacility in this message store.
void delete()
Deletes this TdFacility in this message store - child facilities boards and messages will be deleted too.
void deleteBoard(TdBoard tdb)
Deletes a Board under this facility.
int getContainerType()
Returns the container type on which this method is invoked.
int getMessageCount()
Returns the number of messsages in ths container.
int getNewMessageCount()
Returns the number of new messsages in ths container.
int getUnreadMessageCount()
Returns the number of unread messsages in ths container.
void grantBoardCreator(TdUser tdUser)
Grants BoardCreator role to the supplied user for this facility.
void grantFacilityAdmin(TdUser tdUser)
Grants FacilityAdmin role to the supplied user for this facility.
void grantFacilityCreator(TdUser tdUser)
Grants FacilityCreator role to the supplied user for this facility
void grantFacilityReader(TdUser tdUser)
Grants FacilityReader role to the supplied user for this facility.
void grantFacilityWriter(TdUser tdUser)
Grants FacilityWriter role to the supplied user for this facility
boolean hasNewMessages()
Returns if the container has new messages
void revokeBoardCreator(TdUser tdUser)
Revokes BoardCreator role to the supplied user for this facility.
void revokeFacilityAdmin(TdUser tdUser)
Revokes FacilityAdmin role to the supplied user for this facility.
void revokeFacilityCreator(TdUser tdUser)
Revokes FacilityCreator role to the supplied user for this facility.
void revokeFacilityReader(TdUser tdUser)
Grants FacilityReader role to the supplied user for this facility.
void revokeFacilityWriter(TdUser tdUser)
Revokes FacilityWriter role to the supplied user for this facility.

Methods inherited from class oracle.discussions.sdk.TdContainer
addACI, addACI, addACI, addACI, addToFavorites, appendMessages, appendMessages, close, copyMessages, create, delete, equals, exists, expunge, fetch, getAnnouncementsBoard, getContainer, getContainerSettings, getCreationDate, getCreator, getDescription, getDisplayFullPathUsingDisplayName, getDisplayName, getFavoriteThreads, getFilteredHeaders, getFlags, getFolder, getGranteeACI, getLastMessagePosts, getLastPost, getMessage, getMessageByType, getMessageByUID, getMessages, getMessages, getMessages, getMessagesByUID, getMessagesByUID, getParent, getParentFacility, getPermanentFlags, getPermissions, getPopularThreads, getTdUser, getUID, getUIDValidity, hasAnnouncementsBoard, hasRead, hasWrite, isFavorite, isGuest, isNew, isNewSinceLastVisit, isNewSinceSession, isOpen, isShared, isSubscribed, list, list, list, list, listGranteeRoles, listSubscribed, modifyACI, modifyACI, moveMessages, open, openInternal, removeACI, removeACI, removeFromFavorites, renameTo, search, search, search, search, setFlags, setFlags, setFlags, setSubscribed, sortMessages, updateContainerSettings, updateGranteeRoles

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

TdFacility

public TdFacility(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 to create an instance of the TdFacility. A facility is created as a shared folder in oracle email storage and a handle to the same is returned.
Parameters:
admstore - Oracle email administrator store
usrstore - Orace email user store
tdsession - oracle discussions session for this instance of discussions
lFolderId - Oracle email shared folder id

Method Detail

getContainerType

public int getContainerType()
Returns the container type on which this method is invoked.
Specified by:
getContainerType in class TdContainer
Returns:
int representing the container type

grantFacilityAdmin

public void grantFacilityAdmin(TdUser tdUser)
                        throws TdException
Grants FacilityAdmin role to the supplied user for this facility.
Parameters:
tdUser - discussions user to whom facility administrator role is being granted.
Throws:
TdException

grantFacilityWriter

public void grantFacilityWriter(TdUser tdUser)
                         throws TdException
Grants FacilityWriter role to the supplied user for this facility
Throws:
tdException
TdException

grantFacilityCreator

public void grantFacilityCreator(TdUser tdUser)
                          throws TdException
Grants FacilityCreator role to the supplied user for this facility
Throws:
TdException

grantBoardCreator

public void grantBoardCreator(TdUser tdUser)
                       throws TdException
Grants BoardCreator role to the supplied user for this facility.
Parameters:
tdUser - discussions user to whom forum creator role is being granted
Throws:
TdException

grantFacilityReader

public void grantFacilityReader(TdUser tdUser)
                         throws TdException
Grants FacilityReader role to the supplied user for this facility.
Parameters:
tdUser - discussions user to whom category reader role is being granted.
Throws:
TdException

revokeFacilityAdmin

public void revokeFacilityAdmin(TdUser tdUser)
                         throws TdException
Revokes FacilityAdmin role to the supplied user for this facility.
Parameters:
tdUser - category user who is being removed from the category admin role
Throws:
TdException

revokeBoardCreator

public void revokeBoardCreator(TdUser tdUser)
                        throws TdException
Revokes BoardCreator role to the supplied user for this facility.
Parameters:
tdUser - discussions user who is being removed from forum creator role
Throws:
TdException

revokeFacilityWriter

public void revokeFacilityWriter(TdUser tdUser)
                          throws TdException
Revokes FacilityWriter role to the supplied user for this facility.
Parameters:
tdUser - discussions user who is being removed from category writer role
Throws:
TdException

revokeFacilityCreator

public void revokeFacilityCreator(TdUser tdUser)
                           throws TdException
Revokes FacilityCreator role to the supplied user for this facility.
Parameters:
tdUser - discussions user who is being revoked from category creator
Throws:
TdException

revokeFacilityReader

public void revokeFacilityReader(TdUser tdUser)
                          throws TdException
Grants FacilityReader role to the supplied user for this facility. This is effective if and only if the grantee user is not granted access to any child board of this facility.
Parameters:
tdUser - discussions user who is being revoked from category reader role
Throws:
TdException

createBoard

public TdBoard createBoard(java.lang.String boardName,
                           java.lang.String boardDisplayName,
                           java.lang.String boardDescription)
                    throws TdException
Creates a Board under this facility.
Parameters:
boardName - forum name which is being created.
boardDisplayName - display name for the forum
boardDescription - forum description
Returns:
TdBoard the forum created
Throws:
TdException

createBoard

public TdBoard createBoard(java.lang.String boardName,
                           java.lang.String boardDisplayName,
                           java.lang.String boardDescription,
                           java.lang.String boardEmail)
                    throws TdException
Creates a Board under this facility.
Parameters:
boardName - forum name which is being created.
boardDisplayName - display name for the forum
boardDescription - forum description
boardEmail - email address of the forum
Returns:
TdBoard the forum created
Throws:
TdException

createBoard

public TdBoard createBoard(java.lang.String boardName,
                           java.lang.String boardDisplayName,
                           java.lang.String boardDescription,
                           java.lang.String boardEmail,
                           boolean isPublic)
                    throws TdException
Creates a Board under this facility.
Parameters:
boardName - forum name which is being created.
boardDisplayName - display name for the forum
boardDescription - forum description
boardEmail - email address of the forum
isPublic - boolean variable indicating if the forum is public
Returns:
TdBoard the forum created
Throws:
TdException

createBoard

public TdBoard createBoard(java.lang.String boardName,
                           java.lang.String boardDisplayName,
                           java.lang.String boardDescription,
                           java.lang.String boardEmail,
                           boolean isPublic,
                           boolean bWithAnnouncementsBoard)
                    throws TdException
Creates a Board under this facility.
Parameters:
boardName - forum name which is being created.
boardDisplayName - display name for the forum
boardDescription - forum description
boardEmail - email address of the forum
isPublic - boolean variable indicating if the forum is public
Returns:
TdBoard the forum created
Throws:
TdException

deleteBoard

public void deleteBoard(TdBoard tdb)
                 throws TdException
Deletes a Board under this facility.
Parameters:
tdb - the forum that is to be deleted.
Throws:
TdException

createFacility

public TdFacility createFacility(java.lang.String facilityName,
                                 java.lang.String facilityDisplayName,
                                 java.lang.String facilityDescription)
                          throws TdException
Creates a new TdFacility in this message store.
Parameters:
facilityName - name of the category being created
facilityDisplayName - display name of the category being created
facilityDescription - description of the category being created.
Returns:
the newly created TdFacility
Throws:
TdException

createFacility

public TdFacility createFacility(java.lang.String facilityName,
                                 java.lang.String facilityDisplayName,
                                 java.lang.String facilityDescription,
                                 boolean bWithAnnouncementsBoard)
                          throws TdException
Creates a new TdFacility in this message store.
Parameters:
facilityName - name of the category being created
facilityDisplayName - display name of the category being created
facilityDescription - description of the category being created.
bWithAnnouncementsBoard - boolean value indicating if the announcements board will be created automatically.
Returns:
the newly created TdFacility
Throws:
TdException

getMessageCount

public int getMessageCount()
                    throws javax.mail.MessagingException
Returns the number of messsages in ths container.
Returns:
int
Throws:
javax.mail.MessagingException - since facility cant hold messages

getNewMessageCount

public int getNewMessageCount()
                       throws javax.mail.MessagingException
Returns the number of new messsages in ths container.
Returns:
int
Throws:
javax.mail.MessagingException - since facility cant hold messages

getUnreadMessageCount

public int getUnreadMessageCount()
                          throws javax.mail.MessagingException
Returns the number of unread messsages in ths container.
Returns:
int
Throws:
javax.mail.MessagingException - since facility cant hold messages

hasNewMessages

public boolean hasNewMessages()
                       throws javax.mail.MessagingException
Returns if the container has new messages
Returns:
boolean
Throws:
javax.mail.MessagingException - since facility cant hold messages

delete

public void delete()
            throws TdException
Deletes this TdFacility in this message store - child facilities boards and messages will be deleted too. After this method is called the TdFacility instance should be used anymore as it can lead to unpredictable results.
Specified by:
delete in class TdContainer
Throws:
TdException
See Also:
oracle.discussions.sdk.TdStore#deleteFacility

Copyright © 2005, Oracle. All rights reserved.