org.tigris.scarab.om
Class Issue

java.lang.Object
  extended byorg.apache.torque.om.BaseObject
      extended byorg.tigris.scarab.om.BaseIssue
          extended byorg.tigris.scarab.om.Issue
All Implemented Interfaces:
org.apache.torque.om.Persistent, org.apache.fulcrum.intake.Retrievable, java.io.Serializable
Direct Known Subclasses:
IssueSearch

public class Issue
extends BaseIssue
implements org.apache.torque.om.Persistent

This class represents an Issue.

Version:
$Id: Issue.java 10349 2006-11-08 16:59:26Z ronvoe122 $
Author:
John McNally, Jon S. Stevens, Elicia David
See Also:
Serialized Form

Nested Class Summary
static class Issue.FederatedId
          A FederatedId has this format: {Domain}-{Code}{Id} For example: collab.net-PACS1 The domain can also be null.
 
Field Summary
protected static java.lang.String GET_ACTIVITY
           
protected static java.lang.String GET_ALL_DEPENDENCY_TYPES
           
protected static java.lang.String GET_ALL_USERS_TO_EMAIL
           
protected static java.lang.String GET_ASSOCIATED_USERS
           
protected static java.lang.String GET_ATTRIBUTE_VALUES_MAP
           
protected static java.lang.String GET_ATTRVALUE
           
protected static java.lang.String GET_ATTRVALUES
           
protected static java.lang.String GET_CHILDREN
           
protected static java.lang.String GET_CLOSED_DATE
           
protected static java.lang.String GET_COMMENTS
           
protected static java.lang.String GET_CREATED_BY
           
protected static java.lang.String GET_CREATED_DATE
           
protected static java.lang.String GET_DEFAULT_TEXT
           
protected static java.lang.String GET_DEFAULT_TEXT_ATTRIBUTEVALUE
           
protected static java.lang.String GET_DEPENDENCY
           
protected static java.lang.String GET_EXISTING_ATTACHMENTS
           
protected static java.lang.String GET_HISTORY_LIMIT
           
protected static java.lang.String GET_INITIAL_ACTIVITYSET
           
protected static java.lang.String GET_LAST_TRANSACTION
           
protected static java.lang.String GET_MODIFIED_BY
           
protected static java.lang.String GET_MODIFIED_DATE
           
protected static java.lang.String GET_MODULE_ATTRVALUES_MAP
           
protected static java.lang.String GET_NULL_END_DATE
           
protected static java.lang.String GET_ORPHAN_ATTRIBUTEVALUES_LIST
           
protected static java.lang.String GET_PARENTS
           
protected static java.lang.String GET_TEMPLATE_TYPES
           
protected static java.lang.String GET_TEMPLATEINFO
           
protected static java.lang.String GET_TRANSACTIONS
           
protected static java.lang.String GET_URLS
           
protected static java.lang.String GET_USER_ATTRIBUTEVALUE
           
protected static java.lang.String GET_USER_ATTRIBUTEVALUES
           
 
Fields inherited from class org.tigris.scarab.om.BaseIssue
collActivitys, collAttachments, collAttributeValues, collDependsRelatedByObservedId, collDependsRelatedByObserverId, collIssueTemplateInfos, collIssueVotes
 
Fields inherited from class org.apache.torque.om.BaseObject
NEW_ID
 
Constructor Summary
protected Issue()
          new issues are created only when the issuetype and module are known Or by the Peer when retrieving from db
protected Issue(Module module, IssueType issueType)
           
 
Method Summary
 void addActivity(Activity activity)
          Returns limited list of Activity objects associated with this Issue.
 void addAttributeValue(AttributeValue aval)
          Method called to associate a AttributeValue object to this object through the AttributeValue foreign key attribute
 ActivitySet addComment(ActivitySet activitySet, Attachment attachment, ScarabUser user)
          Adds a comment to an issue.
 ActivitySet addComment(Attachment attachment, ScarabUser user)
          Adds a comment to an issue and passes null as the activity set to create a new one.
 void addFile(Attachment attachment, ScarabUser user)
          Adds an attachment file to this issue.
 ActivitySet addUrl(ActivitySet activitySet, Attachment attachment, ScarabUser user)
          Adds a url to an issue.
 ActivitySet addUrl(Attachment attachment, ScarabUser user)
          Adds a url to an issue and passes null as the activity set to create a new one.
 void addVote(ScarabUser user)
           
 ActivitySet assignUser(ActivitySet activitySet, ScarabUser assignee, ScarabUser assigner, Attribute attribute, Attachment attachment)
          Assigns user to issue.
protected  ActivitySet attachActivitySet(ActivitySet activitySet, ScarabUser user)
           
protected  ActivitySet attachActivitySet(ActivitySet activitySet, ScarabUser user, Attachment attachment)
           
