Package org.opennms.netmgt.ticketer.jira
Class FieldMapperRegistry
- java.lang.Object
-
- org.opennms.netmgt.ticketer.jira.FieldMapperRegistry
-
public class FieldMapperRegistry extends java.lang.Object
TheFieldMapperRegistry
maps String input values to a JIRA ReST API representation.- Author:
- mvrueden
- See Also:
IssueInputBuilder.setFieldValue(String, Object)
-
-
Constructor Summary
Constructors Constructor Description FieldMapperRegistry(java.util.Properties properties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.util.Map<java.lang.String,java.lang.String>
buildLookupMap(java.util.Properties properties)
The jira.properties may contain properties to define the lookup strategy for fields.FieldMapper
lookup(com.atlassian.jira.rest.client.api.domain.FieldSchema schema)
Returns the FieldMapper, which is registered withschema
.
-
-
-
Method Detail
-
buildLookupMap
protected static java.util.Map<java.lang.String,java.lang.String> buildLookupMap(java.util.Properties properties)
The jira.properties may contain properties to define the lookup strategy for fields. Usually the default is to lookup a (custom) field by it's name. This can be overwritten, e.g. jira.attributes.project.resolution=id to overwrite it's default key lookup to id lookup.- Parameters:
properties
-- Returns:
-
lookup
public FieldMapper lookup(com.atlassian.jira.rest.client.api.domain.FieldSchema schema)
Returns the FieldMapper, which is registered withschema
.- Parameters:
schema
- The schema to lookup aFieldMapper
for.- Returns:
- the FieldMapper, which is registered with
schema
.
-
-