com.atlassian.jira.external
Class ExternalUtils
java.lang.Object
com.atlassian.jira.external.ExternalUtils
public class ExternalUtils
- extends Object
Constructor Summary |
ExternalUtils(ProjectManager projectManager,
PermissionSchemeManager permissionSchemeManager,
IssueManager issueManager,
JiraAuthenticationContext authenticationContext,
VersionManager versionManager,
ProjectComponentManager componentManager,
UserManager userManager,
CustomFieldManager customFieldManager,
OptionsManager optionsManager,
org.ofbiz.core.entity.GenericDelegator genericDelegator,
com.atlassian.core.action.ActionDispatcher actionDispatcher,
ConstantsManager constantsManager,
WorkflowManager workflowManager,
IssueTypeScreenSchemeManager issueTypeScreenSchemeManager,
FieldScreenManager fieldScreenManager,
PermissionManager permissionManager,
IssueFactory issueFactory,
AttachmentManager attachmentManager,
IssueLinkTypeManager issueLinkTypeManager,
IssueLinkManager issueLinkManager,
FieldManager fieldManager,
ApplicationProperties applicationProperties,
IssueTypeSchemeManager issueTypeSchemeManager,
CommentManager commentManager,
UserUtil userUtil)
|
Method Summary |
void |
addComments(org.ofbiz.core.entity.GenericValue issue,
ExternalComment externalComment,
boolean dispatchEvent)
Adds an external comment to an issue and portentially dispatches and event about this. |
void |
addComments(org.ofbiz.core.entity.GenericValue issue,
ExternalComment externalComment,
boolean dispatchEvent,
boolean tweakIssueUpdateDate)
Adds an external comment to an issue and portentially dispatches and event about this and also updates the issue
updated date. |
String |
addConstant(String constantName,
String constantType)
|
protected String |
addConstant(String constantName,
String constantType,
Map extraParams)
|
void |
addOptions(CustomField customFieldObject,
ExternalCustomFieldValue customFieldValue,
org.ofbiz.core.entity.GenericValue issueGV)
|
void |
associateCustomFieldWithScreen(CustomField customField,
FieldScreen screen)
|
void |
associateProjectCategory(org.ofbiz.core.entity.GenericValue project,
org.ofbiz.core.entity.GenericValue projectCategory)
|
void |
attachFile(ExternalAttachment externalAttachment,
org.ofbiz.core.entity.GenericValue issueGv)
|
boolean |
canActivateNumberOfUsers(int numberOfUsers)
|
protected void |
checkStatus(Issue issue,
String status)
|
Issue |
convertExternalIssueToIssue(ExternalIssueImpl externalIssue,
ExternalProject project,
ImportObjectIdMappings mappings)
|
org.ofbiz.core.entity.GenericValue |
createComponent(ExternalProject externalProject,
ExternalComponent externalComponent)
|
CustomField |
createCustomField(ExternalCustomFieldValue customFieldValue)
|
org.ofbiz.core.entity.GenericValue |
createIssue(Issue issue,
String status,
String resolution)
|
protected org.ofbiz.core.entity.GenericValue |
createIssue(Map fields)
|
void |
createIssueLink(ExternalLink externalLink,
ImportObjectIdMappings mappings)
|
org.ofbiz.core.entity.GenericValue |
createProject(ExternalProject externalProject)
|
org.ofbiz.core.entity.GenericValue |
createProjectCategory(String projectCategoryName)
|
User |
createUser(ExternalUser externalUser)
|
Version |
createVersion(ExternalProject externalProject,
ExternalVersion externalVersion)
|
String |
extractCustomFieldId(String customfieldId)
|
String |
extractCustomFieldType(String customfieldId)
|
org.ofbiz.core.entity.GenericValue |
getComponent(ExternalProject externalProject,
ExternalComponent externalComponent)
|
org.ofbiz.core.entity.GenericValue |
getConstant(String constantName,
String constantType)
|
CustomField |
getCustomField(ExternalCustomFieldValue customFieldValue)
|
CustomField |
getCustomField(String customfieldId)
|
com.atlassian.core.util.DateUtils |
getDateUtils()
|
User |
getJiraUser(ExternalUser externalUser)
|
org.ofbiz.core.entity.GenericValue |
getProject(ExternalProject externalProject)
|
org.ofbiz.core.entity.GenericValue |
getProjectCategory(String projectCategoryName)
|
static String |
getTextDataFromMimeMessage(String s)
|
Version |
getVersion(ExternalProject externalProject,
ExternalVersion externalVersion)
|
boolean |
isIssueLinkingOn()
|
MutableIssue |
newIssueInstance()
|
void |
setCurrentWorkflowStep(org.ofbiz.core.entity.GenericValue issue,
String status,
String resolution)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GENERIC_CONTENT_TYPE
public static final String GENERIC_CONTENT_TYPE
- See Also:
- Constant Field Values
TYPE_SEPERATOR
public static final String TYPE_SEPERATOR
- See Also:
- Constant Field Values
CF_PREFIX
public static final String CF_PREFIX
- See Also:
- Constant Field Values
ExternalUtils
public ExternalUtils(ProjectManager projectManager,
PermissionSchemeManager permissionSchemeManager,
IssueManager issueManager,
JiraAuthenticationContext authenticationContext,
VersionManager versionManager,
ProjectComponentManager componentManager,
UserManager userManager,
CustomFieldManager customFieldManager,
OptionsManager optionsManager,
org.ofbiz.core.entity.GenericDelegator genericDelegator,
com.atlassian.core.action.ActionDispatcher actionDispatcher,
ConstantsManager constantsManager,
WorkflowManager workflowManager,
IssueTypeScreenSchemeManager issueTypeScreenSchemeManager,
FieldScreenManager fieldScreenManager,
PermissionManager permissionManager,
IssueFactory issueFactory,
AttachmentManager attachmentManager,
IssueLinkTypeManager issueLinkTypeManager,
IssueLinkManager issueLinkManager,
FieldManager fieldManager,
ApplicationProperties applicationProperties,
IssueTypeSchemeManager issueTypeSchemeManager,
CommentManager commentManager,
UserUtil userUtil)
getProject
public org.ofbiz.core.entity.GenericValue getProject(ExternalProject externalProject)
createProject
public org.ofbiz.core.entity.GenericValue createProject(ExternalProject externalProject)
throws ExternalException
- Throws:
ExternalException
createVersion
public Version createVersion(ExternalProject externalProject,
ExternalVersion externalVersion)
getVersion
public Version getVersion(ExternalProject externalProject,
ExternalVersion externalVersion)
createComponent
public org.ofbiz.core.entity.GenericValue createComponent(ExternalProject externalProject,
ExternalComponent externalComponent)
getComponent
public org.ofbiz.core.entity.GenericValue getComponent(ExternalProject externalProject,
ExternalComponent externalComponent)
createUser
public User createUser(ExternalUser externalUser)
canActivateNumberOfUsers
public boolean canActivateNumberOfUsers(int numberOfUsers)
getJiraUser
public User getJiraUser(ExternalUser externalUser)
createIssue
public org.ofbiz.core.entity.GenericValue createIssue(Issue issue,
String status,
String resolution)
throws ExternalException
- Throws:
ExternalException
checkStatus
protected void checkStatus(Issue issue,
String status)
throws WorkflowException,
ExternalException
- Throws:
WorkflowException
ExternalException
createIssue
protected org.ofbiz.core.entity.GenericValue createIssue(Map fields)
throws CreateException
- Throws:
CreateException
setCurrentWorkflowStep
public void setCurrentWorkflowStep(org.ofbiz.core.entity.GenericValue issue,
String status,
String resolution)
throws org.ofbiz.core.entity.GenericEntityException,
WorkflowException
- Throws:
org.ofbiz.core.entity.GenericEntityException
WorkflowException
getCustomField
public CustomField getCustomField(ExternalCustomFieldValue customFieldValue)
getCustomField
public CustomField getCustomField(String customfieldId)
addOptions
public void addOptions(CustomField customFieldObject,
ExternalCustomFieldValue customFieldValue,
org.ofbiz.core.entity.GenericValue issueGV)
createCustomField
public CustomField createCustomField(ExternalCustomFieldValue customFieldValue)
extractCustomFieldType
public String extractCustomFieldType(String customfieldId)
extractCustomFieldId
public String extractCustomFieldId(String customfieldId)
associateCustomFieldWithScreen
public void associateCustomFieldWithScreen(CustomField customField,
FieldScreen screen)
addComments
public void addComments(org.ofbiz.core.entity.GenericValue issue,
ExternalComment externalComment,
boolean dispatchEvent)
throws ExternalException
- Adds an external comment to an issue and portentially dispatches and event about this. The issue updated date will be set to now via this method.
- Parameters:
issue
- the issue GVexternalComment
- the external Comment to adddispatchEvent
- whether to dispatch an issue updated event
- Throws:
ExternalException
- if something bad happens
addComments
public void addComments(org.ofbiz.core.entity.GenericValue issue,
ExternalComment externalComment,
boolean dispatchEvent,
boolean tweakIssueUpdateDate)
throws ExternalException
- Adds an external comment to an issue and portentially dispatches and event about this and also updates the issue
updated date. When doing a CSV import one might not want the event dispatched nor the issue updated date changed.
- Parameters:
issue
- the issue GVexternalComment
- the external Comment to adddispatchEvent
- whether to dispatch an issue updated eventtweakIssueUpdateDate
- whether to tweak the issue updated date or not
- Throws:
ExternalException
- if something bad happens
attachFile
public void attachFile(ExternalAttachment externalAttachment,
org.ofbiz.core.entity.GenericValue issueGv)
throws ExternalException
- Throws:
ExternalException
createIssueLink
public void createIssueLink(ExternalLink externalLink,
ImportObjectIdMappings mappings)
throws ExternalException
- Throws:
ExternalException
getConstant
public org.ofbiz.core.entity.GenericValue getConstant(String constantName,
String constantType)
addConstant
public String addConstant(String constantName,
String constantType)
throws ExternalException
- Throws:
ExternalException
addConstant
protected String addConstant(String constantName,
String constantType,
Map extraParams)
throws ExternalException
- Throws:
ExternalException
convertExternalIssueToIssue
public Issue convertExternalIssueToIssue(ExternalIssueImpl externalIssue,
ExternalProject project,
ImportObjectIdMappings mappings)
throws ImportException
- Throws:
ImportException
newIssueInstance
public MutableIssue newIssueInstance()
getTextDataFromMimeMessage
public static String getTextDataFromMimeMessage(String s)
getDateUtils
public com.atlassian.core.util.DateUtils getDateUtils()
isIssueLinkingOn
public boolean isIssueLinkingOn()
getProjectCategory
public org.ofbiz.core.entity.GenericValue getProjectCategory(String projectCategoryName)
createProjectCategory
public org.ofbiz.core.entity.GenericValue createProjectCategory(String projectCategoryName)
throws ExternalException
- Throws:
ExternalException
associateProjectCategory
public void associateProjectCategory(org.ofbiz.core.entity.GenericValue project,
org.ofbiz.core.entity.GenericValue projectCategory)
Copyright © 2002-2009 Atlassian. All Rights Reserved.