protected  ActivitySet attachActivitySet(ActivitySet activitySet, ScarabUser user, Attachment attachment, java.lang.Integer activitySetType)
          Sets an ActivitySet as the lastActivitySet of an Issue.
 ActivitySet changeUserAttributeValue(ActivitySet activitySet, ScarabUser assignee, ScarabUser assigner, AttributeValue oldAttVal, Attribute newAttr, Attachment attachment)
          Used to change a user attribute value from one user attribute to a new one.
 boolean containsMinimumAttributeValues()
          Describe containsMinimumAttributeValues method here.
 void deleteIssue(ScarabUser user)
          If the user has permission to delete ISSUES in this module, it wil mark this issue as DELETED.
 void deleteItem(ScarabUser user)
          Checks if user has permission to delete issue template.
 ActivitySet deleteUser(ActivitySet activitySet, ScarabUser assignee, ScarabUser assigner, AttributeValue attVal, Attachment attachment)
          Used to delete a user attribute value.
 ActivitySet doAddDependency(ActivitySet activitySet, Depend depend, Issue childIssue, ScarabUser user)
           
 ActivitySet doChangeDependencyType(ActivitySet activitySet, Depend oldDepend, Depend newDepend, ScarabUser user)
          changes the dependency type as well as. will not change deptype for deleted deps
 ActivitySet doChangeUrlDescription(ActivitySet activitySet, ScarabUser user, Attachment attachment, java.lang.String oldDescription)
          Given a specific attachment object allow us to update the information in it.
 ActivitySet doChangeUrlUrl(ActivitySet activitySet, ScarabUser user, Attachment attachment, java.lang.String oldUrl)
          Given a specific attachment object allow us to update the information in it.
 java.lang.String doCheckAttributeValueWorkflow(java.util.HashMap newAttVals, Attachment attachment, ScarabUser user)
          Deprecated. The attachment doesn't need to be passed into this method.
 java.lang.String doCheckAttributeValueWorkflow(java.util.HashMap newAttVals, ScarabUser user)
          This method is used with the setAttributeValues() method to Make sure that workflow is valid.
 java.lang.String doCheckInitialAttributeValueWorkflow(java.util.HashMap newValues, ScarabUser user)
          This method is used with the setInitialAttributeValues() method to Make sure that workflow is valid for the initial values of a new issue.
 ActivitySet doDeleteDependency(ActivitySet activitySet, Depend oldDepend, ScarabUser user)
          Deletes a specific dependency on this issue.
 ActivitySet doDeleteUrl(ActivitySet activitySet, Attachment attachment, ScarabUser user)
          If the URL hasn't changed, it will return a valid ActivitySet otherwise it returns null.
 ActivitySet doEditComment(ActivitySet activitySet, java.lang.String newComment, Attachment attachment, ScarabUser user)
          If the comment hasn't changed, it will return a valid ActivitySet otherwise it returns null.
 ActivitySet doRemoveAttachment(ActivitySet activitySet, MutableBoolean physicallyDeleted, Attachment attachment, ScarabUser user)
          Remove the attachment.
 ActivitySet doSaveFileAttachments(ActivitySet activitySet, ScarabUser user)
          Adds an attachment file to this issue.
 ActivitySet doSaveFileAttachments(ScarabUser user)
          Adds an attachment file to this issue.
 java.util.List getActivitiesWithNullEndDate(Attribute attribute)
           
 java.util.List getActivity()
          Returns list of Activity objects associated with this Issue.
 java.util.List getActivity(boolean fullHistory)
          Returns limited list of Activity objects associated with this Issue.
 java.util.List getActivity(int limit)
          Returns limited list of Activity objects associated with this Issue.
 ActivitySet getActivitySet(ScarabUser user, Attachment attachment, java.lang.Integer type)
          Creates a new ActivitySet object for the issue.
 ActivitySet getActivitySet(ScarabUser user, java.lang.Integer type)
          Creates a new ActivitySet object for the issue.
 java.util.List getActivitySets()
          Returns a list of ActivitySet objects associated to this issue.
 java.util.Map getAllAttributeValuesMap()
          AttributeValues that are set for this issue and Empty AttributeValues that are relevant for the module, but have not been set for the issue are included.
 java.util.List getAllDependencies()
          Returns the combined output from getChildren() and getParents()
 java.util.List getAllDependencyTypes()
          Deprecated. use DependencyTypeManager.getAll();
 java.util.Set getAllUsersToEmail(java.lang.String action)
          Returns users assigned to user attributes that get emailed When issue is modified.
 java.util.HashSet getAssociatedUsers()
          Returns users assigned to all user attributes.
 java.util.List getAttachments()
          Overrides the super method in order to allow us to return the unSavedAttachments if they exist.
 AttributeValue getAttributeValue(Attribute attribute)
           
 AttributeValue getAttributeValue(int id)
           
 AttributeValue getAttributeValue(java.lang.String attributeName)
           
 java.util.List getAttributeValues(Attribute attribute)
          Returns the (undeleted) AttributeValues for the Attribute.
 java.util.Map getAttributeValuesMap()
          AttributeValues that are set for this Issue
 java.util.List getBlockedIssues()
          Returns a list of issues currently BLOCKED by this issue
 java.util.List getBlockingIssues()
          Returns a list of issues that actually "block" this issue, i.e., that are related via a "is blocked by" dependency, and are "blocking".
 java.util.List getChildren()
          Returns list of child dependencies i.e., related to this issue through the DEPEND table.
 java.util.List getChildren(boolean hideDeleted)
          Returns list of child dependencies i.e., related to this issue through the DEPEND table.
 java.util.List getComments(boolean full)
          Returns a list of Attachment objects with type "Comment" That are associated with this issue.
 int getCommentsCount()
          Returns the total number of comments.
 int getCommentsLimit()
          Gets default comments limit for this module-issue type.
 ScarabUser getCreatedBy()
          The user that created the issue.
 java.util.Date getCreatedDate()
          The date the issue was created.
 java.lang.String getDefaultText()
          This calls getDefaultTextAttributeValue() and then returns the String value of the Attribute.
 AttributeValue getDefaultTextAttributeValue()
          This method will return the AttributeValue which represents the default text attribute.
 java.util.List getDependantIssues()
          Returns a list of issues that might be blocked by this issue because if its "is_blocked_by" dependency.
 Depend getDependency(Issue potentialDependency)
          Checks to see if this issue has a dependency on the passed in issue.
 Depend getDependency(Issue potentialDependency, boolean hideDeleted)
          Checks to see if this issue has a dependency on the passed in issue.
 java.util.List getDuplicateIssues()
          Returns a list of issues that are related to this issue, via a "is_duplicate of" relationship.
 java.util.List getEligibleUsers(Attribute attribute)
          Users who are valid values to the attribute this issue.
 java.util.List getExistingAttachments()
          Get attachments that are not deleted
 java.lang.String getFederatedId()
           
 int getHistoryLimit()
          Gets default history limit for this module-issue type.
 ActivitySet getInitialActivitySet()
          The initial activity set from issue creation.
static Issue getIssueById(Issue.FederatedId fid)
          Deprecated. use IssueManager.getIssueById
static Issue getIssueById(java.lang.String id)
          Deprecated. use IssueManager.getIssueById
 java.lang.String getIssueNewId()
          This method search for the new ID of a moved issue.
 ActivitySet getLastActivitySet()
          The last modification made to the issue.
 java.util.List getMatchingAttributeValuesList(Module newModule, IssueType newIssueType)
          Gets a list of non-user AttributeValues which match a given Module.
 java.util.List getMatchingAttributeValuesList(java.lang.String moduleId, java.lang.String issueTypeId)
           
 ScarabUser getModifiedBy()
          The last user to modify the issue.
 java.util.Date getModifiedDate()
          The date issue was last modified.
 Module getModule()
          Module getter.
 org.apache.commons.collections.map.LinkedMap getModuleAttributeValuesMap()
          Calls the overloaded version by passing 'true' so that only active attributes will be considered.
 org.apache.commons.collections.map.LinkedMap getModuleAttributeValuesMap(boolean isActive)
          AttributeValues that are relevant to the issue's current module.
static Issue getNewInstance(Module module, IssueType issueType)
          Gets an issue associated to a Module
 java.util.List getNonMatchingAttributeValuesList(Module newModule, IssueType newIssueType)
          Gets a list AttributeValues which the source module has, But the destination module does not have, when doing a copy.
 java.util.List getNonMatchingAttributeValuesList(java.lang.String moduleId, java.lang.String issueTypeId)
           
 java.util.List getParents()
          Returns list of parent dependencies i.e., related to this issue through the DEPEND table.
 java.util.List getParents(boolean hideDeleted)
          Returns list of parent dependencies i.e., related to this issue through the DEPEND table.
 java.util.List getPrerequisiteIssues()
          Returns a list of issues that are blockable by this issue, via a "is_blocked_by" relationship.
 java.util.List getRelatedIssues()
          Returns a list of issues that are related to this issue, via a "is_related to" relationship.
 RModuleIssueType getRModuleIssueType()
          The RModuleIssueType related to this issue's module and issue type.
 ScarabModule getScarabModule()
          Throws UnsupportedOperationException.
 IssueTemplateInfo getTemplateInfo()
          Get IssueTemplateInfo by Issue Id.
 java.lang.String getUniqueId()
          Gets the UniqueId for this Issue.
 java.util.List getUnsetRequiredAttrs(Module newModule, IssueType newIssueType)
          Get Unset required attributes in destination module / issue type.
 java.util.List getUrls()
          Returns a list of Attachment objects with type "URL" That are associated with this issue.
 AttributeValue getUserAttributeValue(ScarabUser user, Attribute attribute)
          Returns the specific user's attribute value.
 java.util.List getUserAttributeValues()
          Returns attribute values for user attributes.
