public abstract class BaseProvider extends Object
Constructor and Description |
---|
BaseProvider(Set<String> propertyIds)
Construct a provider.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkCategory(String unsupportedPropertyId)
Check the categories to account for map properties where the entries will not be
in the provider property list ids but the map (category) might be.
|
protected Set<String> |
checkConfigPropertyIds(Set<String> base,
String configCategory)
Checks for property ids that are not recognized by the provider.
|
Set<String> |
checkPropertyIds(Set<String> propertyIds) |
protected boolean |
containsArguments(String propertyId)
Check to see if the given property id contains replacement arguments (e.g.
|
Set<String> |
getCategoryIds()
Get supported categories
|
Set<String> |
getPropertyIds()
Get the property ids supported by this property adapter.
|
protected Map.Entry<String,Pattern> |
getRegexEntry(String id)
Gets the key/value mapping between a metric string in the JSON files and
the Java regular expression pattern that matches it.
|
protected List<String> |
getRegexGroups(String regExpKey,
String id)
Extracts set of matcher.group() from id
|
protected Set<String> |
getRequestPropertyIds(Request request,
Predicate predicate)
Get the set of property ids required to satisfy the given request.
|
protected boolean |
isPatternKey(String id) |
protected static boolean |
isPropertyCategoryRequested(String propertyId,
Set<String> requestedIds)
Determine whether or not any of the requested ids are a category for the given property.
|
protected static boolean |
isPropertyEntryRequested(String propertyId,
Set<String> requestedIds)
Determine whether or not any of the requested ids are an entry for the given property, if
the given property is a category.
|
protected static boolean |
isPropertyRequested(String propertyId,
Set<String> requestedIds)
Determine whether or not the given property id is part the given set of requested ids.
|
protected static boolean |
setResourceProperty(Resource resource,
String propertyId,
Object value,
Set<String> requestedIds)
Set a property value on the given resource for the given id and value.
|
protected Set<String> checkConfigPropertyIds(Set<String> base, String configCategory)
base
- the base set of propertiesconfigCategory
- the config category that would have a desired_config
element.protected Set<String> getRequestPropertyIds(Request request, Predicate predicate)
request
- the requestpredicate
- the predicateprotected boolean checkCategory(String unsupportedPropertyId)
protected Map.Entry<String,Pattern> getRegexEntry(String id)
id
- null
if none match the ID.protected List<String> getRegexGroups(String regExpKey, String id)
regExpKey
- id
- protected boolean isPatternKey(String id)
protected boolean containsArguments(String propertyId)
propertyId
- the property id to checkprotected static boolean isPropertyRequested(String propertyId, Set<String> requestedIds)
propertyId
- the property idrequestedIds
- the requested set of property idsprotected static boolean setResourceProperty(Resource resource, String propertyId, Object value, Set<String> requestedIds)
resource
- the resourcepropertyId
- the property idvalue
- the value to setrequestedIds
- the requested set of property idsprotected static boolean isPropertyEntryRequested(String propertyId, Set<String> requestedIds)
propertyId
- the property idrequestedIds
- the requested set of property idsprotected static boolean isPropertyCategoryRequested(String propertyId, Set<String> requestedIds)
propertyId
- the property idrequestedIds
- the requested set of property idspublic Set<String> getPropertyIds()
Copyright © 2022 Apache Software Foundation. All rights reserved.