public class AttributeParser
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTRIBUTES_SPLITTER |
static java.lang.String |
KEY_VALUE_SPLITTER |
| Modifier and Type | Method and Description |
|---|---|
static com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ |
createItemAttribute(java.lang.String key,
java.lang.String value)
Create an ItemAttributesRQ instance with key and value.
|
static java.util.List<com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ> |
createItemAttributes(java.lang.String[] keys,
java.lang.String value)
Create list of attributes from key array and a value.
|
static java.util.List<com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ> |
createItemAttributes(java.lang.String key,
java.lang.String[] values)
Create list of attributes from a key and value array.
|
static java.util.Set<com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ> |
parseAsSet(java.lang.String rawAttributes)
Parse attribute string.
Input attribute string should have format: build:4r3wf234;attributeKey:attributeValue;attributeValue2;attributeValue3. Output map should have format: build:4r3wf234 attributeKey:attributeValue null:attributeValue2 null:attributeValue3 |
static java.util.Set<com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ> |
retrieveAttributes(Attributes attributesAnnotation)
Parse ReportPortal attributes from
Attributes annotation instance. |
static com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ |
splitKeyValue(java.lang.String attribute)
Parse a string representation of an attribute to ReportPortal attribute object instance.
|
public static final java.lang.String ATTRIBUTES_SPLITTER
public static final java.lang.String KEY_VALUE_SPLITTER
@Nonnull
public static java.util.Set<com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ> parseAsSet(@Nullable
java.lang.String rawAttributes)
rawAttributes - Attributes stringSet of ItemAttributesRQ@Nullable
public static com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ splitKeyValue(@Nullable
java.lang.String attribute)
attribute - string representation of an attribute@Nonnull
public static java.util.Set<com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ> retrieveAttributes(@Nonnull
Attributes attributesAnnotation)
Attributes annotation instance.attributesAnnotation - annotation instance@Nonnull
public static java.util.List<com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ> createItemAttributes(@Nullable
java.lang.String[] keys,
@Nullable
java.lang.String value)
keys - attribute keysvalue - attribute value@Nonnull
public static java.util.List<com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ> createItemAttributes(@Nullable
java.lang.String key,
@Nullable
java.lang.String[] values)
key - attribute keyvalues - attribute values@Nonnull
public static com.epam.ta.reportportal.ws.model.attribute.ItemAttributesRQ createItemAttribute(@Nullable
java.lang.String key,
@Nonnull
java.lang.String value)
key - attribute keyvalue - attribute value