protected  java.util.Set getUsersToEmail(java.lang.String action, Issue issue, java.util.Set users)
          Returns the users which should be notified when this issue is modified.
 boolean hasEditPermission(ScarabUser user, Module module)
          Deprecated. user.hasPermission(ScarabSecurity.ISSUE__EDIT, module)
 boolean hasEnterPermission(ScarabUser user, Module module)
          Deprecated. user.hasPermission(ScarabSecurity.ISSUE__ENTER, module)
 boolean hasMovePermission(ScarabUser user, Module module)
          Deprecated. user.hasPermission(ScarabSecurity.ISSUE__EDIT, module)
 boolean isAttributeValue(AttributeValue attVal)
           
 boolean isBlocked()
          An issue is blocked when it depends, via a is_blocked_by dependency, of an issue that is currently "blocking".
 boolean isBlockedBy(java.lang.String blockingId)
          An issue is blocked when it depends, via a is_blocked_by dependency, of an issue that is currently "blocking".
 boolean isBlocking(java.lang.String blockedId)
           
 boolean isBlockingAnyIssue()
          Returns if this issue is currently blocking any other.
 boolean isBlockingConditionTrue()
          Returns if the issue's BlockingCondition is fulfilled.
 boolean isCommentsLong()
          Determines whether the comments list is longer than The default limit.
 boolean isCreatingUser(ScarabUser user)
           
 boolean isHistoryLong()
          Determines whether the history list is longer than The default limit.
 boolean isHistoryLong(int limit)
          Determines whether the history list is longer than The limit.
 boolean isTemplate()
          Whether this issue is an enter issue template.
 Issue move(Module newModule, IssueType newIssueType, java.lang.String action, ScarabUser user, java.lang.String reason, java.util.List commentAttrs, java.util.List commentUserValues)
          Move or copy issue to destination module.
static java.util.List parseIssueList(Module module, java.lang.String theList)
           
 void removeFile(java.lang.String index)
          Remove an attachment file
 void save(java.sql.Connection dbCon)
          Removes any unset attributes and sets the issue # prior to saving for the first time.
 ActivitySet setAttributeValues(ActivitySet activitySet, java.util.HashMap newAttVals, Attachment attachment, ScarabUser user)
          Sets AttributeValues for an issue based on a hashmap of attribute values This is data is saved to the database and the proper ActivitySet is also recorded.
 void setFederatedId(java.lang.String id)
           
 ActivitySet setInitialAttributeValues(ActivitySet activitySet, Attachment attachment, java.util.HashMap newValues, ScarabUser user)
          Sets original AttributeValues for an new issue based on a hashmap of values This is data is saved to the database and the proper ActivitySet is also recorded.
 void setModule(Module me)
          Use this instead of setScarabModule.
 void setScarabModule(ScarabModule module)
          Throws UnsupportedOperationException.
 void setUniqueId(java.lang.String id)
          NoOp for intake's benefit
 java.lang.String toString()
           
 
Methods inherited from class org.tigris.scarab.om.BaseIssue
addAttachment, addDependRelatedByObservedId, addDependRelatedByObserverId, addIssueTemplateInfo, addIssueVote, copy, copyInto, getActivitys, getActivitys, getActivitys, getActivitys, getActivitySetRelatedByCreatedTransId, getActivitySetRelatedByCreatedTransId, getActivitySetRelatedByLastTransId, getActivitySetRelatedByLastTransId, getActivitysJoinActivitySet, getActivitysJoinAttachment, getActivitysJoinAttribute, getActivitysJoinAttributeOptionRelatedByNewOptionId, getActivitysJoinAttributeOptionRelatedByOldOptionId, getActivitysJoinDepend, getActivitysJoinIssue, getActivitysJoinScarabUserImplRelatedByNewUserId, getActivitysJoinScarabUserImplRelatedByOldUserId, getAttachments, getAttachments, getAttachments, getAttachmentsJoinAttachmentType, getAttachmentsJoinIssue, getAttachmentsJoinScarabUserImplRelatedByCreatedBy, getAttachmentsJoinScarabUserImplRelatedByModifiedBy, getAttributeValues, getAttributeValues, getAttributeValues, getAttributeValues, getAttributeValuesJoinAttribute, getAttributeValuesJoinAttributeOption, getAttributeValuesJoinIssue, getAttributeValuesJoinScarabUserImpl, getByName, getByPeerName, getByPosition, getCreatedTransId, getDeleted, getDependsRelatedByObservedId, getDependsRelatedByObservedId, getDependsRelatedByObservedId, getDependsRelatedByObservedId, getDependsRelatedByObservedIdJoinDependType, getDependsRelatedByObservedIdJoinIssueRelatedByObserverId, getDependsRelatedByObserverId, getDependsRelatedByObserverId, getDependsRelatedByObserverId, getDependsRelatedByObserverId, getDependsRelatedByObserverIdJoinDependType, getDependsRelatedByObserverIdJoinIssueRelatedByObservedId, getFieldNames, getIdCount, getIdDomain, getIdPrefix, getIssueId, getIssueTemplateInfos, getIssueTemplateInfos, getIssueTemplateInfos, getIssueTemplateInfos, getIssueTemplateInfosJoinIssue, getIssueTemplateInfosJoinScope, getIssueType, getIssueType, getIssueVotes, getIssueVotes, getIssueVotes, getIssueVotes, getIssueVotesJoinIssue, getIssueVotesJoinScarabUserImpl, getLastTransId, getModule, getModuleId, getMoved, getPeer, getPrimaryKey, getQueryKey, getTypeId, initActivitys, initAttachments, initAttributeValues, initDependsRelatedByObservedId, initDependsRelatedByObserverId, initIssueTemplateInfos, initIssueVotes, isCacheOnSave, save, save, setActivitySetRelatedByCreatedTransId, setActivitySetRelatedByCreatedTransIdKey, setActivitySetRelatedByLastTransId, setActivitySetRelatedByLastTransIdKey, setCreatedTransId, setDeleted, setIdCount, setIdDomain, setIdPrefix, setIssueId, setIssueType, setIssueTypeKey, setLastTransId, setModuleId, setModuleKey, setMoved, setPrimaryKey, setPrimaryKey, setQueryKey, setTypeId
 
Methods inherited from class org.apache.torque.om.BaseObject
equals, equals, getLog, hashCode, isModified, isNew, resetModified, setModified, setNew, setPrimaryKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.torque.om.Persistent
getPrimaryKey, isModified, isNew, save, save, setModified, setNew, setPrimaryKey, setPrimaryKey
 

Field Detail

GET_ATTRIBUTE_VALUES_MAP

protected static final java.lang.String GET_ATTRIBUTE_VALUES_MAP
See Also:
Constant Field Values

GET_ASSOCIATED_USERS

protected static final java.lang.String GET_ASSOCIATED_USERS
See Also:
Constant Field Values

GET_MODULE_ATTRVALUES_MAP

protected static final java.lang.String GET_MODULE_ATTRVALUES_MAP
See Also:
Constant Field Values

GET_ATTRVALUE

protected static final java.lang.String GET_ATTRVALUE
See Also:
Constant Field Values

GET_ATTRVALUES

protected static final java.lang.String GET_ATTRVALUES
See Also:
Constant Field Values

