Class FieldServiceImpl
java.lang.Object
com.codebarrel.automation.rulecomponent.jira.common.fields.FieldServiceImpl
- All Implemented Interfaces:
FieldService
-
Constructor Summary
ConstructorsConstructorDescriptionFieldServiceImpl(JiraDataService jiraDataService, FeatureManager featureManager, UserLocale userLocale) -
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.
-
Constructor Details
-
FieldServiceImpl
@Inject public FieldServiceImpl(JiraDataService jiraDataService, FeatureManager featureManager, UserLocale userLocale)
-
-
Method Details
-
getFields
Description copied from interface:FieldServiceReturns all fields for the given Jira instance.- Specified by:
getFieldsin interfaceFieldService- Parameters:
tenantActor- the tenant and actor used to retrieve Jira's fields- Returns:
- all fields for the given Jira instance.
-
search
Description copied from interface:FieldServiceFor 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:
searchin interfaceFieldService- Parameters:
tenantActor- the tenant and actor used to retrieve Jira's fieldssearchString- The field search string- Returns:
- the field type for this field
-
getField
Description copied from interface:FieldServiceTries to lookup a field by exact id match.- Specified by:
getFieldin interfaceFieldService- 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
Description copied from interface:FieldServiceGets first matching custom field by type- Specified by:
getFieldByTypein interfaceFieldService- 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
Description copied from interface:FieldServiceGets the list of options for a custom field. If the custom field type does not suport options, an Optional.empty() is returned- Specified by:
getFieldOptionsin interfaceFieldService- 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
Description copied from interface:FieldServiceGets the first matching custom field by key- Specified by:
getFieldByKeyin interfaceFieldService- Parameters:
tenantActor- the tenant and actor used to retrieve Jira's fieldskey- the key of the custom field
-