|
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.Forum
This class represents a forum.
To add and search for forums, see the Forums
collection
class. Once the forum is obtained, its
accessor methods may be called to
set and get properties. The update()
method
must be called to store any changes to the server.
The following table contains the mappings from Forum properties to their corresponding Java methods:
Field Summary | |
protected int |
m_iMessageCount
|
protected int |
m_iTopicCount
|
Constructor Summary | |
Forum()
Constructor. |
Method Summary | |
void |
clearExpiration()
Clears the expiration date for this forum. |
void |
clearMaximumTopicCount()
Clears the maximum number of topics for this fourm. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
void |
delete()
Deletes the forum. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
AccessManager |
getAccessManager()
Gets the access manager for this forum. |
java.util.Date |
getArchiveDate()
Gets the archive date for this forum. |
java.lang.String |
getAuthor()
Gets the name of the author. |
java.lang.String |
getContentType()
Gets the content type of the forum description. |
long |
getCustomNum1()
Gets the custom number1 field of the forum. |
long |
getCustomNum2()
Gets the custom number2 field of the forum. |
long |
getCustomNum3()
Gets the custom number3 field of the forum. |
long |
getCustomNum4()
Gets the custom number4 field of the forum. |
java.lang.String |
getCustomStr1()
Gets the custom string1 field of the forum. |
java.lang.String |
getCustomStr2()
Gets the custom string2 field of the forum. |
java.lang.String |
getCustomStr3()
Gets the custom string3 field of the forum. |
java.lang.String |
getCustomStr4()
Gets the custom string4 field of the forum. |
java.util.Date |
getDateCreated()
Gets the date the forum was created. |
java.util.Date |
getDateLastModified()
Gets the date the forum was last modified. |
java.lang.String |
getDescription()
Gets the description of the forum. |
java.util.Date |
getExpiration()
Gets the expiration date of this forum, if on exists. |
long |
getID()
Gets the unique identifier (id) of the forum. |
java.lang.String |
getKeywords()
Gets the keywords associated with this forum. |
int |
getMaximumTopicCount()
Gets the maximum topic count, if set. |
int |
getMessageCount()
Gets the number of messages associated with the topics under this forum. |
Messages |
getMessages()
Gets the messages associated with this forum. |
java.lang.String |
getName()
Gets the name of the forum. |
int |
getTopicCount()
Gets the number of topics associated with the forum. |
Topics |
getTopics()
Gets the topics associated with this forum. |
ForumType |
getType()
Gets the type of forum. |
boolean |
hasExpiration()
Checks if this forum has an expiration. |
boolean |
hasMaximumTopicCount()
Checks if the forum has a maximum topic count set. |
boolean |
isArchived()
Checks if this forum is archived. |
boolean |
isExpired()
Checks if this forum is expired. |
boolean |
isMaximumTopicCount()
Checks if the forum has reached the maximum topic count. |
boolean |
isModified()
Checks if this forum has been modified since the user's last login. |
void |
setArchive(boolean bArchive)
Sets the archive flag for this forum. |
void |
setContentType(java.lang.String sContentType)
Sets the content type of the forum description. |
void |
setCustomNum1(long lCustomNum1)
Sets the custom number1 field of the forum. |
void |
setCustomNum2(long lCustomNum2)
Sets the custom number2 field of the forum. |
void |
setCustomNum3(long lCustomNum3)
Sets the custom number3 field of the forum. |
void |
setCustomNum4(long lCustomNum4)
Sets the custom number4 field of the forum. |
void |
setCustomStr1(java.lang.String sCustomStr1)
Sets the custom string1 field of the forum. |
void |
setCustomStr2(java.lang.String sCustomStr2)
Sets the custom string2 field of the forum. |
void |
setCustomStr3(java.lang.String sCustomStr3)
Sets the custom string3 field of the forum. |
void |
setCustomStr4(java.lang.String sCustomStr4)
Sets the custom string4 field of the forum. |
void |
setDescription(java.lang.String sDescription)
Sets the description of the forum. |
void |
setExpiration(java.util.Date expirationDate)
Sets the expiration date for this forum. |
void |
setKeywords(java.lang.String sKeywords)
Sets the keywords associated with this forum. |
void |
setKeywords(java.lang.String[] keywords)
Sets the keywords associated with this forum. |
void |
setMaximumTopicCount(int iMaximum)
Sets the maximum number of topics this forum can have. |
void |
setName(java.lang.String sName)
Sets the name of the forum. |
void |
setType(ForumType type)
Sets the type of forum. |
java.lang.String |
toString()
Returns a string representation of the object. |
boolean |
update()
Updates the forum (saves the forum entry). |
boolean |
update(boolean bForce)
Updates the forum (saves the forum entry). |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int m_iTopicCount
protected int m_iMessageCount
Constructor Detail |
public Forum()
Forums.add(String)
to
create a forum.Method Detail |
public java.lang.Object clone()
clone
in class java.lang.Object
public long getID()
public java.lang.String getName()
null
if no name is setpublic void setName(java.lang.String sName)
sName
- the name of the forum or null
if no name is setpublic boolean isArchived()
true
if this forum is archived; false
otherwisepublic void setArchive(boolean bArchive)
bArchive
- true
to set this forum as archived; false
otherwisepublic java.util.Date getArchiveDate()
null
if the archive flag is not set to true
isArchived()
public void setType(ForumType type) throws java.security.AccessControlException
MODERATED
,
the user is given the DiscussionPermission.MODERATOR
. If setting
the type to UNMODERATED
, all existing moderator permissions
are removed.type
- the type of forum (may not be null
)java.security.AccessControlException
- occurs if the user attempting to set the forum type is not an ownerpublic ForumType getType()
public java.util.Date getDateCreated()
public java.util.Date getDateLastModified()
public boolean isModified()
true
if forum has been modified; false
otherwisepublic java.lang.String getContentType()
text/plain
can be displayed as plain text.getDescription()
public void setContentType(java.lang.String sContentType)
sContentType
- the MIME content type of the description (may not be null
or empty)getDescription()
public java.lang.String getDescription()
null
for no descriptionpublic void setDescription(java.lang.String sDescription)
sDescription
- the description of the forum or null
for no descriptionpublic int getTopicCount()
public boolean isMaximumTopicCount()
true
if the forum has reached the maximum topic count; false
otherwisegetMaximumTopicCount()
public boolean hasMaximumTopicCount()
true
if maximum topic count is set; false
otherwisepublic int getMaximumTopicCount()
hasMaximumTopicCount()
public void setMaximumTopicCount(int iMaximum)
iMaximum
- the maximum number of topics ( < 0 for no maximum)public void clearMaximumTopicCount()
public int getMessageCount()
public java.lang.String getKeywords()
null
for nonesetKeywords(String)
public Messages getMessages()
public Topics getTopics()
public java.lang.String getAuthor()
public boolean hasExpiration()
true
if this forum has an expiration: false
otherwisepublic java.util.Date getExpiration()
null
for nonepublic void setExpiration(java.util.Date expirationDate)
expirationDate
- the date the forum expires or null
for no expiration datepublic void clearExpiration()
public boolean isExpired()
true
if the forum is expired; false
if forum has not expired or not expiration is sethasExpiration()
public void setKeywords(java.lang.String[] keywords)
The specified array of keywords are converted into
a space delimited String
of keywords.
Existing keywords (if any) are over-written by the
specified keywords.
keywords
- an array of keywords to associate with this forum (may not be null
)setKeywords(String)
public void setKeywords(java.lang.String sKeywords)
Existing keywords (if any) are over-written by the specified keywords.
sKeywords
- the keywords to associate with this forum or null
for nonepublic long getCustomNum1()
null
if the custom number1 field is not setpublic void setCustomNum1(long lCustomNum1)
lCustomNum1
- the custom number1 field of the forumpublic long getCustomNum2()
null
if the custom number2 field is not setpublic void setCustomNum2(long lCustomNum2)
lCustomNum2
- the custom number2 field of the forumpublic long getCustomNum3()
null
if the custom number3 field is not setpublic void setCustomNum3(long lCustomNum3)
lCustomNum3
- the custom number3 field of the forumpublic long getCustomNum4()
null
if the custom number4 field is not setpublic void setCustomNum4(long lCustomNum4)
lCustomNum4
- the custom number4 field of the forumpublic java.lang.String getCustomStr1()
null
if the custom string1 field is not setpublic void setCustomStr1(java.lang.String sCustomStr1)
sCustomStr1
- the custom string1 field of the forumpublic java.lang.String getCustomStr2()
null
if the custom string2 field is not setpublic void setCustomStr2(java.lang.String sCustomStr2)
sCustomStr2
- the custom string2 field of the forumpublic java.lang.String getCustomStr3()
null
if the custom string3 field is not setpublic void setCustomStr3(java.lang.String sCustomStr3)
sCustomStr3
- the custom string3 field of the forumpublic java.lang.String getCustomStr4()
null
if the custom string4 field is not setpublic void setCustomStr4(java.lang.String sCustomStr4)
sCustomStr4
- the custom string4 field of the forumpublic AccessManager getAccessManager() throws AccessManagerException
AccessManagerException
- an error occurs retrieving the access managerDiscussionPermission
public boolean update() throws java.security.AccessControlException
true
if the update is successful; false
otherwisejava.security.AccessControlException
- occurs if the user does not have permission to edit the forumpublic boolean update(boolean bForce) throws java.security.AccessControlException
bForce
- true
to force the update; false
otherwise (currently ignored)true
if the update is successful; false
otherwisejava.security.AccessControlException
- occurs if the user does not have permission to edit the forumpublic void delete() throws java.security.AccessControlException
java.security.AccessControlException
- occurs if the user does not have permission to delete the forumpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare for eqaulitytrue
if the objects are equals; false
otherwisepublic 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 |