java.lang.Object
com.codebarrel.automation.rulecomponent.jira.common.fields.FieldServiceImpl
All Implemented Interfaces:
FieldService

@Component public class FieldServiceImpl extends Object implements FieldService
  • Constructor Details

  • Method Details

    • getFields

      public Optional<List<IssueFieldBean>> getFields(TenantActor tenantActor)
      Description copied from interface: FieldService
      Returns all fields for the given Jira instance.
      Specified by:
      getFields in interface FieldService
      Parameters:
      tenantActor - the tenant and actor used to retrieve Jira's fields
      Returns:
      all fields for the given Jira instance.
    • search

      public Optional<IssueFieldBean> search(TenantActor tenantActor, String searchString)
      Description copied from interface: FieldService
      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.
      Specified by:
      search in interface FieldService
      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

      public Optional<IssueFieldBean> getField(TenantActor tenantActor, String id)
      Description copied from interface: FieldService
      Tries to lookup a field by exact id match.
      Specified by:
      getField in interface FieldService
      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

      public Optional<IssueFieldBean> getFieldByType(TenantActor tenantActor, String type)
      Description copied from interface: FieldService
      Gets first matching custom field by type
      Specified by:
      getFieldByType in interface FieldService
      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

      public Optional<IssueFieldOptionsBean> getFieldOptions(TenantActor tenantActor, String id)
      Description copied from interface: FieldService
      Gets the list of options for a custom field. If the custom field type does not suport options, an Optional.empty() is returned
      Specified by:
      getFieldOptions in interface FieldService
      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

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