Interface RuleLabelService

All Known Implementing Classes:
RuleLabelServiceImpl

public interface RuleLabelService
  • Field Details

  • Method Details

    • getLabels

      List<RuleLabelBean> getLabels(RemoteConnectUser remoteUser, TenantContext context)
      Retrieves all the rule labels for a tenant
      Parameters:
      remoteUser - the user requesting the labels
      context - The database tenant context
      Returns:
      the complete list or rule labels for the tenant
    • getLabel

      Optional<RuleLabelBean> getLabel(RemoteConnectUser remoteUser, TenantContext context, long labelId)
      Gets a single rule label by id
      Parameters:
      remoteUser - the user requesting the labels
      context - The database tenant context
      labelId - The id of the label
      Returns:
      an optional of the label
    • updateLabel

      io.atlassian.fugue.Either<ErrorCollection,RuleLabelBean> updateLabel(RemoteConnectUser remoteUser, TenantContext context, RuleLabelBean label)
      Updates given label if it passes validation
      Parameters:
      remoteUser - the user requesting the labels
      context - The database tenant context
      label - The label with the updates to apply
      Returns:
      The updated label or validation errors
    • createLabel

      io.atlassian.fugue.Either<ErrorCollection,RuleLabelBean> createLabel(RemoteConnectUser remoteUser, TenantContext context, RuleLabelBean label)
      Creates label if it passes validation
      Parameters:
      remoteUser - the user requesting the labels
      context - The database tenant context
      label - The label to create
      Returns:
      The created label or validation errors
    • deleteLabel

      boolean deleteLabel(RemoteConnectUser remoteUser, TenantContext context, Long labelId)
      Deletes label if it passes validation
      Parameters:
      remoteUser - the user requesting the labels
      context - The database tenant context
      labelId - The id of label to delete
      Returns:
      true when deleted, false when doesn't exist
    • isFeatureEnabled

      boolean isFeatureEnabled(TenantContext context)
      Should the rule label feature be visible to tenant
      Parameters:
      context - The database tenant context
      Returns:
      Whether or not to surface the feature to tenant