GET_ALL_USERS_TO_EMAIL

protected static final java.lang.String GET_ALL_USERS_TO_EMAIL
See Also:
Constant Field Values

GET_USER_ATTRIBUTEVALUE

protected static final java.lang.String GET_USER_ATTRIBUTEVALUE
See Also:
Constant Field Values

GET_USER_ATTRIBUTEVALUES

protected static final java.lang.String GET_USER_ATTRIBUTEVALUES
See Also:
Constant Field Values

GET_CREATED_DATE

protected static final java.lang.String GET_CREATED_DATE
See Also:
Constant Field Values

GET_CREATED_BY

protected static final java.lang.String GET_CREATED_BY
See Also:
Constant Field Values

GET_LAST_TRANSACTION

protected static final java.lang.String GET_LAST_TRANSACTION
See Also:
Constant Field Values

GET_MODIFIED_BY

protected static final java.lang.String GET_MODIFIED_BY
See Also:
Constant Field Values

GET_MODIFIED_DATE

protected static final java.lang.String GET_MODIFIED_DATE
See Also:
Constant Field Values

GET_COMMENTS

protected static final java.lang.String GET_COMMENTS
See Also:
Constant Field Values

GET_URLS

protected static final java.lang.String GET_URLS
See Also:
Constant Field Values

GET_EXISTING_ATTACHMENTS

protected static final java.lang.String GET_EXISTING_ATTACHMENTS
See Also:
Constant Field Values

GET_ACTIVITY

protected static final java.lang.String GET_ACTIVITY
See Also:
Constant Field Values

GET_TRANSACTIONS

protected static final java.lang.String GET_TRANSACTIONS
See Also:
Constant Field Values

GET_CHILDREN

protected static final java.lang.String GET_CHILDREN
See Also:
Constant Field Values

GET_PARENTS

protected static final java.lang.String GET_PARENTS
See Also:
Constant Field Values

GET_ALL_DEPENDENCY_TYPES

protected static final java.lang.String GET_ALL_DEPENDENCY_TYPES
See Also:
Constant Field Values

GET_DEPENDENCY

protected static final java.lang.String GET_DEPENDENCY
See Also:
Constant Field Values

GET_TEMPLATE_TYPES

protected static final java.lang.String GET_TEMPLATE_TYPES
See Also:
Constant Field Values

GET_TEMPLATEINFO

protected static final java.lang.String GET_TEMPLATEINFO
See Also:
Constant Field Values

GET_CLOSED_DATE

protected static final java.lang.String GET_CLOSED_DATE
See Also:
Constant Field Values

GET_ORPHAN_ATTRIBUTEVALUES_LIST

protected static final java.lang.String GET_ORPHAN_ATTRIBUTEVALUES_LIST
See Also:
Constant Field Values

GET_DEFAULT_TEXT_ATTRIBUTEVALUE

protected static final java.lang.String GET_DEFAULT_TEXT_ATTRIBUTEVALUE
See Also:
Constant Field Values

GET_DEFAULT_TEXT

protected static final java.lang.String GET_DEFAULT_TEXT
See Also:
Constant Field Values

GET_NULL_END_DATE

protected static final java.lang.String GET_NULL_END_DATE
See Also:
Constant Field Values

GET_INITIAL_ACTIVITYSET

protected static final java.lang.String GET_INITIAL_ACTIVITYSET
See Also:
Constant Field Values

GET_HISTORY_LIMIT

protected static final java.lang.String GET_HISTORY_LIMIT
See Also:
Constant Field Values
Constructor Detail

Issue

protected Issue()
new issues are created only when the issuetype and module are known Or by the Peer when retrieving from db


Issue

protected Issue(Module module,
                IssueType issueType)
         throws org.apache.torque.TorqueException
Method Detail

getNewInstance

public static Issue getNewInstance(Module module,
                                   IssueType issueType)
                            throws org.apache.torque.TorqueException
Gets an issue associated to a Module

Throws:
org.apache.torque.TorqueException

getIssueById

public static Issue getIssueById(java.lang.String id)
Deprecated. use IssueManager.getIssueById


getIssueById

public static Issue getIssueById(Issue.FederatedId fid)
Deprecated. use IssueManager.getIssueById


getUniqueId

public java.lang.String getUniqueId()
                             throws org.apache.torque.TorqueException
Gets the UniqueId for this Issue.

Throws:
org.apache.torque.TorqueException

setUniqueId

public void setUniqueId(java.lang.String id)
NoOp for intake's benefit


getFederatedId

public java.lang.String getFederatedId()
                                throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

setFederatedId

public void setFederatedId(java.lang.String id)

parseIssueList

public static java.util.List parseIssueList(Module module,
                                            java.lang.String theList)
                                     throws org.apache.torque.TorqueException,
                                            com.workingdogs.village.DataSetException
Parameters:
module - The current module.
theList - A textual representation of the list of issues to parse.
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

isTemplate

public boolean isTemplate()
Whether this issue is an enter issue template.


addUrl

public ActivitySet addUrl(Attachment attachment,
                          ScarabUser user)
                   throws org.apache.torque.TorqueException,
                          ScarabException
Adds a url to an issue and passes null as the activity set to create a new one.

Throws:
org.apache.torque.TorqueException
ScarabException

addUrl

public ActivitySet addUrl(ActivitySet activitySet,
                          Attachment attachment,
                          ScarabUser user)
                   throws org.apache.torque.TorqueException,
                          ScarabException
Adds a url to an issue.

Throws:
org.apache.torque.TorqueException
ScarabException

addComment

public ActivitySet addComment(Attachment attachment,
                              ScarabUser user)
                       throws org.apache.torque.TorqueException,
                              ScarabException
Adds a comment to an issue and passes null as the activity set to create a new one.

Throws:
org.apache.torque.TorqueException
ScarabException

addComment

public ActivitySet addComment(ActivitySet activitySet,
                              Attachment attachment,
                              ScarabUser user)
                       throws org.apache.torque.TorqueException,
                              ScarabException
Adds a comment to an issue.

Throws:
org.apache.torque.TorqueException
ScarabException

addFile

public void addFile(Attachment attachment,
                    ScarabUser user)
             throws org.apache.torque.TorqueException
Adds an attachment file to this issue. Does not perform a save because the issue may not have been created yet. use the doSaveFileAttachment() to save the attachment after the issue has been created.

Throws:
org.apache.torque.TorqueException

getAttachments

public java.util.List getAttachments()
                              throws org.apache.torque.TorqueException
Overrides the super method in order to allow us to return the unSavedAttachments if they exist.

Overrides:
getAttachments in class BaseIssue
Returns:
the collection of associated objects
Throws:
org.apache.torque.TorqueException

doSaveFileAttachments

public ActivitySet doSaveFileAttachments(ScarabUser user)
                                  throws org.apache.torque.TorqueException,
                                         ScarabException
Adds an attachment file to this issue. Does not perform a save because the issue may not have been created yet. use the doSaveFileAttachment() to save the attachment after the issue has been created.

Throws:
org.apache.torque.TorqueException
ScarabException

doSaveFileAttachments

public ActivitySet doSaveFileAttachments(ActivitySet activitySet,
                                         ScarabUser user)
                                  throws org.apache.torque.TorqueException,
                                         ScarabException
Adds an attachment file to this issue. Does not perform a save because the issue may not have been created yet. use the doSaveFileAttachment() to save the attachment after the issue has been created.

Throws:
org.apache.torque.TorqueException
ScarabException

removeFile

public void removeFile(java.lang.String index)
                throws org.apache.torque.TorqueException
Remove an attachment file

Parameters:
index - starts with 1 because velocityCount start from 1 but ArrayList starts from 0
Throws:
org.apache.torque.TorqueException

getScarabModule

public ScarabModule getScarabModule()
Throws UnsupportedOperationException. Use getModule() instead.

Returns:
a ScarabModule value

setScarabModule

public void setScarabModule(ScarabModule module)
Throws UnsupportedOperationException. Use setModule(Module) instead.


setModule

public void setModule(Module me)
               throws org.apache.torque.TorqueException
Use this instead of setScarabModule. Note: module cannot be new.

Overrides:
setModule in class BaseIssue
Parameters:
me - Module
Throws:
org.apache.torque.TorqueException

getModule

public Module getModule()
                 throws org.apache.torque.TorqueException
Module getter. Use this method instead of getScarabModule().

Overrides:
getModule in class BaseIssue
Returns:
a Module value
Throws:
org.apache.torque.TorqueException

getRModuleIssueType

public RModuleIssueType getRModuleIssueType()
                                     throws org.apache.torque.TorqueException
The RModuleIssueType related to this issue's module and issue type.

Returns:
a RModuleIssueType if this issue's module and issue type are not null, otherwise return null.
Throws:
org.apache.torque.TorqueException

getModuleAttributeValuesMap

public org.apache.commons.collections.map.LinkedMap getModuleAttributeValuesMap()
                                                                         throws org.apache.torque.TorqueException
Calls the overloaded version by passing 'true' so that only active attributes will be considered.

Throws:
org.apache.torque.TorqueException
See Also:
getModuleAttributeValuesMap(boolean)

getModuleAttributeValuesMap

public org.apache.commons.collections.map.LinkedMap getModuleAttributeValuesMap(boolean isActive)
                                                                         throws org.apache.torque.TorqueException
AttributeValues that are relevant to the issue's current module. Empty AttributeValues that are relevant for the module, but have not been set for the issue are included. The values are ordered according to the module's preference

Parameters:
isActive - TRUE if only active attributes need to be considered and FALSE if both active and inactive attributes need to be considered
Throws:
org.apache.torque.TorqueException

addAttributeValue

public void addAttributeValue(AttributeValue aval)
                       throws org.apache.torque.TorqueException
Description copied from class: BaseIssue
Method called to associate a AttributeValue object to this object through the AttributeValue foreign key attribute

Overrides:
addAttributeValue in class BaseIssue
Parameters:
aval - AttributeValue
Throws:
org.apache.torque.TorqueException

getAttributeValue

public AttributeValue getAttributeValue(java.lang.String attributeName)
                                 throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getAttributeValue

public AttributeValue getAttributeValue(int id)
                                 throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getAttributeValue

public AttributeValue getAttributeValue(Attribute attribute)
                                 throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getAttributeValues

public java.util.List getAttributeValues(Attribute attribute)
                                  throws org.apache.torque.TorqueException
Returns the (undeleted) AttributeValues for the Attribute.

Throws:
org.apache.torque.TorqueException

isAttributeValue

public boolean isAttributeValue(AttributeValue attVal)
                         throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getAttributeValuesMap

public java.util.Map getAttributeValuesMap()
                                    throws org.apache.torque.TorqueException
AttributeValues that are set for this Issue

Throws:
org.apache.torque.TorqueException

getAllAttributeValuesMap

public java.util.Map getAllAttributeValuesMap()
                                       throws org.apache.torque.TorqueException
AttributeValues that are set for this issue and Empty AttributeValues that are relevant for the module, but have not been set for the issue are included.

Throws:
org.apache.torque.TorqueException

containsMinimumAttributeValues

public boolean containsMinimumAttributeValues()
                                       throws org.apache.torque.TorqueException
Describe containsMinimumAttributeValues method here.

Returns:
a boolean value
Throws:
java.lang.Exception - if an error occurs
org.apache.torque.TorqueException

getEligibleUsers

public java.util.List getEligibleUsers(Attribute attribute)
                                throws org.apache.torque.TorqueException,
                                       ScarabException
Users who are valid values to the attribute this issue. if a user has already been assigned to this issue, they will not show up in this list. use module.getEligibleUsers(Attribute) to get a complete list.

Returns:
a List value
Throws:
org.apache.torque.TorqueException
ScarabException

getUsersToEmail

protected java.util.Set getUsersToEmail(java.lang.String action,
                                        Issue issue,
                                        java.util.Set users)
                                 throws org.apache.torque.TorqueException
Returns the users which should be notified when this issue is modified. The set contains those users associated with user attributes for this issue, plus the creator of the issue.

Parameters:
action -
issue - Usually a reference to this or a dependent issue.
users - The list of users to append to, or null to create a new list.
Throws:
org.apache.torque.TorqueException

getAllUsersToEmail

public java.util.Set getAllUsersToEmail(java.lang.String action)
                                 throws org.apache.torque.TorqueException
Returns users assigned to user attributes that get emailed When issue is modified. Plus creating user. Adds users to email for dependant issues as well.

Throws:
org.apache.torque.TorqueException
See Also:
getUsersToEmail(java.lang.String, org.tigris.scarab.om.Issue, java.util.Set)

getUserAttributeValue

public AttributeValue getUserAttributeValue(ScarabUser user,
                                            Attribute attribute)
                                     throws org.apache.torque.TorqueException
Returns the specific user's attribute value.

Throws:
org.apache.torque.TorqueException

getUserAttributeValues

public java.util.List getUserAttributeValues()
                                      throws org.apache.torque.TorqueException
Returns attribute values for user attributes.

Throws:
org.apache.torque.TorqueException

getInitialActivitySet

public ActivitySet getInitialActivitySet()
                                  throws org.apache.torque.TorqueException
The initial activity set from issue creation.

Returns:
a ActivitySet value
Throws:
java.lang.Exception - if an error occurs
org.apache.torque.TorqueException

getCreatedDate

public java.util.Date getCreatedDate()
                              throws org.apache.torque.TorqueException
The date the issue was created.

Returns:
a Date value
Throws:
org.apache.torque.TorqueException - if an error occurs

getCreatedBy

public ScarabUser getCreatedBy()
                        throws org.apache.torque.TorqueException
The user that created the issue.

Returns:
a ScarabUser value
Throws:
org.apache.torque.TorqueException

isCreatingUser

public boolean isCreatingUser(ScarabUser user)
                       throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getLastActivitySet

public ActivitySet getLastActivitySet()
                               throws org.apache.torque.TorqueException
The last modification made to the issue.

Returns:
a ScarabUser value
Throws:
org.apache.torque.TorqueException

getModifiedDate

public java.util.Date getModifiedDate()
                               throws org.apache.torque.TorqueException
The date issue was last modified.

Returns:
a ScarabUser value
Throws:
org.apache.torque.TorqueException

getModifiedBy

public ScarabUser getModifiedBy()
                         throws org.apache.torque.TorqueException
The last user to modify the issue.

Returns:
a ScarabUser value
Throws:
org.apache.torque.TorqueException

