com.starbase.starteam
Class Topic

java.lang.Object
  |
  +--com.starbase.starteam.CacheRef
        |
        +--com.starbase.starteam.NamedCacheRef
              |
              +--com.starbase.starteam.TypedResource
                    |
                    +--com.starbase.starteam.SimpleTypedResource
                          |
                          +--com.starbase.starteam.Item
                                |
                                +--com.starbase.starteam.TreeItem
                                      |
                                      +--com.starbase.starteam.Topic
All Implemented Interfaces:
java.lang.Cloneable, ISecurable, ISecurableObject

public class Topic
extends TreeItem

Represents a StarTeam Topic.


Nested Class Summary
 
Nested classes inherited from class com.starbase.starteam.Item
Item.LockType
 
Constructor Summary
Topic(Folder parentFolder)
          Creates a new topic in the specified folder.
Topic(Topic parentTopic)
          Creates a new topic that is a subtopic of an existing topic.
 
Method Summary
 void addRecipient(int userID)
          Adds the specified user ID as a recipient for this topic.
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 int getAmIRecipient()
          Returns a value indicating whether the logged on user is a recipient of this topic.
 int getChildrenCount()
          Returns the number of topics that are subtopics of this one.
 int getNumber()
          Returns the topic number of this topic.
 int getParentTopic()
          Returns the object ID of this topic's parent.
 int[] getPossiblePriority()
          Returns the possible enum codes that are valid values for the Priority property.
 int[] getPossibleReadStatus()
          Returns the possible enum codes that are valid values for the ReadStatus property.
 int[] getPossibleStatus()
          Returns the possible enum codes that are valid values for the Status property.
 int getPriority()
          Returns the Priority of this topic.
 java.lang.String getPriorityDisplayName(int value)
          Returns a user-friendly display name for the given Priority value.
 int getReadStatus()
          A flag indicating whether or not the user has read this item before.
 java.lang.String getReadStatusDisplayName(int value)
          Returns a user-friendly display name for the given ReadStatus value.
 int getRecipientCount()
          Returns the number of recipients assigned to this topic.
 int[] getRecipients()
          Returns the IDs of the users assigned as recipients of this topic.
 int getStatus()
          Returns the Status of this topic.
 java.lang.String getStatusDisplayName(int value)
          Returns a user-friendly display name for the given Status value.
 java.lang.String getText()
          Returns the text or body of the topic.
 java.lang.String getTitle()
          Returns the title or subject of the topic.
 int hashCode()
          returns a unique hash for all instances of this type
 void modifyReadStatusForUser(boolean bSetAsRead)
          Modifies this item's read status for the logged-in user.
 void removeRecipient(int userID)
          Removes the specified user ID as a recipient from this topic.
 void setPriority(int Priority)
          Sets the Priority of this topic.
 void setStatus(int Status)
          Sets the Status of this topic.
 void setText(java.lang.String text)
          Sets the text or body of this topic.
 void setTitle(java.lang.String title)
          Sets the title or subject of this topic.
 
Methods inherited from class com.starbase.starteam.TreeItem
createChild, getParentID, move, moveTo, moveTo, remove, shareTo
 
Methods inherited from class com.starbase.starteam.Item
acquireOwnership, addAttachment, copy, createAttachment, createAttachmentFromFile, createItem, deleteMergePoint, discard, get, getACL, getAllLabels, getAttachedLabels, getAttachment, getAttachmentIDs, getAttachmentNames, getAttachmentToFile, getBehavior, getBranchRevisionFromDotNotation, getByProperty, getByPropertyID, getByteArray, getCachedProperties, getComment, getCommonAncestor, getCreatedBy, getCreatedTime, getDeletedTime, getDeletedUserID, getDisplayValue, getDotNotation, getDouble, getEnumDisplayName, getFlag, getFlagDisplayName, getFromHistoryByDate, getFromHistoryByLabelID, getFromHistoryByVersion, getHistory, getID, getInt, getIntArray, getItemID, getItemRevisions, getLocker, getMergeHistory, getModifiedBy, getModifiedTime, getMyLock, getNewRevisionComment, getObjectID, getOLEDate, getOwner, getParentContainer, getParentFolder, getParentFolderHierarchy, getParentFolderName, getParentFolderPath, getParentFolderQualifiedName, getParentRevision, getPossibleFlag, getPossibleValues, getPropertyNames, getReference, getReferences, getRevisionNumber, getRootObjectID, getServer, getString, getType, getTypeNames, getView, getViewVersion, getViewVersionFromDotNotation, hasPermission, hasValues, isBranchable, isDeleted, isDirty, isDisembodied, isEqualTo, isFromHistory, isNew, isRefreshRequired, isRefreshRequired, isReverseShareRecommended, isRootShare, lock, modifyFlagForUser, populate, populate, put, putByPropertyID, putLock, recordMergePoint, refresh, refresh, removeAttachment, resolveMergePoint, reverseShareTo, setACL, setBehavior, setBranchOnChange, setComment, setFixedConfig, setFloatingConfig, smartShareTo, toDebugString, toString, unlock, update, updateRevisionComment
 
