wt.workflow.forum
Class DiscussionTopic

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.workflow.forum.Discussion
          extended bywt.workflow.forum.DiscussionTopic
All Implemented Interfaces:
CollaborationContainer, DisplayIdentification, DomainAdministered, EventListener, Externalizable, Indexable, NetFactor, Notifiable, ObjectMappable, ObjectSubscriptionListener, Ownable, Persistable, RecentlyVisited, Serializable, WTContained

public class DiscussionTopic
extends Discussion
implements Externalizable

A DiscussionTopic is a subject/header in a forum under which comments/postings can be made. It serves as a categorization mechanism for discussions within a particular forum. A forum can have any number of DiscussionTopics. Every posting in a DiscussionForum needs to be a child of a topic.

Use the newDiscussionTopic static factory method(s), not the DiscussionTopic constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private  String description
           
static String DESCRIPTION
          Label for the attribute.
private static int DESCRIPTION_UPPER_LIMIT
           
static long EXTERNALIZATION_VERSION_UID
           
static String FORUM
          Label for the attribute.
private static String FORUM_NOTIFICATION_TEMPLATE
           
static String FORUM_REFERENCE
          Label for the attribute.
private  ObjectReference forumReference
           
private  String name
           
static String NAME
          Label for the attribute.
private static int NAME_UPPER_LIMIT
           
protected static long OLD_FORMAT_VERSION_UID
           
static String PARENT_TOPIC
          Label for the attribute.
static String PARENT_TOPIC_REFERENCE
          Label for the attribute.
private  ObjectReference parentTopicReference
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static boolean VERBOSE
           
 
Fields inherited from class wt.workflow.forum.Discussion
CONTAINER, DEFINITION
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.ownership.Ownable
OWNERSHIP
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.workflow.collaboration.CollaborationContainer
DEFINITION_REFERENCE
 
Fields inherited from interface wt.notify.Notifiable
EVENT_SET
 
Fields inherited from interface wt.inf.container.WTContained
CONTAINER_ID, CONTAINER_NAME, CONTAINER_REFERENCE
 
Fields inherited from interface wt.index.Indexable
INDEXER_SET
 
Fields inherited from interface wt.admin.DomainAdministered
DOMAIN_REF, INHERITED_DOMAIN
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
DiscussionTopic()
           
 
Method Summary
 void addPosting(DiscussionPosting posting)
          

Supported API: false
private  void descriptionValidate(String a_Description)
           
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
private  void forumReferenceValidate(ObjectReference a_ForumReference)
           
 Vector getChildren()
          Returns all objects that have the container as their parent object.
 Vector getChildren(boolean attachments)
          Returns all objects that have the container as their parent object.
 String getConceptualClassname()
          Deprecated.  
 String getDescription()
          Gets the value of the attribute: DESCRIPTION.
 DiscussionForum getForum()
          Gets the object for the association that plays role: FORUM.
 ObjectReference getForumReference()
          Gets the value of the attribute: FORUM_REFERENCE.
 String getName()
          Gets the value of the attribute: NAME.
 Vector getOnlyImmediateChildren()
          Returns all objects that have the container as their parent object.
 CollaborationContainer getParent()
          Returns the object if any that acts as the container of this object.
 DiscussionTopic getParentTopic()
          Gets the object for the association that plays role: PARENT_TOPIC.
 ObjectReference getParentTopicReference()
          Gets the value of the attribute: PARENT_TOPIC_REFERENCE.
 Enumeration getPostings()
          Retrieves all the DiscussionPosting that are part of this discusson.
 Enumeration getTopics()
          Retrieves all the topics that are part of this discussion i.e.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
protected  void initialize()
          Initializes objects created by new-factory methods.
protected  void initialize(String topicName, Discussion parent)
          Supports initialization, following construction of an instance.
private  void nameValidate(String a_Name)
           
static DiscussionTopic newDiscussionTopic(String topicName, Discussion parent)
          Creates a new DiscussionTopic with the given name and sets the parent as the given Discussion.
private  void parentTopicReferenceValidate(ObjectReference a_ParentTopicReference)
           
 ObjectSubscription populateSubscription(ObjectSubscription subscription)
          

