|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.discussion.DiscussionSession
This class provides a session for managing discussion information, and is the entry point into the Discussion API. It collects together properties used by the Discussion API and is not subclassed.
An instance of the DiscussionSession
can be
obtained by calling getSession()
with an authenticated
user. Once a session is
obtained, there are several entry points into the rest
of the API. If you wish to begin manipulating forums, you
should use the getForums()
method to get the forums collection.
Alternatively, if you already have the ID of the forum, topic, or message
that you wish to retrieve you may use the getForum(long)
,
getTopic(long)
or getMessage(long)
.
Method Summary | |
void |
close()
Closes this session |
protected void |
finalize()
Finalize. |
Forum |
getForum(long lForumID)
Gets a forum with the given forum id. |
Forums |
getForums()
Gets the forums collection to all of the forums the authenticated user has DiscussionPermission.READ permission. |
int |
getMaxmiumMessageAttachmentSize()
Gets the maximum message file attachment size (in bytes). |
int |
getMaxmiumTopicAttachmentSize()
Gets the maximum topic file attachment size (in bytes). |
Message |
getMessage(long lMessageID)
Gets a message with the given message id. |
Messages |
getMessages()
Gets the messages collection to all of the messages the authenticated user has DiscussionPermission.READ permission. |
static DiscussionSession |
getSession(User user)
Gets the discussion session using the specified user. |
Topic |
getTopic(long lTopicID)
Gets a topic with the given topic id. |
Topics |
getTopics()
Gets the topics collection to all of the topics the authenticated user has DiscussionPermission.READ permission. |
User |
getUser()
Gets the authenticated user for this session. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static DiscussionSession getSession(User user)
user
- the authenticated userpublic Forums getForums()
DiscussionPermission.READ
permission.public Topics getTopics()
DiscussionPermission.READ
permission.
This topics collection is not associated with any forum therefore,
new topics can not be added using Topics.add(String)
.
If an attempt is made to add a topic
to this collection, an exception is thrown. To add a topic,
the topics collection must be obtained from a forum.
Forum.getTopics()
public Messages getMessages()
DiscussionPermission.READ
permission.
This messages collection is not associated with any topic or parent message therefore,
new messages can not be added using Messages.add(String)
.
If an attempt is made to add a message
to this collection, an exception is thrown. To add a message,
the messages collection must be obtained from a topic or message.
Topic.getMessages()
,
Message.getMessages()
public Message getMessage(long lMessageID) throws java.security.AccessControlException
lMessageID
- the message idnull
if not foundjava.security.AccessControlException
- if the authenticated user is not allowed to read the messagepublic Topic getTopic(long lTopicID) throws java.security.AccessControlException
id
- the topic idnull
if not foundjava.security.AccessControlException
- if the authenticated user is not allowed to read the topicpublic Forum getForum(long lForumID) throws java.security.AccessControlException
lForumID
- the forum idnull
if not foundjava.security.AccessControlException
- if the authenticated user is not allowed to read the forumpublic User getUser()
public int getMaxmiumTopicAttachmentSize()
discussion.properties
using the topics.maxfilesize
property.public int getMaxmiumMessageAttachmentSize()
discussion.properties
using the messages.maxfilesize
property.public void close()
protected void finalize() throws java.lang.Throwable
close
.finalize
in class java.lang.Object
java.lang.Throwable
- if an error occurred during finalizationpublic java.lang.String toString()
toString
in class java.lang.Object
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |