com.atlassian.jira.web.action.project
Class EditVersion

java.lang.Object
  extended byActionSupport
      extended bycom.atlassian.jira.action.JiraActionSupport
          extended bycom.atlassian.jira.web.action.JiraWebActionSupport
              extended bycom.atlassian.jira.web.action.ProjectActionSupport
                  extended bycom.atlassian.jira.web.action.project.AbstractProjectAction
                      extended bycom.atlassian.jira.web.action.project.ViewProject
                          extended bycom.atlassian.jira.web.action.project.EditProjectEntity
                              extended bycom.atlassian.jira.web.action.project.EditVersion

public class EditVersion
extends EditProjectEntity

This class is used to edit the name of a Project Version.

See Also:
Serialized Form

Field Summary
protected  GenericValue editedEntity
           
protected  GenericValue existingEntity
           
 
Fields inherited from class com.atlassian.jira.web.action.ProjectActionSupport
savedFilters
 
Fields inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
ISSUE_NOT_FOUND_RESULT, PERMISSION_VIOLATION_RESULT, permissionManager, request
 
Fields inherited from class com.atlassian.jira.action.JiraActionSupport
log
 
Constructor Summary
EditVersion()
           
 
Method Summary
 java.lang.String getEditAction()
           
 GenericValue getEditedEntity()
          Returns a Version with the new Version name so that the new name can be retrieved in the case of an error or validation.
 GenericValue getExistingEntity()
          Returns the existing Version
 java.lang.String getNiceName()
          Return the human readable name of this component.
protected  boolean isDuplicateName()
          Checks if a version in the current project already exists with the same name
 void setEditedEntity(GenericValue editedEntity)
           
 
Methods inherited from class com.atlassian.jira.web.action.project.EditProjectEntity
doExecute, doValidation, getBackendVariablesMap, getId, getName, setId, setName
 
Methods inherited from class com.atlassian.jira.web.action.project.ViewProject
doDefault, getFieldLayoutSchemes, getIssueSecuritySchemes, getPermissionSchemes, getPid, getProject, getProjectCategory, getProjectEmail, getRepositories, getSchemes, getStringSet, hasAdminPermission, hasProjectAdminPermission, isEnterprise, isHasDefaultSMTPMailServer, isVersionArchived, setPid
 
Methods inherited from class com.atlassian.jira.web.action.project.AbstractProjectAction
getAssigneeType, getAssigneeTypes, getDescription, getIssueSecurityScheme, getKey, getLead, getNotificationScheme, getPermissionScheme, getPrettyAssigneeType, getUrl, setAssigneeType, setDescription, setIssueSecurityScheme, setKey, setLead, setNotificationScheme, setPermissionScheme, setUrl
 
Methods inherited from class com.atlassian.jira.web.action.ProjectActionSupport
getBrowseableProjects, getBrowseableProjectsInCategory, getSavedFilters
 
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
getAssignableUsers, getAssignableUsers, getCachedGroups, getComponentManager, getConstantsManager, getDefaultAssignee, getField, getLocale, getOutlookDate, getProjectManager, getPropertySet, getRedirect, getRemoteUser, getText, getText, getText, getText, getUserFullName, getUserPreferences, isDefaultAssignee, isDefaultAssignee, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, isHasProjectPermission, processDefaultAssignee, processDefaultAssignee
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrors, execute, getActionName, getApplicationProperties, getDelegator, getLocaleUtils, getResult, isIndexing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

existingEntity

protected GenericValue existingEntity

editedEntity

protected GenericValue editedEntity
Constructor Detail

EditVersion

public EditVersion()
Method Detail

getEditedEntity

public GenericValue getEditedEntity()
Returns a Version with the new Version name so that the new name can be retrieved in the case of an error or validation. If the name hasn't been set yet then the existing version will be returned

Specified by:
getEditedEntity in class EditProjectEntity
Returns:
Version

setEditedEntity

public void setEditedEntity(GenericValue editedEntity)

getEditAction

public java.lang.String getEditAction()
Specified by:
getEditAction in class EditProjectEntity
Returns:
The class name of the Action to be called for editing the version

getNiceName

public java.lang.String getNiceName()
Description copied from class: EditProjectEntity
Return the human readable name of this component.

Specified by:
getNiceName in class EditProjectEntity

getExistingEntity

public GenericValue getExistingEntity()
                               throws java.lang.Exception
Returns the existing Version

Specified by:
getExistingEntity in class EditProjectEntity
Returns:
Version
Throws:
java.lang.Exception

isDuplicateName

protected boolean isDuplicateName()
                           throws java.lang.Exception
Checks if a version in the current project already exists with the same name

Specified by:
isDuplicateName in class EditProjectEntity
Returns:
True if a version with the same name already exists otherwise false
Throws:
java.lang.Exception