Interface FieldService
- 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 Summary
Modifier and TypeMethodDescriptiongetField(TenantActor tenantActor, String id) Tries to lookup a field by exact id match.getFieldByKey(TenantActor tenantActor, String key) Gets the first matching custom field by keygetFieldByType(TenantActor tenantActor, String type) Gets first matching custom field by typegetFieldOptions(TenantActor tenantActor, String id) Gets the list of options for a custom field.getFields(TenantActor tenantActor) Returns all fields for the given Jira instance.search(TenantActor tenantActor, String searchString) For a given search string get a the field key.
-
Method Details
-
getFields
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
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 fieldssearchString- The field search string- Returns:
- the field type for this field
-
getField
Tries to lookup a field by exact id match.- Parameters:
tenantActor- the tenant and actor used to retrieve Jira's fieldsid- the id of the field- Returns:
- the exact matching field for this id.
-
getFieldByType
Gets first matching custom field by type- Parameters:
tenantActor- the tenant and actor used to retrieve Jira's fieldstype- the complete key of the field type- Returns:
- the first matching field for this type.
-
getFieldOptions
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 fieldsid- the id of the field- Returns:
- the list of options for the field
-
getFieldByKey
Gets the first matching custom field by key- Parameters:
tenantActor- the tenant and actor used to retrieve Jira's fieldskey- the key of the custom field
-