Supported API: false
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
 void readExternal(PersistentRetrieveIfc input)
          Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(DiscussionTopic thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setDescription(String a_Description)
          Sets the value of the attribute: DESCRIPTION.
 void setForum(DiscussionForum a_Forum)
          Sets the object for the association that plays role: FORUM.
 void setForumReference(ObjectReference a_ForumReference)
          Sets the value of the attribute: FORUM_REFERENCE.
 void setName(String a_Name)
          Sets the value of the attribute: NAME.
 void setParentTopic(DiscussionTopic a_ParentTopic)
          Sets the object for the association that plays role: PARENT_TOPIC.
 void setParentTopicReference(ObjectReference a_ParentTopicReference)
          Sets the value of the attribute: PARENT_TOPIC_REFERENCE.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeExternal(PersistentStoreIfc output)
          Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.
 
Methods inherited from class wt.workflow.forum.Discussion
addUserSubscription, getContainer, getContainerName, getContainerReference, getDefinition, getDefinitionReference, getDomainRef, getEventSet, getIndexerSet, getOwnership, isInheritedDomain, notifyObjectEvent, readVersion, setContainer, setContainerReference, setDefinition, setDefinitionReference, setDomainRef, setEventSet, setIndexerSet, setInheritedDomain, setOwnership
 
Methods inherited from class wt.fc.WTObject
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.Persistable
checkAttributes, getIdentity, getPersistInfo, getType, setPersistInfo
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

DESCRIPTION

public static final String DESCRIPTION
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

DESCRIPTION_UPPER_LIMIT

private static int DESCRIPTION_UPPER_LIMIT

description

private String description

NAME

public static final String NAME
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

NAME_UPPER_LIMIT

private static int NAME_UPPER_LIMIT

name

private String name

PARENT_TOPIC

public static final String PARENT_TOPIC
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

PARENT_TOPIC_REFERENCE

public static final String PARENT_TOPIC_REFERENCE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

parentTopicReference

private ObjectReference parentTopicReference

FORUM

public static final String FORUM
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

FORUM_REFERENCE

public static final String FORUM_REFERENCE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

forumReference

private ObjectReference forumReference

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

VERBOSE

private static boolean VERBOSE

FORUM_NOTIFICATION_TEMPLATE

private static final String FORUM_NOTIFICATION_TEMPLATE
See Also:
Constant Field Values
Constructor Detail

DiscussionTopic

public DiscussionTopic()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class Discussion
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class Discussion
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(DiscussionTopic thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Overrides:
writeExternal in class Discussion
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Overrides:
readExternal in class Discussion
Parameters:
input -
Throws:
SQLException
DatastoreException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

getDescription

public String getDescription()
Gets the value of the attribute: DESCRIPTION.

Supported API: false

Returns:
String

setDescription

public void setDescription(String a_Description)
                    throws WTPropertyVetoException
Sets the value of the attribute: DESCRIPTION.

Supported API: false

Parameters:
a_Description -
Throws:
WTPropertyVetoException

descriptionValidate

private void descriptionValidate(String a_Description)
                          throws WTPropertyVetoException
Parameters:
a_Description -
Throws:
WTPropertyVetoException

getName

public String getName()
Gets the value of the attribute: NAME.

Supported API: false

Returns:
String

setName

public void setName(String a_Name)
             throws WTPropertyVetoException
Sets the value of the attribute: NAME.

Supported API: false

Parameters:
a_Name -
Throws:
WTPropertyVetoException

nameValidate

private void nameValidate(String a_Name)
                   throws WTPropertyVetoException
Parameters:
a_Name -
Throws:
WTPropertyVetoException

getParentTopic

public DiscussionTopic getParentTopic()
Gets the object for the association that plays role: PARENT_TOPIC.

Supported API: false

Returns:
DiscussionTopic

setParentTopic

public void setParentTopic(DiscussionTopic a_ParentTopic)
                    throws WTPropertyVetoException,
                           WTException
Sets the object for the association that plays role: PARENT_TOPIC.

Supported API: false

Parameters:
a_ParentTopic -
Throws:
WTPropertyVetoException
WTException

getParentTopicReference

public ObjectReference getParentTopicReference()
Gets the value of the attribute: PARENT_TOPIC_REFERENCE.

Supported API: false

Returns:
ObjectReference

setParentTopicReference

public void setParentTopicReference(ObjectReference a_ParentTopicReference)
                             throws WTPropertyVetoException
Sets the value of the attribute: PARENT_TOPIC_REFERENCE.

Supported API: false

Parameters:
a_ParentTopicReference -
Throws:
WTPropertyVetoException

parentTopicReferenceValidate

private void parentTopicReferenceValidate(ObjectReference a_ParentTopicReference)
                                   throws WTPropertyVetoException
Parameters:
a_ParentTopicReference -
Throws:
WTPropertyVetoException

getForum

public DiscussionForum getForum()
Gets the object for the association that plays role: FORUM.

Supported API: false

Returns:
DiscussionForum

setForum

public void setForum(DiscussionForum a_Forum)
              throws WTPropertyVetoException,
                     WTException
Sets the object for the association that plays role: FORUM.

Supported API: false

Parameters:
a_Forum -
Throws:
WTPropertyVetoException
WTException

getForumReference

public ObjectReference getForumReference()
Gets the value of the attribute: FORUM_REFERENCE.

Supported API: false

Returns:
ObjectReference

setForumReference

public void setForumReference(ObjectReference a_ForumReference)
                       throws WTPropertyVetoException
Sets the value of the attribute: FORUM_REFERENCE.

Supported API: false

Parameters:
a_ForumReference -
Throws:
WTPropertyVetoException

forumReferenceValidate

private void forumReferenceValidate(ObjectReference a_ForumReference)
                             throws WTPropertyVetoException
Parameters:
a_ForumReference -
Throws:
WTPropertyVetoException

addPosting

public void addPosting(DiscussionPosting posting)


Supported API: false

Parameters:
posting -

getTopics

public Enumeration getTopics()
                      throws WTException
Retrieves all the topics that are part of this discussion i.e. they are chilren of this topic.

Supported API: false

Returns:
Enumeration
Throws:
WTException

getPostings

public Enumeration getPostings()
                        throws WTException
Retrieves all the DiscussionPosting that are part of this discusson.

Supported API: false

Returns:
Enumeration
Throws:
WTException

newDiscussionTopic

public static DiscussionTopic newDiscussionTopic(String topicName,
                                                 Discussion parent)
                                          throws WTException
Creates a new DiscussionTopic with the given name and sets the parent as the given Discussion.

Supported API: false

Parameters:
topicName - The name of the topic.
parent - The parent Discussion of this topic. Can only be a Forum or a DiscussionTopic.
Returns:
DiscussionTopic
Throws:
WTException

initialize

protected void initialize(String topicName,
                          Discussion parent)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: false

Parameters:
topicName - The name of the topic.
parent - The parent Discussion of this topic. Can only be a Forum or a DiscussionTopic.
Throws:
WTException

getParent

public CollaborationContainer getParent()
                                 throws WTException
Returns the object if any that acts as the container of this object.

Supported API: false

Specified by:
getParent in interface CollaborationContainer
Overrides:
getParent in class Discussion
Returns:
CollaborationContainer
Throws:
WTException

populateSubscription

public ObjectSubscription populateSubscription(ObjectSubscription subscription)
                                        throws WTException


Supported API: false

Specified by:
populateSubscription in interface CollaborationContainer
Overrides:
populateSubscription in class Discussion
Parameters:
subscription -
Returns:
ObjectSubscription
Throws:
WTException

getChildren

public Vector getChildren()
                   throws WTException
Returns all objects that have the container as their parent object.

Supported API: false

Specified by:
getChildren in interface CollaborationContainer
Returns:
Vector
Throws:
WTException

getOnlyImmediateChildren

public Vector getOnlyImmediateChildren()
                                throws WTException
Returns all objects that have the container as their parent object.

Supported API: false

Specified by:
getOnlyImmediateChildren in class Discussion
Returns:
Vector
Throws:
WTException

getChildren

public Vector getChildren(boolean attachments)
                   throws WTException
Returns all objects that have the container as their parent object.

Supported API: false

Specified by:
getChildren in class Discussion
Parameters:
attachments -
Returns:
Vector
Throws:
WTException

equals

public boolean equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers. Changed or stale copies are still considered equal by this method. Delegates to PersistenceHelper.equals(Persistable,Object).

Warning: Certain core Windchill operations may depend upon equals being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
equals in class Discussion
Parameters:
obj -
Returns:
boolean

hashCode

public int hashCode()
Returns a hash code for this object based upon its ObjectIdentifier. Delegates to PersistenceHelper.hashCode(Persistable).

Warning: Certain core Windchill operations may depend upon hashCode being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
hashCode in class Discussion
Returns:
int

initialize

protected void initialize()
                   throws WTException
Description copied from class: WTObject
Initializes objects created by new-factory methods.

Supported API: false

Overrides:
initialize in class WTObject
Throws:
WTException