public ConstantsManager getConstantsManager() { return ComponentAccessor.getConstantsManager(); }
public ConstantsManager get() { return ComponentAccessor.getConstantsManager(); } });
@VisibleForTesting ConstantsManager getConstantsManager() { return ComponentAccessor.getConstantsManager(); }
public MultiBulkMoveBeanImpl(String operationName, IssueManager issueManager) { this.operationName = operationName; this.issueManager = issueManager; this.constantsManager = ComponentAccessor.getConstantsManager(); this.authenticationContext = ComponentAccessor.getJiraAuthenticationContext(); }
public IssueConstant getIssueConstant(GenericValue issueConstantGV) { return ComponentAccessor.getConstantsManager().getIssueConstant(issueConstantGV); }
public SearchContextImpl() { constantsManager = ComponentAccessor.getConstantsManager(); projectManager = ComponentAccessor.getProjectManager(); }
/** * Retrive a list of all issue types in the system. * * @return all issue types in the system. */ private static List<String> getAllIssueTypes() { final ConstantsManager constantsManager = ComponentAccessor.getConstantsManager(); return constantsManager.expandIssueTypeIds(ImmutableList.of(ConstantsManager.ALL_ISSUE_TYPES)); }
@Override public Jsonable get() { ConstantsManager constantsManager = ComponentAccessor.getConstantsManager(); return writer -> { ObjectMapper mapper = new ObjectMapper(); mapper.configure(JsonGenerator.Feature.AUTO_CLOSE_TARGET, false); Collection<String> subTaskIds = constantsManager != null ? constantsManager.getSubTaskIssueTypeObjects().stream().map(it -> it.getId()).collect(Collectors.toList()) : ImmutableList.of(); mapper.writeValue(writer, subTaskIds); }; } }
@Deprecated public FieldVisibilityManagerImpl(final FieldManager fieldManager, final ProjectManager projectManager) { this(fieldManager, projectManager, ComponentAccessor.getConstantsManager(), ComponentAccessor.getFieldLayoutManager(), ComponentAccessor.getSubTaskManager()); }
public List<Status> getLinkedStatusObjects() { final List steps = descriptor.getSteps(); final List statuses = Lists.newArrayListWithCapacity(steps.size()); ConstantsManager constantsManager = ComponentAccessor.getConstantsManager(); for (final Object o : steps) { final StepDescriptor stepDescriptor = (StepDescriptor) o; statuses.add(constantsManager.getStatusObject(getLinkedStatusId(stepDescriptor))); } return statuses; }
public IssueType getIssueType() { if (!getIssueTypes().isEmpty()) { return ComponentAccessor.getConstantsManager().getIssueType(getIssueTypes().iterator().next()); } else { return null; } }
protected IssueConstant getConstant(GenericValue i1) { return ComponentAccessor.getConstantsManager().getStatusObject(i1.getString("status")); }
private Status getTargetStatus(String issueTypeId, String oldStatusId) { final WorkflowMigrationMappingKey mappingKey = new WorkflowMigrationMappingKey(issueTypeId, oldStatusId); final GenericValue status = mappings.get(mappingKey); if (status == null) throw new RuntimeException("Encountered an issue whose status is not allowed in the existing workflow. No mapping from (type, status) = "+mappingKey+" defined."); return ComponentAccessor.getConstantsManager().getStatus(status.getString("id")); }
protected IssueConstant getConstant(GenericValue i1) { return ComponentAccessor.getConstantsManager().getResolutionObject(i1.getString("resolution")); }
public IssueType getTargetIssueType() { return ComponentAccessor.getConstantsManager().getIssueType(getTargetIssueTypeId()); }
public Status getTargetStatus(final Issue issue) { final String statusId = statusMapHolder.get(issue.getStatusObject().getId()); if (statusId != null) { return ComponentAccessor.getConstantsManager().getStatus(statusId); } else { return null; } }
public IssueType getDefaultValue(FieldConfig config) { if (config != null) { String issueTypeId = (String) genericConfigManager.retrieve(CustomFieldType.DEFAULT_VALUE_TYPE, config.getId().toString()); return ComponentAccessor.getConstantsManager().getIssueTypeObject(issueTypeId); } else { return null; } }
public void deleteIssueConstantTranslation(IssueConstant issueConstant, String issueConstantPrefix, Locale locale) { PropertySet ps = ((IssueConstantImpl) issueConstant).getPropertySet(); String issueConstantLocaleKey = issueConstantPrefix + issueConstant.getId() + "." + locale; if (ps.exists(issueConstantLocaleKey)) ps.remove(issueConstantLocaleKey); // Can't inject this due to circular dependency ComponentAccessor.getConstantsManager().invalidate(issueConstant); }
public void setIssueConstantTranslation(IssueConstant issueConstant, String issueConstantPrefix, Locale locale, String translatedName, String translatedDesc) { PropertySet ps = ((IssueConstantImpl) issueConstant).getPropertySet(); String issueConstantLocaleKey = issueConstantPrefix + issueConstant.getId() + "." + locale; // Set property if (TextUtils.stringSet(translatedName) && TextUtils.stringSet(translatedDesc)) ps.setString(issueConstantLocaleKey, translatedName + "\n" + translatedDesc); // Can't inject this due to circular dependency ComponentAccessor.getConstantsManager().invalidate(issueConstant); }
@Override public void init() { this.ofBizDelegator = ComponentAccessor.getOfBizDelegator(); this.constantsManager = ComponentAccessor.getConstantsManager(); this.versionManager = ComponentAccessor.getVersionManager(); this.componentManager = ComponentAccessor.getProjectComponentManager(); this.levelManager = ComponentAccessor.getIssueSecurityLevelManager(); this.screenManager = ComponentAccessor.getFieldScreenManager(); this.screenSchemeManager = ComponentAccessor.getComponent(FieldScreenSchemeManager.class); }