getCommentsCount

public int getCommentsCount()
                     throws org.apache.torque.TorqueException
Returns the total number of comments.

Throws:
org.apache.torque.TorqueException

isCommentsLong

public boolean isCommentsLong()
                       throws org.apache.torque.TorqueException
Determines whether the comments list is longer than The default limit.

Throws:
org.apache.torque.TorqueException

getCommentsLimit

public int getCommentsLimit()
                     throws org.apache.torque.TorqueException
Gets default comments limit for this module-issue type.

Throws:
org.apache.torque.TorqueException

getComments

public java.util.List getComments(boolean full)
                           throws org.apache.torque.TorqueException
Returns a list of Attachment objects with type "Comment" That are associated with this issue.

Throws:
org.apache.torque.TorqueException

getUrls

public java.util.List getUrls()
                       throws org.apache.torque.TorqueException
Returns a list of Attachment objects with type "URL" That are associated with this issue.

Throws:
org.apache.torque.TorqueException

getExistingAttachments

public java.util.List getExistingAttachments()
                                      throws org.apache.torque.TorqueException
Get attachments that are not deleted

Throws:
org.apache.torque.TorqueException

getActivitiesWithNullEndDate

public java.util.List getActivitiesWithNullEndDate(Attribute attribute)
                                            throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getHistoryLimit

public int getHistoryLimit()
                    throws org.apache.torque.TorqueException
Gets default history limit for this module-issue type. The default is 5.

Throws:
org.apache.torque.TorqueException

isHistoryLong

public boolean isHistoryLong()
                      throws org.apache.torque.TorqueException
Determines whether the history list is longer than The default limit.

Throws:
org.apache.torque.TorqueException

isHistoryLong

public boolean isHistoryLong(int limit)
                      throws org.apache.torque.TorqueException
Determines whether the history list is longer than The limit.

Throws:
org.apache.torque.TorqueException

getActivity

public java.util.List getActivity()
                           throws org.apache.torque.TorqueException
Returns list of Activity objects associated with this Issue.

Throws:
org.apache.torque.TorqueException

getActivity

public java.util.List getActivity(int limit)
                           throws org.apache.torque.TorqueException
Returns limited list of Activity objects associated with this Issue.

Throws:
org.apache.torque.TorqueException

getActivity

public java.util.List getActivity(boolean fullHistory)
                           throws org.apache.torque.TorqueException
Returns limited list of Activity objects associated with this Issue. If fullHistory is false, it limits it, (this is the default)

Throws:
org.apache.torque.TorqueException

addActivity

public void addActivity(Activity activity)
                 throws org.apache.torque.TorqueException
Returns limited list of Activity objects associated with this Issue.

Overrides:
addActivity in class BaseIssue
Parameters:
activity - Activity
Throws:
org.apache.torque.TorqueException

getActivitySets

public java.util.List getActivitySets()
                               throws org.apache.torque.TorqueException
Returns a list of ActivitySet objects associated to this issue.

Throws:
org.apache.torque.TorqueException

getActivitySet

public ActivitySet getActivitySet(ScarabUser user,
                                  Attachment attachment,
                                  java.lang.Integer type)
                           throws org.apache.torque.TorqueException,
                                  ScarabException
Creates a new ActivitySet object for the issue.

Throws:
org.apache.torque.TorqueException
ScarabException

getActivitySet

public ActivitySet getActivitySet(ScarabUser user,
                                  java.lang.Integer type)
                           throws org.apache.torque.TorqueException,
                                  ScarabException
Creates a new ActivitySet object for the issue.

Throws:
org.apache.torque.TorqueException
ScarabException

getAllDependencies

public java.util.List getAllDependencies()
                                  throws org.apache.torque.TorqueException
Returns the combined output from getChildren() and getParents()

Throws:
org.apache.torque.TorqueException

getChildren

public java.util.List getChildren()
                           throws org.apache.torque.TorqueException
Returns list of child dependencies i.e., related to this issue through the DEPEND table.

Throws:
org.apache.torque.TorqueException

getChildren

public java.util.List getChildren(boolean hideDeleted)
                           throws org.apache.torque.TorqueException
Returns list of child dependencies i.e., related to this issue through the DEPEND table.

Throws:
org.apache.torque.TorqueException

getParents

public java.util.List getParents()
                          throws org.apache.torque.TorqueException
Returns list of parent dependencies i.e., related to this issue through the DEPEND table.

Throws:
org.apache.torque.TorqueException

getParents

public java.util.List getParents(boolean hideDeleted)
                          throws org.apache.torque.TorqueException
Returns list of parent dependencies i.e., related to this issue through the DEPEND table.

Throws:
org.apache.torque.TorqueException

getAllDependencyTypes

public java.util.List getAllDependencyTypes()
                                     throws org.apache.torque.TorqueException
Deprecated. use DependencyTypeManager.getAll();

Returns list of all types of dependencies an issue can have On another issue.

Throws:
org.apache.torque.TorqueException

doAddDependency

public ActivitySet doAddDependency(ActivitySet activitySet,
                                   Depend depend,
                                   Issue childIssue,
                                   ScarabUser user)
                            throws org.apache.torque.TorqueException,
                                   ScarabException
Throws:
org.apache.torque.TorqueException
ScarabException

getDependency

public Depend getDependency(Issue potentialDependency)
                     throws org.apache.torque.TorqueException
Checks to see if this issue has a dependency on the passed in issue. or if the passed in issue has a dependency on this issue.

Throws:
org.apache.torque.TorqueException

getDependency

public Depend getDependency(Issue potentialDependency,
                            boolean hideDeleted)
                     throws org.apache.torque.TorqueException
Checks to see if this issue has a dependency on the passed in issue. or if the passed in issue has a dependency on this issue.

Parameters:
potentialDependency - the issue for which we are determining if there is a parent or child dependency to this issue
hideDeleted - true if deleted issues are omitted from the search
Throws:
org.apache.torque.TorqueException

save

public void save(java.sql.Connection dbCon)
          throws org.apache.torque.TorqueException
Removes any unset attributes and sets the issue # prior to saving for the first time. Calls super.save() If the issue does not have an idCount then the next available ID is allocated. If the issue has a non-zero idCount, this value is honoured. WARNING: do not set the idCount to an existing ID! The nominated value is ignored if it is not at least as high as the next available ID.

Specified by:
save in interface org.apache.torque.om.Persistent
Overrides:
save in class BaseIssue
Parameters:
dbCon - a DBConnection value
Throws:
org.apache.torque.TorqueException - if an error occurs

getTemplateInfo

public IssueTemplateInfo getTemplateInfo()
                                  throws org.apache.torque.TorqueException
Get IssueTemplateInfo by Issue Id.

Throws:
org.apache.torque.TorqueException

getUnsetRequiredAttrs

public java.util.List getUnsetRequiredAttrs(Module newModule,
                                            IssueType newIssueType)
                                     throws org.apache.torque.TorqueException
Get Unset required attributes in destination module / issue type.

Throws:
org.apache.torque.TorqueException

move

public Issue move(Module newModule,
                  IssueType newIssueType,
                  java.lang.String action,
                  ScarabUser user,
                  java.lang.String reason,
                  java.util.List commentAttrs,
                  java.util.List commentUserValues)
           throws org.apache.torque.TorqueException,
                  ScarabException
