com.atlassian.jira.web.action.issue
Class IssueCreationHelperBeanImpl

java.lang.Object
  extended by com.atlassian.jira.web.action.issue.IssueCreationHelperBeanImpl
All Implemented Interfaces:
IssueCreationHelperBean

public class IssueCreationHelperBeanImpl
extends Object
implements IssueCreationHelperBean


Constructor Summary
IssueCreationHelperBeanImpl(UserUtil userUtil, ApplicationProperties applicationProperties, FieldManager fieldManager, FieldScreenRendererFactory fieldScreenRendererFactory)
           
 
Method Summary
 FieldScreenRenderer createFieldScreenRenderer(User remoteUser, Issue issueObject)
          Create a field screen renderer
 Field getField(String id)
           
 void updateFieldValuesHolderWithDefaults(Issue issueObject, org.ofbiz.core.entity.GenericValue project, String issuetype, Map actionParams, Map fieldValuesHolder, User remoteUser, FieldScreenRenderer fieldScreenRenderer)
          Updates the given fieldValuesHolder with default values for fields which were not originally specified in the actionParams map.
 void updateIssueFromFieldValuesHolder(FieldScreenRenderer fieldScreenRenderer, User remoteUser, org.ofbiz.core.entity.GenericValue project, String issuetype, MutableIssue issueObject, Map customFieldValuesHolder)
           
 void validateCreateIssueFields(Issue issueObject, org.ofbiz.core.entity.GenericValue project, String issuetype, OperationContext operationContext, Map actionParams, User remoteUser, FieldScreenRenderer fieldScreenRenderer, ErrorCollection errors, I18nHelper i18n)
          Validates the issue fields in fieldValuesHolder.
 void validateIssueType(Issue issue, OperationContext operationContext, Map actionParams, ErrorCollection errors, I18nHelper i18n)
           
 void validateLicense(ErrorCollection errors, I18nHelper i18n)
           
 void validateProject(Issue issue, OperationContext operationContext, Map actionParams, ErrorCollection errors, I18nHelper i18n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IssueCreationHelperBeanImpl

public IssueCreationHelperBeanImpl(UserUtil userUtil,
                                   ApplicationProperties applicationProperties,
                                   FieldManager fieldManager,
                                   FieldScreenRendererFactory fieldScreenRendererFactory)
Method Detail

validateCreateIssueFields

public void validateCreateIssueFields(Issue issueObject,
                                      org.ofbiz.core.entity.GenericValue project,
                                      String issuetype,
                                      OperationContext operationContext,
                                      Map actionParams,
                                      User remoteUser,
                                      FieldScreenRenderer fieldScreenRenderer,
                                      ErrorCollection errors,
                                      I18nHelper i18n)
Validates the issue fields in fieldValuesHolder. Sets the project & issue type of the issue & update the fieldValuesHolder with default values of custom fields where appropriate.

Specified by:
validateCreateIssueFields in interface IssueCreationHelperBean
Parameters:
issueObject -
project -
issuetype -
operationContext -
actionParams -
remoteUser -
fieldScreenRenderer -
errors -
i18n -

updateFieldValuesHolderWithDefaults

public void updateFieldValuesHolderWithDefaults(Issue issueObject,
                                                org.ofbiz.core.entity.GenericValue project,
                                                String issuetype,
                                                Map actionParams,
                                                Map fieldValuesHolder,
                                                User remoteUser,
                                                FieldScreenRenderer fieldScreenRenderer)
Description copied from interface: IssueCreationHelperBean
Updates the given fieldValuesHolder with default values for fields which were not originally specified in the actionParams map.

Specified by:
updateFieldValuesHolderWithDefaults in interface IssueCreationHelperBean
Parameters:
issueObject - the issue
project - the project
issuetype - the issue type
actionParams - the action parameters map that came from either the RemoteIssue or the web action
fieldValuesHolder - the field values holder which holds all the processed values for the issue thus far
remoteUser - the remote user
fieldScreenRenderer - the field screen renderer

validateLicense

public void validateLicense(ErrorCollection errors,
                            I18nHelper i18n)
Specified by:
validateLicense in interface IssueCreationHelperBean

updateIssueFromFieldValuesHolder

public void updateIssueFromFieldValuesHolder(FieldScreenRenderer fieldScreenRenderer,
                                             User remoteUser,
                                             org.ofbiz.core.entity.GenericValue project,
                                             String issuetype,
                                             MutableIssue issueObject,
                                             Map customFieldValuesHolder)
Specified by:
updateIssueFromFieldValuesHolder in interface IssueCreationHelperBean

createFieldScreenRenderer

public FieldScreenRenderer createFieldScreenRenderer(User remoteUser,
                                                     Issue issueObject)
Create a field screen renderer

Specified by:
createFieldScreenRenderer in interface IssueCreationHelperBean
Parameters:
remoteUser -
issueObject - - with issue type and project

validateProject

public void validateProject(Issue issue,
                            OperationContext operationContext,
                            Map actionParams,
                            ErrorCollection errors,
                            I18nHelper i18n)
                     throws Exception
Specified by:
validateProject in interface IssueCreationHelperBean
Throws:
Exception

validateIssueType

public void validateIssueType(Issue issue,
                              OperationContext operationContext,
                              Map actionParams,
                              ErrorCollection errors,
                              I18nHelper i18n)
Specified by:
validateIssueType in interface IssueCreationHelperBean

getField

public Field getField(String id)


Copyright © 2002-2009 Atlassian. All Rights Reserved.