Class JiraRuleLabelStore

java.lang.Object
com.codebarrel.jira.plugin.automation.store.JiraRuleLabelStore
All Implemented Interfaces:
RuleLabelStore

@Component public class JiraRuleLabelStore extends Object implements RuleLabelStore
  • Constructor Details

    • JiraRuleLabelStore

      @Inject public JiraRuleLabelStore(DbConnectionManager dbConnectionManager)
  • Method Details

    • getLabels

      public List<RuleLabel> getLabels(TenantContext context)
      Description copied from interface: RuleLabelStore
      Retrieves all the rule labels for a tenant
      Specified by:
      getLabels in interface RuleLabelStore
      Parameters:
      context - The database tenant context
      Returns:
      the complete list or rule labels for the tenant
    • getLabel

      public Optional<RuleLabel> getLabel(TenantContext context, long labelId)
      Description copied from interface: RuleLabelStore
      Gets a single rule label by id
      Specified by:
      getLabel in interface RuleLabelStore
      Parameters:
      context - The database tenant context
      labelId - The id of the label
      Returns:
      an optional of the label
    • getLabelByName

      public Optional<RuleLabel> getLabelByName(TenantContext context, String name)
      Description copied from interface: RuleLabelStore
      Gets a label by its name (case insensitive)
      Specified by:
      getLabelByName in interface RuleLabelStore
      Parameters:
      context - The database tenant context
      name - The label name
      Returns:
      an optional of the label
    • updateLabel

      public RuleLabel updateLabel(TenantContext context, RuleLabel updateRuleLabel)
      Description copied from interface: RuleLabelStore
      Updates given label
      Specified by:
      updateLabel in interface RuleLabelStore
      Parameters:
      context - The database tenant context
      updateRuleLabel - The label with the updates to apply
      Returns:
      The updated label
    • createLabel

      public RuleLabel createLabel(TenantContext context, RuleLabel newRuleLabel)
      Description copied from interface: RuleLabelStore
      Creates label
      Specified by:
      createLabel in interface RuleLabelStore
      Parameters:
      context - The database tenant context
      newRuleLabel - The label to create
      Returns:
      The created label
    • deleteLabel

      public void deleteLabel(TenantContext context, long labelId)
      Description copied from interface: RuleLabelStore
      Deletes label
      Specified by:
      deleteLabel in interface RuleLabelStore
      Parameters:
      context - The database tenant context
      labelId - The id of label to delete
    • getLabelToRuleCount

      public long getLabelToRuleCount(TenantContext context)
      Description copied from interface: RuleLabelStore
      Gets count of total label to rule associations for the tenant
      Specified by:
      getLabelToRuleCount in interface RuleLabelStore
      Parameters:
      context - The database tenant context
      Returns:
      total count of associations
    • getLabelToRuleCount

      public long getLabelToRuleCount(TenantContext context, long labelId)
      Description copied from interface: RuleLabelStore
      Gets the count of label to rule associations for a specific label.
      Specified by:
      getLabelToRuleCount in interface RuleLabelStore
      Parameters:
      context - The database tenant context
      labelId - The id of the label
      Returns:
      the count of associations for the specified label