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

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.EditComponent

public class EditComponent
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
PERMISSION_VIOLATION_RESULT, request
 
Fields inherited from class com.atlassian.jira.action.JiraActionSupport
log
 
Constructor Summary
EditComponent()
           
 
Method Summary
 java.lang.String getEditAction()
           
 GenericValue getEditedEntity()
          Returns a Component with the new Component name so that the new name can be retrieved in the case of an error or validation.
 GenericValue getExistingEntity()
          Returns the existing Component
 java.lang.String getNiceName()
          Return the human readable name of this component.
protected  boolean isDuplicateName()
          Checks if a component in the current project already exists with the same name, apart from this component.
 void setEditedEntity(GenericValue editedEntity)
           
 
Methods inherited from class com.atlassian.jira.web.action.project.EditProjectEntity
doExecute, doValidation, getId, getName, setId, setName
 
Methods inherited from class com.atlassian.jira.web.action.project.ViewProject
doDefault, getIssueSecuritySchemes, getPermissionSchemes, getPid, getProject, getProjectCategory, getSchemes, getStringSet, hasAdminPermission, hasProjectAdminPermission, setPid
 
Methods inherited from class com.atlassian.jira.web.action.project.AbstractProjectAction
getDescription, getIssueSecurityScheme, getKey, getLead, getNotificationScheme, getPermissionScheme, getUrl, setDescription, setIssueSecurityScheme, setKey, setLead, setNotificationScheme, setPermissionScheme, setUrl
 
Methods inherited from class com.atlassian.jira.web.action.ProjectActionSupport
getBrowseableProjects, getProjectManager, getSavedFilters
 
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
getCachedGroups, getConstantsManager, getGlobalColumns, getPropertySet, getRedirect, getRemoteUser, getUserPreferences, isHasIssuePermission, isHasPermission, isHasPermission, isHasProjectPermission
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrors, execute, getActionName, getApplicationProperties, getDelegator, 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

EditComponent

public EditComponent()
Method Detail

getEditedEntity

public GenericValue getEditedEntity()
Returns a Component with the new Component 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 component will be returned

Specified by:
getEditedEntity in class EditProjectEntity
Returns:
Component

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 component

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 Component

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

isDuplicateName

protected boolean isDuplicateName()
                           throws java.lang.Exception
Checks if a component in the current project already exists with the same name, apart from this component.

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