All Known Implementing Classes:
FieldServiceImpl

public interface FieldService
This service provides convenience methods to lookup fields for a given tenant. This can be done via fuzzy searching or exact id lookups.
  • Method Details

    • getFields

      Optional<List<IssueFieldBean>> getFields(TenantActor tenantActor)
      Returns all fields for the given Jira instance.
      Parameters:
      tenantActor - the tenant and actor used to retrieve Jira's fields
      Returns:
      all fields for the given Jira instance.
    • search

      Optional<IssueFieldBean> search(TenantActor tenantActor, String searchString)
      For a given search string get a the field key. This can be: field key, field name, lowercase field name or field name with spaces replaced with underscores. If there a multiple matching customfields, it will return the passed value back.
      Parameters:
      tenantActor - the tenant and actor used to retrieve Jira's fields
      searchString - The field search string
      Returns:
      the field type for this field
    • getField

      Optional<IssueFieldBean> getField(TenantActor tenantActor, String id)
      Tries to lookup a field by exact id match.
      Parameters:
      tenantActor - the tenant and actor used to retrieve Jira's fields
      id - the id of the field
      Returns:
      the exact matching field for this id.
    • getFieldByType

      Optional<IssueFieldBean> getFieldByType(TenantActor tenantActor, String type)
      Gets first matching custom field by type
      Parameters:
      tenantActor - the tenant and actor used to retrieve Jira's fields
      type - the complete key of the field type
      Returns:
      the first matching field for this type.
    • getFieldOptions

      Optional<IssueFieldOptionsBean> getFieldOptions(TenantActor tenantActor, String id)
      Gets the list of options for a custom field. If the custom field type does not suport options, an Optional.empty() is returned
      Parameters:
      tenantActor - the tenant and actor used to retrieve Jira's fields
      id - the id of the field
      Returns:
      the list of options for the field
    • getFieldByKey

      Optional<IssueFieldBean> getFieldByKey(TenantActor tenantActor, String key)
      Gets the first matching custom field by key
      Parameters:
      tenantActor - the tenant and actor used to retrieve Jira's fields
      key - the key of the custom field