Interface IssueTypeSchemeManager

All Known Implementing Classes:
IssueTypeSchemeManagerImpl

public interface IssueTypeSchemeManager
A manager to manage IssueType's unique set of circumstances. That is, it circumvents the scheme system by collpasing the scheme and config
  • Method Details

    • create

      FieldConfigScheme create(String schemeName, String schemeDescription, List<String> optionIds)
    • update

      FieldConfigScheme update(FieldConfigScheme configScheme, Collection<String> optionIds)
    • getDefaultIssueTypeScheme

      FieldConfigScheme getDefaultIssueTypeScheme()
      Returns the default global issue type, to which all issue types are added to
      Returns:
      FieldConfigScheme
    • isDefaultIssueTypeScheme

      boolean isDefaultIssueTypeScheme(FieldConfigScheme configScheme)
    • addOptionToDefault

      void addOptionToDefault(String id)
      Adds the option with the issue type id to the default issue type scheme
      Parameters:
      id - issue type id
    • getAllRelatedSchemes

      Collection<FieldConfigScheme> getAllRelatedSchemes(String optionId)
      Gets all schemes that has the issue type as part of its options
      Parameters:
      optionId - Issue type id being queried
      Returns:
      Collection of FieldConfigScheme objects
    • removeOptionFromAllSchemes

      void removeOptionFromAllSchemes(String optionId)
    • deleteScheme

      void deleteScheme(FieldConfigScheme configScheme)
    • getDefaultIssueTypeSchemeId

      long getDefaultIssueTypeSchemeId()
      Retrieves the unique identifier that corresponds with the system's default issue type scheme.
      Returns:
      ID for the system-wide default issue type scheme.
    • getAllSchemes

      List<FieldConfigScheme> getAllSchemes()
    • getDefaultValue

      IssueType getDefaultValue(Issue issue)
    • getDefaultValue

      IssueType getDefaultValue(FieldConfig config)
      Returns the default IssueType for the given field configuration.
      Parameters:
      config - the field configuration of interest
      Returns:
      IssueType representing the default value of this config
    • setDefaultValue

      void setDefaultValue(FieldConfig config, String optionId)
    • getDefaultValue

      IssueType getDefaultValue(org.ofbiz.core.entity.GenericValue project)
      Deprecated.
      Use getDefaultIssueType(Project) instead. Since v5.2.
      Returns the default IssueType object based on the passed in project.
      Parameters:
      project - the project
      Returns:
      IssueType or null if there is no default
    • getDefaultIssueType

      IssueType getDefaultIssueType(Project project)
      Returns the default IssueType object based on the passed in project.
      Parameters:
      project - the Project
      Returns:
      IssueType or null if there is no default
    • getConfigScheme

      FieldConfigScheme getConfigScheme(org.ofbiz.core.entity.GenericValue project)
      Deprecated.
      Use of GenericValue is discouraged. Deprecated since: v4.0. Use getConfigScheme(Project) instead.
      Returns a config scheme for a given project.
      Parameters:
      project - the project of interest
      Returns:
      Relevent field configuration scheme
    • getConfigScheme

      FieldConfigScheme getConfigScheme(Project project)
      Returns a config scheme for a given project.
      Parameters:
      project - the project of interest
      Returns:
      Relevent field configuration scheme
    • getIssueTypesForProject

      @Nonnull @Deprecated Collection<IssueType> getIssueTypesForProject(org.ofbiz.core.entity.GenericValue project)
      Deprecated.
      Use of GenericValue is discouraged. Deprecated since: 3.9. Use getIssueTypesForProject(Project) instead.
      Return the collection of issue types associated with this project.
      Parameters:
      project - project generic value
      Returns:
      collection of issue type objects
    • getIssueTypesForProject

      @Nonnull Collection<IssueType> getIssueTypesForProject(Project project)
      Return the collection of issue types associated with this project.
      Parameters:
      project - project to return the issue types of
      Returns:
      collection of IssueType objects (possibly empty; never null).
    • getIssueTypesForDefaultScheme

      @Nonnull Collection<IssueType> getIssueTypesForDefaultScheme()
      Return the collection of issue types associated with the default scheme.
      Returns:
      collection of IssueType objects (possibly empty, never null).
    • getIssueTypesForScheme

      @Nonnull Collection<IssueType> getIssueTypesForScheme(FieldConfigScheme issueTypeScheme)
      Return the collection of issue types associated with the specified IssueType[FieldConfig]Scheme
      Returns:
      collection of IssueType objects (possibly empty, never null).
    • addProjectAssociations

      FieldConfigScheme addProjectAssociations(FieldConfigScheme initialScheme, Collection<Project> projectsToAdd)
      Adds associations to the issueTypeScheme for the specified projects, then returns the updated scheme. Existing associations are not modified by this method.

      NOTE: this method does not perform any checks to see if issuetype migrations or other safety measures need to be taken. For that sort of thing, use IssueTypeSchemeService instead.

      Parameters:
      initialScheme - [IssueType] scheme whose project associations we'd like to expand
      projectsToAdd - projects to be added to those associated with the specified IssueTypeScheme
      Returns:
      the scheme whose update project associations have been updated.
    • removeProjectAssociations

      FieldConfigScheme removeProjectAssociations(FieldConfigScheme initialScheme, Collection<Project> projectsToRemove)
      Removes any associations from the issueTypeScheme for the specified projects, then returns the updated scheme. Other existing associations are left as-is.

      NOTE: this method does not perform any checks to see if issuetype migrations or other safety measures need to be taken. For that sort of thing, use IssueTypeSchemeService instead.

      Parameters:
      initialScheme - [IssueType] scheme whose project associations we'd like to reduce
      projectsToRemove - projects to be un-associated from the specified IssueTypeScheme
      Returns:
      the scheme whose update project associations have been updated.
    • setProjectAssociationsForIssueTypeScheme

      @Nonnull @Deprecated FieldConfigScheme setProjectAssociationsForIssueTypeScheme(FieldConfigScheme issueTypeScheme, Collection<Project> projects)
      Associates the issueTypeScheme with the specified projects, then returns the updated scheme. Note, any existing associations will be overwritten.

      NOTE: this method does not perform any checks to see if issuetype migrations or other safety measures need to be taken. For that sort of thing, use IssueTypeSchemeService instead.

      Parameters:
      issueTypeScheme - scheme whose project associations we'd like to change
      projects - projects to be associated with the specified IssueTypeScheme
      Returns:
      the scheme whose update project associations have been updated.
    • getSubTaskIssueTypesForProject

      @Nonnull Collection<IssueType> getSubTaskIssueTypesForProject(@Nonnull Project project)
      Return the collection of sub-task issue types associated with this project Join of the result of this method and getNonSubTaskIssueTypesForProject(com.atlassian.jira.project.Project) produces the same result as a call to getIssueTypesForProject(com.atlassian.jira.project.Project).
      Parameters:
      project - project to return the issue types of
      Returns:
      collection of IssueType objects (possibly empty, never null).
    • getNonSubTaskIssueTypesForProject

      @Nonnull Collection<IssueType> getNonSubTaskIssueTypesForProject(Project project)
      Return the collection of issue types other than sub-tasks associated with this project. Join of the result of this method and getSubTaskIssueTypesForProject(com.atlassian.jira.project.Project) produces the same result as a call to getIssueTypesForProject(com.atlassian.jira.project.Project).
      Parameters:
      project - project to return the issue types of
      Returns:
      collection of IssueType objects