private static IssueFactory getIssueFactory() { // We can't have IssueFactory injected as we would get a circular dependency. return ComponentAccessor.getIssueFactory(); }
/** * NB: This is done because we can't inject a {@link IssueFactory}, this would cause circular dependency. */ protected IssueFactory getIssueFactory() { return ComponentAccessor.getIssueFactory(); }
public LuceneSupportHealthCheck(final JiraAuthenticationContext jiraAuthenticationContext, final SearchService searchService, final IssueIndexManager indexManager, final SearchProvider searchProvider, final OfBizDelegator ofBizDelegator, final I18nResolver i18nResolver, final HelpPathResolver helpPathResolver) { super(i18nResolver, helpPathResolver, HELP_PATH); this.applicationProperties = getApplicationProperties(); this.jiraAuthenticationContext = jiraAuthenticationContext; this.searchService = searchService; this.indexManager = indexManager; this.searchProvider = searchProvider; this.delegator = ofBizDelegator; this.issueFactory = getIssueFactory(); }
private Issue getIssueObjectFor(GenericValue issueGV) { return ComponentAccessor.getIssueFactory().getIssue(issueGV); }
private Issue getIssueOrNull(final GenericValue entity) { if (entity != null && "Issue".equals(entity.getEntityName())) { return ComponentAccessor.getIssueFactory().getIssue(entity); } return null; }
public PermissionContext getPermissionContext(GenericValue projectOrIssue) { if ("Issue".equals(projectOrIssue.getEntityName())) { IssueFactory issueFactory = ComponentAccessor.getIssueFactory(); Issue issue = issueFactory.getIssue(projectOrIssue); Project project = issue.getProjectObject(); Status status = issue.getStatusObject(); return new PermissionContextImpl(issue, project, status); } else if ("Project".equals(projectOrIssue.getEntityName())) { Project project = ComponentAccessor.getProjectFactory().getProject(projectOrIssue); return new PermissionContextImpl(null, project, null); } else throw new IllegalArgumentException("DefaultPermissionContextFactory passed a "+projectOrIssue.getClass().getName()+": can only accept an Issue or Project"); }
inputs.put("issue", issue); GenericValue originalIssueGV = getIssueManager().getIssue(issue.getId()); MutableIssue originalIssue = ComponentAccessor.getIssueFactory().getIssue(originalIssueGV); inputs.put(WorkflowFunctionUtils.ORIGINAL_ISSUE_KEY, originalIssue); inputs.put("proj", from.getProject());
final MutableIssue issueCopy = ComponentAccessor.getIssueFactory().cloneIssue(issue);