Methods inherited from class com.starbase.starteam.TypedResource
addToIntArray, removeFromIntArray
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Topic

public Topic(Folder parentFolder)
Creates a new topic in the specified folder.

Parameters:
parentFolder - The folder to which this new topic will be added.

Topic

public Topic(Topic parentTopic)
Creates a new topic that is a subtopic of an existing topic.

Parameters:
parentTopic - The parent topic.
Method Detail

getParentTopic

public int getParentTopic()
Returns the object ID of this topic's parent. A value of -1 means the topic has no parent.

Returns:
The object ID of this topic's parent. A value of -1 means the topic has no parent.
See Also:
Item.getObjectID(), PropertyNames.TOPIC_PARENT

getTitle

public java.lang.String getTitle()
Returns the title or subject of the topic.

Returns:
The title or subject of the topic.
See Also:
PropertyNames.TOPIC_TITLE

setTitle

public void setTitle(java.lang.String title)
Sets the title or subject of this topic.

Parameters:
title - The new topic title.

getText

public java.lang.String getText()
Returns the text or body of the topic.

Returns:
The text or body of the topic.
See Also:
PropertyNames.TOPIC_DESCRIPTION

setText

public void setText(java.lang.String text)
Sets the text or body of this topic.

Parameters:
text - The new tex or body for this topic.

getNumber

public int getNumber()
Returns the topic number of this topic.

Returns:
The topic number of this topic.
See Also:
PropertyNames.TOPIC_NUMBER

getChildrenCount

public int getChildrenCount()
Returns the number of topics that are subtopics of this one.

Returns:
The number of topics that are subtopics of this one.
Throws:
DisembodiedItemException - if the Topic is disembodied
See Also:
Item.isDisembodied(), PropertyNames.TOPIC_CHILDREN_COUNT

getPriority

public int getPriority()
Returns the Priority of this topic.

Returns:
The Priority of this topic.
See Also:
Topic.getPossiblePriority(), Topic.getPriorityDisplayName(int), PropertyNames.TOPIC_PRIORITY

setPriority

public void setPriority(int Priority)
Sets the Priority of this topic.

Parameters:
Priority - The new Priority for this topic.

getPossiblePriority

public int[] getPossiblePriority()
Returns the possible enum codes that are valid values for the Priority property. This is really a convenience method for accessing Property.getEnumValues for this property.

Returns:
The possible values for the Priority property.
See Also:
Topic.getPriority(), Topic.getPriorityDisplayName(int), TypedResource.getPossibleValues(java.lang.String), PropertyNames.TOPIC_PRIORITY

getPriorityDisplayName

public java.lang.String getPriorityDisplayName(int value)
Returns a user-friendly display name for the given Priority value. This is really a convenience method for accessing TypedResource.getEnumDisplayName for this property.

Parameters:
value - The Priority value to be converted to a display name.
Returns:
A user-friendly display name for the given Priority value.
See Also:
Topic.getPriority(), Topic.getPossiblePriority(), TypedResource.getEnumDisplayName(java.lang.String, int), PropertyNames.TOPIC_PRIORITY

getStatus

public int getStatus()
Returns the Status of this topic.

Returns:
The Status of this topic.
See Also:
Topic.getPossibleStatus(), Topic.getStatusDisplayName(int), PropertyNames.TOPIC_STATUS