Move or copy issue to destination module.

Throws:
org.apache.torque.TorqueException
ScarabException

addVote

public void addVote(ScarabUser user)
             throws ScarabException,
                    java.lang.Exception
Throws:
ScarabException
java.lang.Exception

getMatchingAttributeValuesList

public java.util.List getMatchingAttributeValuesList(Module newModule,
                                                     IssueType newIssueType)
                                              throws org.apache.torque.TorqueException
Gets a list of non-user AttributeValues which match a given Module. It is used in the MoveIssue2.vm template

Throws:
org.apache.torque.TorqueException

getMatchingAttributeValuesList

public java.util.List getMatchingAttributeValuesList(java.lang.String moduleId,
                                                     java.lang.String issueTypeId)
                                              throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getNonMatchingAttributeValuesList

public java.util.List getNonMatchingAttributeValuesList(Module newModule,
                                                        IssueType newIssueType)
                                                 throws org.apache.torque.TorqueException
Gets a list AttributeValues which the source module has, But the destination module does not have, when doing a copy. It is used in the MoveIssue2.vm template

Throws:
org.apache.torque.TorqueException

getNonMatchingAttributeValuesList

public java.util.List getNonMatchingAttributeValuesList(java.lang.String moduleId,
                                                        java.lang.String issueTypeId)
                                                 throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

deleteItem

public void deleteItem(ScarabUser user)
                throws org.apache.torque.TorqueException,
                       ScarabException
Checks if user has permission to delete issue template. Only the creating user can delete a personal template. Only project owner or admin can delete a project-wide template.

Throws:
org.apache.torque.TorqueException
ScarabException

deleteIssue

public void deleteIssue(ScarabUser user)
                 throws java.lang.Exception,
                        ScarabException
If the user has permission to delete ISSUES in this module, it wil mark this issue as DELETED.

Parameters:
user -
Throws:
java.lang.Exception
ScarabException

getDefaultTextAttributeValue

public AttributeValue getDefaultTextAttributeValue()
                                            throws org.apache.torque.TorqueException
This method will return the AttributeValue which represents the default text attribute.

Returns:
the AttributeValue to use as the email subject, or null if no suitable AttributeValue could be found.
Throws:
org.apache.torque.TorqueException

getDefaultText

public java.lang.String getDefaultText()
                                throws org.apache.torque.TorqueException
This calls getDefaultTextAttributeValue() and then returns the String value of the Attribute. This method is used to get the subject of an email. if no text attribute value is found it will use the first ActivitySet comment.

Throws:
org.apache.torque.TorqueException

hasEnterPermission

public boolean hasEnterPermission(ScarabUser user,
                                  Module module)
                           throws org.apache.torque.TorqueException
Deprecated. user.hasPermission(ScarabSecurity.ISSUE__ENTER, module)

Checks if user has permission to enter issue.

Throws:
org.apache.torque.TorqueException

hasEditPermission

public boolean hasEditPermission(ScarabUser user,
                                 Module module)
                          throws org.apache.torque.TorqueException
Deprecated. user.hasPermission(ScarabSecurity.ISSUE__EDIT, module)

Checks if user has permission to edit issue.

Throws:
org.apache.torque.TorqueException

hasMovePermission

public boolean hasMovePermission(ScarabUser user,
                                 Module module)
                          throws org.apache.torque.TorqueException
Deprecated. user.hasPermission(ScarabSecurity.ISSUE__EDIT, module)

Checks if user has permission to move issue to destination module.

Throws:
org.apache.torque.TorqueException

assignUser

public ActivitySet assignUser(ActivitySet activitySet,
                              ScarabUser assignee,
                              ScarabUser assigner,
                              Attribute attribute,
                              Attachment attachment)
                       throws org.apache.torque.TorqueException,
                              ScarabException
Assigns user to issue.

Throws:
org.apache.torque.TorqueException
ScarabException

changeUserAttributeValue

public ActivitySet changeUserAttributeValue(ActivitySet activitySet,
                                            ScarabUser assignee,
                                            ScarabUser assigner,
                                            AttributeValue oldAttVal,
                                            Attribute newAttr,
                                            Attachment attachment)
                                     throws org.apache.torque.TorqueException,
                                            ScarabException
Used to change a user attribute value from one user attribute to a new one.

Throws:
org.apache.torque.TorqueException
ScarabException

deleteUser

public ActivitySet deleteUser(ActivitySet activitySet,
                              ScarabUser assignee,
                              ScarabUser assigner,
                              AttributeValue attVal,
                              Attachment attachment)
                       throws org.apache.torque.TorqueException,
                              ScarabException
Used to delete a user attribute value.

Throws:
org.apache.torque.TorqueException
ScarabException

doDeleteDependency

public ActivitySet doDeleteDependency(ActivitySet activitySet,
                                      Depend oldDepend,
                                      ScarabUser user)
                               throws org.apache.torque.TorqueException,
                                      ScarabException
Deletes a specific dependency on this issue.

Throws:
org.apache.torque.TorqueException
ScarabException

doChangeUrlDescription

public ActivitySet doChangeUrlDescription(ActivitySet activitySet,
                                          ScarabUser user,
                                          Attachment attachment,
                                          java.lang.String oldDescription)
                                   throws org.apache.torque.TorqueException,
                                          ScarabException
Given a specific attachment object allow us to update the information in it. If the old matches the new, then nothing is modified.

Throws:
org.apache.torque.TorqueException
ScarabException

doChangeUrlUrl

public ActivitySet doChangeUrlUrl(ActivitySet activitySet,
                                  ScarabUser user,
                                  Attachment attachment,
                                  java.lang.String oldUrl)
                           throws org.apache.torque.TorqueException,
                                  ScarabException
Given a specific attachment object allow us to update the information in it. If the old matches the new, then nothing is modified.

Throws:
org.apache.torque.TorqueException
ScarabException

doChangeDependencyType

public ActivitySet doChangeDependencyType(ActivitySet activitySet,
                                          Depend oldDepend,
                                          Depend newDepend,
                                          ScarabUser user)
                                   throws org.apache.torque.TorqueException,
                                          ScarabException
changes the dependency type as well as. will not change deptype for deleted deps

Throws:
org.apache.torque.TorqueException
ScarabException

setInitialAttributeValues

public ActivitySet setInitialAttributeValues(ActivitySet activitySet,
                                             Attachment attachment,
                                             java.util.HashMap newValues,
                                             ScarabUser user)
                                      throws org.apache.torque.TorqueException,
                                             ScarabException
Sets original AttributeValues for an new issue based on a hashmap of values This is data is saved to the database and the proper ActivitySet is also recorded.

Throws:
org.apache.torque.TorqueException - when the workflow has an error to report
ScarabException

setAttributeValues

public ActivitySet setAttributeValues(ActivitySet activitySet,
                                      java.util.HashMap newAttVals,
                                      Attachment attachment,
                                      ScarabUser user)
                               throws org.apache.torque.TorqueException,
                                      ScarabException
Sets AttributeValues for an issue based on a hashmap of attribute values This is data is saved to the database and the proper ActivitySet is also recorded.

