/** * Returns the IssueManager. Needed to avoid circular dependency. * * @return IssueManager */ private IssueManager getIssueManager() { return ComponentAccessor.getIssueManager(); }
IssueManager getIssueManager() { return ComponentAccessor.getIssueManager(); } }
DefaultProjectMigrator(Project project, T targetScheme, OnCompleteCallback<T> onCompleteCallback) { super(project, targetScheme, workflowManager, schemeManager, delegator, user, i18nHelper, ComponentAccessor.getIssueManager(), issueIndexManager, onCompleteCallback); } }
public IssueTableBean() { subTaskManager = ComponentAccessor.getSubTaskManager(); issueManager = ComponentAccessor.getIssueManager(); }
public Collection getFixVersions(GenericValue issue) throws GenericEntityException { if (issue == null) { throw new IllegalArgumentException("Issue cannot be null."); } return ComponentAccessor.getIssueManager().getEntitiesByIssue(IssueRelationConstants.FIX_VERSION, issue); }
public Collection getComponents(GenericValue issue) throws GenericEntityException { if (issue == null) { throw new IllegalArgumentException("Issue cannot be null."); } return ComponentAccessor.getIssueManager().getEntitiesByIssue(IssueRelationConstants.COMPONENT, issue); }
private static MutableIssue getIssueObjectInternal(final String key) { return ComponentAccessor.getIssueManager().getIssueObject(key); } }
public Collection getVersions(GenericValue issue) throws GenericEntityException { if (issue == null) { throw new IllegalArgumentException("Issue cannot be null."); } return ComponentAccessor.getIssueManager().getEntitiesByIssue(IssueRelationConstants.VERSION, issue); }
@Override public IssueLink build(final GenericValue genericValue) { if (genericValue == null) { return null; } return new IssueLinkImpl(genericValue, ComponentAccessor.getComponent(IssueLinkTypeManager.class), ComponentAccessor.getIssueManager()); }
@Override public AssignableWorkflowSchemeMigrationHelper createMigrationHelper(Project project, AssignableWorkflowScheme scheme) throws GenericEntityException { Preconditions.checkNotNull(project, "project cannot be null."); return new AssignableWorkflowSchemeMigrationHelper(project, scheme, workflowManager, delegator, schemeManager, authCtx.getI18nHelper(), authCtx.getUser(), constantsManager, taskManager, getIssueManager(), issueIndexManager, workflowSchemeManager, eventPublisher); }
private Issue parseForIssue(final String issueId) throws PermissionException { if (issueId == null) { return null; } try { final Long id = Long.parseLong(issueId); final Issue issue = ComponentAccessor.getIssueManager().getIssueObject(id); if (issue != null) { // ok does the user have permission to see that issue if (!hasPermissionToViewAttachment(issue)) { throw new PermissionException("The user does not have permission to see this issue"); } } return issue; } catch (NumberFormatException e) { return null; } }
@Deprecated public static GenericValue setPriority(GenericValue issue, ApplicationUser remoteUser, String priority) throws GenericEntityException { final GenericValue originalIssue = ComponentAccessor.getIssueManager().getIssue(issue.getLong("id")); issue.setString(IssueFieldConstants.PRIORITY, priority); issue.set("updated", UtilDateTime.nowTimestamp()); GenericValue changeGroup = ChangeLogUtils.createChangeGroup(remoteUser, originalIssue, issue, Collections.<ChangeItemBean>emptyList(), true); ComponentAccessor.getOfBizDelegator().storeAll(Arrays.asList(issue)); return changeGroup; }
try issue = ComponentAccessor.getIssueManager().getIssueObject(key);
/** * This method retrieves the (potentially modified) issue object that is being transitioned through workflow. * * @param transientVars * @return the issue object representing the issue the functions shoudl modify * @throws com.atlassian.jira.exception.DataAccessException If for some reason the issue doesn't exist. */ protected MutableIssue getIssue(Map transientVars) throws DataAccessException { MutableIssue issue = (MutableIssue) transientVars.get("issue"); if (issue == null) { WorkflowEntry entry = (WorkflowEntry) transientVars.get("entry"); try { issue = ComponentAccessor.getIssueManager().getIssueObjectByWorkflow(entry.getId()); } catch (GenericEntityException e) { throw new DataAccessException("Problem looking up issue with workflow entry id "+entry.getId()); } if (issue == null) throw new DataAccessException("No issue found with workflow entry id "+entry.getId()); } return issue; } }
Collection oldEntities = ComponentAccessor.getIssueManager().getEntitiesByIssue(relationType, issue);
try issue = ComponentAccessor.getIssueManager().getIssueObjectByWorkflow(entry.getId());
Collection oldEntities = ComponentAccessor.getIssueManager().getEntitiesByIssue(relationType, issue);
final IssueManager issueManager = ComponentAccessor.getIssueManager();
private synchronized MessageHandlerContext getContext() { if (context == null) { context = new DefaultMessageHandlerContext(ComponentAccessor.getCommentManager(), new Log4jMessageHandlerExecutionMonitor(), ComponentAccessor.getIssueManager(), ComponentAccessor.getAttachmentManager(), ComponentAccessor.getComponent(TextFieldCharacterLengthValidator.class), ComponentAccessor.getPermissionManager(), ComponentAccessor.getApplicationProperties(), ComponentAccessor.getComponent(ApplicationRoleManager.class), ComponentAccessor.getComponent(UserService.class)); } return context; }
/** * This is a static way of instantiating an Issue Object. * * @param genericValue generic value of the issue * @return new instance of MutableIssue * @deprecated You should construct this yourself if at all possible, * or use {@link IssueFactory#getIssue(org.ofbiz.core.entity.GenericValue)} instead. */ public static MutableIssue getIssueObject(GenericValue genericValue) { return new IssueImpl(genericValue, ComponentAccessor.getIssueManager(), ComponentAccessor.getProjectManager(), ComponentAccessor.getVersionManager(), ComponentAccessor.getIssueSecurityLevelManager(), ComponentAccessor.getConstantsManager(), ComponentAccessor.getSubTaskManager(), ComponentAccessor.getAttachmentManager(), ComponentAccessor.getComponentOfType(LabelManager.class), ComponentAccessor.getComponentOfType(ProjectComponentManager.class), ComponentAccessor.getComponentOfType(UserManager.class), ComponentAccessor.getComponentOfType(JiraAuthenticationContext.class)); }