setStatus

public void setStatus(int Status)
Sets the Status of this topic.

Parameters:
Status - The new Status for this topic.

getPossibleStatus

public int[] getPossibleStatus()
Returns the possible enum codes that are valid values for the Status property. This is really a convenience method for accessing Property.getEnumValues for this property.

Returns:
The possible values for the Status property.
See Also:
Topic.getStatus(), Topic.getStatusDisplayName(int), TypedResource.getPossibleValues(java.lang.String), PropertyNames.TOPIC_STATUS

getStatusDisplayName

public java.lang.String getStatusDisplayName(int value)
Returns a user-friendly display name for the given Status value. This is really a convenience method for accessing TypedResource.getEnumDisplayName for this property.

Parameters:
value - The Status value to be converted to a display name.
Returns:
A user-friendly display name for the given Status value.
See Also:
Topic.getStatus(), Topic.getPossibleStatus(), TypedResource.getEnumDisplayName(java.lang.String, int), PropertyNames.TOPIC_STATUS

getRecipientCount

public int getRecipientCount()
Returns the number of recipients assigned to this topic.

Returns:
The number of recipients assigned to this topic.
See Also:
PropertyNames.RECIPIENT_COUNT

getRecipients

public int[] getRecipients()
Returns the IDs of the users assigned as recipients of this topic.

Returns:
The IDs of the users assigned as recipients of this topic.
See Also:
PropertyNames.RECIPIENT_IDS

addRecipient

public void addRecipient(int userID)
Adds the specified user ID as a recipient for this topic.

Parameters:
userID - the user ID to add as a recipient for this topic,

removeRecipient

public void removeRecipient(int userID)
Removes the specified user ID as a recipient from this topic.

Parameters:
userID - the user ID recipient to remove from this topic.

getAmIRecipient

public int getAmIRecipient()
Returns a value indicating whether the logged on user is a recipient of this topic.

Returns:
A value indicating whether the logged on user is a recipient of this topic.
See Also:
PropertyNames.AM_I_RECIPIENT, Topic.addRecipient(int), Topic.removeRecipient(int), Topic.getRecipients(), PropertyEnums.AM_I_RECIPIENT_YES, PropertyEnums.AM_I_RECIPIENT_NO

getReadStatus

public int getReadStatus()
A flag indicating whether or not the user has read this item before.

Overrides:
getReadStatus in class Item
Returns:
A flag indicating whether or not the user has read this item before.
See Also:
Item.getReadStatus()

modifyReadStatusForUser

public void modifyReadStatusForUser(boolean bSetAsRead)
Modifies this item's read status for the logged-in user. Note that this is an "immediate" command, i.e., no update() call is required. Note also that only the currently logged-in user is affected. The result of getReadStatus() after this call may not be changed because its value will be based on cached information. To get the most up to date property values you should first call discard() on the item.

Overrides:
modifyReadStatusForUser in class Item
Parameters:
bSetAsRead - this item's new read status
See Also:
Item.modifyReadStatusForUser(boolean)

getPossibleReadStatus

public int[] getPossibleReadStatus()
Returns the possible enum codes that are valid values for the ReadStatus property. This is really a convenience method for accessing Property.getEnumValues for this property.

Overrides:
getPossibleReadStatus in class Item
Returns:
The possible values for the ReadStatus property.
See Also:
Item.getPossibleReadStatus()

getReadStatusDisplayName

public java.lang.String getReadStatusDisplayName(int value)
Returns a user-friendly display name for the given ReadStatus value. This is really a convenience method for accessing TypedResource.getEnumDisplayName for this property.

Overrides:
getReadStatusDisplayName in class Item
Parameters:
value - The ReadStatus value to be converted to a display name.
Returns:
A user-friendly display name for the given ReadStatus value.
See Also:
Item.getReadStatusDisplayName(int)

equals

public boolean equals(java.lang.Object source)
returns true if this object instance is equal to the source

Overrides:
equals in class Item
Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

hashCode

public int hashCode()
returns a unique hash for all instances of this type

Overrides:
hashCode in class Item
Returns:
int a unique hash for all instances of this type


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.