Parameters:
activitySet - ActivitySet instance
newAttVals - A map of attribute Id's vs new AttributeValues
attachment - Attachment to the issue
user - User responsible for this activity
Returns:
ActivitySet object containing the changes made to the issue
Throws:
org.apache.torque.TorqueException - when the workflow has an error to report
ScarabException

attachActivitySet

protected ActivitySet attachActivitySet(ActivitySet activitySet,
                                        ScarabUser user,
                                        Attachment attachment,
                                        java.lang.Integer activitySetType)
                                 throws org.apache.torque.TorqueException,
                                        ScarabException
Sets an ActivitySet as the lastActivitySet of an Issue. Crates and saves a new ActivitySet, if required. Saves the Issue.

Returns:
ActivitySet
Throws:
org.apache.torque.TorqueException
ScarabException

attachActivitySet

protected ActivitySet attachActivitySet(ActivitySet activitySet,
                                        ScarabUser user,
                                        Attachment attachment)
                                 throws org.apache.torque.TorqueException,
                                        ScarabException
Throws:
org.apache.torque.TorqueException
ScarabException

attachActivitySet

protected ActivitySet attachActivitySet(ActivitySet activitySet,
                                        ScarabUser user)
                                 throws org.apache.torque.TorqueException,
                                        ScarabException
Throws:
org.apache.torque.TorqueException
ScarabException

doCheckInitialAttributeValueWorkflow

public java.lang.String doCheckInitialAttributeValueWorkflow(java.util.HashMap newValues,
                                                             ScarabUser user)
                                                      throws org.apache.torque.TorqueException,
                                                             ScarabException
This method is used with the setInitialAttributeValues() method to Make sure that workflow is valid for the initial values of a new issue. It will return a non-null String which is the workflow error message otherwise it will return null.

Throws:
org.apache.torque.TorqueException
ScarabException

doCheckAttributeValueWorkflow

public java.lang.String doCheckAttributeValueWorkflow(java.util.HashMap newAttVals,
                                                      ScarabUser user)
                                               throws org.apache.torque.TorqueException,
                                                      ScarabException
This method is used with the setAttributeValues() method to Make sure that workflow is valid. It will return a non-null String which is the workflow error message otherwise it will return null.

Throws:
org.apache.torque.TorqueException
ScarabException

doCheckAttributeValueWorkflow

public java.lang.String doCheckAttributeValueWorkflow(java.util.HashMap newAttVals,
                                                      Attachment attachment,
                                                      ScarabUser user)
                                               throws org.apache.torque.TorqueException,
                                                      ScarabException
Deprecated. The attachment doesn't need to be passed into this method.

This method is used with the setAttributeValues() method to Make sure that workflow is valid. It will return a non-null String which is the workflow error message otherwise it will return null.

Throws:
org.apache.torque.TorqueException
ScarabException

doEditComment

public ActivitySet doEditComment(ActivitySet activitySet,
                                 java.lang.String newComment,
                                 Attachment attachment,
                                 ScarabUser user)
                          throws org.apache.torque.TorqueException,
                                 ScarabException
If the comment hasn't changed, it will return a valid ActivitySet otherwise it returns null.

Throws:
org.apache.torque.TorqueException
ScarabException

doDeleteUrl

public ActivitySet doDeleteUrl(ActivitySet activitySet,
                               Attachment attachment,
                               ScarabUser user)
                        throws org.apache.torque.TorqueException,
                               ScarabException
If the URL hasn't changed, it will return a valid ActivitySet otherwise it returns null.

Throws:
org.apache.torque.TorqueException
ScarabException

doRemoveAttachment

public ActivitySet doRemoveAttachment(ActivitySet activitySet,
                                      MutableBoolean physicallyDeleted,
                                      Attachment attachment,
                                      ScarabUser user)
                               throws org.apache.torque.TorqueException,
                                      ScarabException
Remove the attachment. On return the MutableBoolean physicallyDeleted is set to true, if the attachment file also was removed by this operation. If the attached File still exists for any reason, physicallyDeleted will be set to false. Note: You can enable/disable physical deletion by setting the environment property scarab.attachment.remove.permanent to true/false (false is the default setting).

Throws:
org.apache.torque.TorqueException
ScarabException

getAssociatedUsers

public java.util.HashSet getAssociatedUsers()
                                     throws org.apache.torque.TorqueException
Returns users assigned to all user attributes.

Throws:
org.apache.torque.TorqueException

toString

public java.lang.String toString()
Overrides:
toString in class BaseIssue

isBlockingConditionTrue

public boolean isBlockingConditionTrue()
                                throws org.apache.torque.TorqueException
Returns if the issue's BlockingCondition is fulfilled.

Returns:
Throws:
org.apache.torque.TorqueException

isBlockingAnyIssue

public boolean isBlockingAnyIssue()
                           throws org.apache.torque.TorqueException
Returns if this issue is currently blocking any other.

Returns:
Throws:
org.apache.torque.TorqueException

isBlocked

public boolean isBlocked()
                  throws org.apache.torque.TorqueException
An issue is blocked when it depends, via a is_blocked_by dependency, of an issue that is currently "blocking". Whenever an issue is blocked, some transitions might not be availaible.

Returns:
Throws:
org.apache.torque.TorqueException

isBlockedBy

public boolean isBlockedBy(java.lang.String blockingId)
                    throws org.apache.torque.TorqueException
An issue is blocked when it depends, via a is_blocked_by dependency, of an issue that is currently "blocking". Whenever an issue is blocked, some transitions might not be availaible.

Returns:
Throws:
org.apache.torque.TorqueException

isBlocking

public boolean isBlocking(java.lang.String blockedId)
                   throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getBlockingIssues

public java.util.List getBlockingIssues()
                                 throws org.apache.torque.TorqueException
Returns a list of issues that actually "block" this issue, i.e., that are related via a "is blocked by" dependency, and are "blocking".

Returns:
Throws:
org.apache.torque.TorqueException

getPrerequisiteIssues

public java.util.List getPrerequisiteIssues()
                                     throws org.apache.torque.TorqueException
Returns a list of issues that are blockable by this issue, via a "is_blocked_by" relationship.

Returns:
Throws:
org.apache.torque.TorqueException

getRelatedIssues

public java.util.List getRelatedIssues()
                                throws org.apache.torque.TorqueException
Returns a list of issues that are related to this issue, via a "is_related to" relationship.

Returns:
Throws:
org.apache.torque.TorqueException

getDuplicateIssues

public java.util.List getDuplicateIssues()
                                  throws org.apache.torque.TorqueException
Returns a list of issues that are related to this issue, via a "is_duplicate of" relationship.

Returns:
Throws:
org.apache.torque.TorqueException

getBlockedIssues

public java.util.List getBlockedIssues()
                                throws org.apache.torque.TorqueException
Returns a list of issues currently BLOCKED by this issue

Returns:
Throws:
org.apache.torque.TorqueException

getDependantIssues

public java.util.List getDependantIssues()
                                  throws org.apache.torque.TorqueException
Returns a list of issues that might be blocked by this issue because if its "is_blocked_by" dependency.

Returns:
Throws:
org.apache.torque.TorqueException

getIssueNewId

public java.lang.String getIssueNewId()
                               throws org.apache.torque.TorqueException
This method search for the new ID of a moved issue.

Returns:
Throws:
org.apache.torque.TorqueException


Copyright © 2000-2004 Tigris.org. All Rights Reserved.