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

java.lang.Object
  extended by webwork.action.ActionSupport
      extended by com.atlassian.jira.action.JiraActionSupport
          extended by com.atlassian.jira.web.action.JiraWebActionSupport
              extended by com.atlassian.jira.web.action.ProjectActionSupport
                  extended by com.atlassian.jira.web.action.project.AbstractProjectAction
                      extended by com.atlassian.jira.web.action.project.ViewProject
                          extended by com.atlassian.jira.web.action.project.EditProjectEntity
                              extended by com.atlassian.jira.web.action.project.EditComponent
All Implemented Interfaces:
ErrorCollection, I18nHelper, Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware

public class EditComponent
extends EditProjectEntity

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

See Also:
Serialized Form

Field Summary
protected  org.ofbiz.core.entity.GenericValue editedEntity
           
protected  org.ofbiz.core.entity.GenericValue existingEntity
           
 
Fields inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
ISSUE_NOT_FOUND_RESULT, PERMISSION_VIOLATION_RESULT, request, savedFilters, selectedProject
 
Fields inherited from class com.atlassian.jira.action.JiraActionSupport
log
 
Fields inherited from class webwork.action.ActionSupport
command, errorMap, errorMessages
 
Fields inherited from interface com.atlassian.jira.util.I18nHelper
DEFAULT_RESOURCE_BUNDLE
 
Fields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
EditComponent(ProjectManager projectManager)
           
 
Method Summary
 String doDefault()
           
protected  void doValidation()
          Validates to ensure that a name field exists and that it is not a duplicate
protected  Map getBackendVariablesMap()
           
 String getComponentLead()
           
 String getEditAction()
           
 org.ofbiz.core.entity.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.
 org.ofbiz.core.entity.GenericValue getExistingEntity()
          Returns the existing Component
 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 setComponentLead(String componentLead)
           
 void setEditedEntity(org.ofbiz.core.entity.GenericValue editedEntity)
           
 
Methods inherited from class com.atlassian.jira.web.action.project.EditProjectEntity
doExecute, getDescription, getId, getName, setDescription, setId, setName
 
Methods inherited from class com.atlassian.jira.web.action.project.ViewProject
getFieldLayoutScheme, getFieldLayoutScheme, getFieldLayoutSchemes, getFieldScreenScheme, getIssueSecuritySchemes, getIssueTypeScheme, getIssueTypeScreenScheme, getPermissionSchemes, getPid, getProject, getProjectCategory, getProjectEmail, getProjectObject, getRepositories, getSchemes, getStandardIssueTypes, getStringSet, getSubTaskIssueTypes, getVersionsReversed, getViewableProjectOperations, getWorkflowScheme, hasAdminPermission, hasAssociateRolesPermission, hasProjectAdminPermission, isDefaultAssigneeAssignable, isHasDefaultSMTPMailServer, isSubTaskEnabled, isVersionArchived, isVersionReleased, setPid
 
Methods inherited from class com.atlassian.jira.web.action.project.AbstractProjectAction
getAssigneeType, getAssigneeTypes, getIssueSecurityScheme, getKey, getLead, getNotificationScheme, getPermissionScheme, getPrettyAssigneeType, getUrl, setAssigneeType, setIssueSecurityScheme, setKey, setLead, setNotificationScheme, setPermissionScheme, setUrl
 
Methods inherited from class com.atlassian.jira.web.action.ProjectActionSupport
getBrowseableProjects, getBrowseableProjectsInCategory, getSelectedProjectId, setSelectedProject, setSelectedProject
 
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
addErrorCollection, forceRedirect, getAssignableUsers, getAssignableUsers, getCachedGroups, getComponentManager, getConstantsManager, getDateFormat, getDateTimeFormat, getDescTranslation, getExternalLinkUtils, getField, getFlushedErrorMessages, getGlobalPermissionManager, getJiraServiceContext, getLanguage, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getPropertySet, getRedirect, getRemoteUser, getReturnUrl, getSearchSortReverseDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getText, getTimeFormat, getUserFullName, getVersionManager, getWebworkStack, getWebworkStack, htmlEncode, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, isHasProjectPermission, isSystemAdministrator, isUserExists, setReturnUrl, setSelectedProjectId
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getApplicationProperties, getDefaultResourceBundle, getDelegator, getJiraLocaleUtils, getLocale, getResult, getText, getText, getText, getText, getText, getText, getUnescapedText, getUserPreferences, getWatcherManager, hasAnyErrors, isEnterprise, isIndexing, isProfessional, isProfessionalOrEnterprise, isStandard, removeKeyOrAddError
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, getErrorMessages, getErrors, getHasErrorMessages, getHasErrors, getPropertyEditorMessage, getTexts, getTexts, getTimezone, invalidInput, invokeCommand, isCommand, setCommand, setErrorMessages, setErrors, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.util.ErrorCollection
addError, addErrorMessage, addErrorMessages, addErrors, getErrorMessages, getErrors, hasAnyErrors, setErrorMessages
 
Methods inherited from interface webwork.action.CommandDriven
setCommand
 

Field Detail

existingEntity

protected org.ofbiz.core.entity.GenericValue existingEntity

editedEntity

protected org.ofbiz.core.entity.GenericValue editedEntity
Constructor Detail

EditComponent

public EditComponent(ProjectManager projectManager)
Method Detail

doDefault

public String doDefault()
                 throws Exception
Overrides:
doDefault in class ViewProject
Throws:
Exception

doValidation

protected void doValidation()
Description copied from class: EditProjectEntity
Validates to ensure that a name field exists and that it is not a duplicate

Overrides:
doValidation in class EditProjectEntity

getBackendVariablesMap

protected Map getBackendVariablesMap()
                              throws Exception
Overrides:
getBackendVariablesMap in class EditProjectEntity
Throws:
Exception

getEditedEntity

public org.ofbiz.core.entity.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(org.ofbiz.core.entity.GenericValue editedEntity)

getEditAction

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

getNiceName

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

Specified by:
getNiceName in class EditProjectEntity

getExistingEntity

public org.ofbiz.core.entity.GenericValue getExistingEntity()
                                                     throws Exception
Returns the existing Component

Specified by:
getExistingEntity in class EditProjectEntity
Returns:
Component
Throws:
Exception

isDuplicateName

protected boolean isDuplicateName()
                           throws 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:
Exception

getComponentLead

public String getComponentLead()

setComponentLead

public void setComponentLead(String componentLead)


Copyright © 2002-2009 Atlassian. All Rights Reserved.