public class PropertyHelper extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
PropertyHelper.Metric |
Constructor and Description |
---|
PropertyHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsArguments(String propertyId)
Check to see if the given property id contains replacement arguments (e.g.
|
static boolean |
containsProperty(Set<String> propertyIds,
String propertyId)
Check if the given property id or one of its parent category ids is contained
in the given set of property ids.
|
static Set<String> |
getAssociatedPropertyIds(Request request)
Get all of the property ids associated with the given request.
|
static Set<String> |
getCategories(Set<String> propertyIds)
Get the set of categories for the given property ids.
|
static Request |
getCreateRequest(Set<Map<String,Object>> properties,
Map<String,String> requestInfoProperties)
Factory method to create a create request from the given set of property maps.
|
static Map<String,Map<String,PropertyInfo>> |
getGangliaPropertyIds(Resource.Type resourceType) |
static Map<String,Map<String,PropertyInfo>> |
getJMXPropertyIds(Resource.Type resourceType) |
static Map<Resource.Type,String> |
getKeyPropertyIds(Resource.Type resourceType) |
static Map<String,Object> |
getProperties(Resource resource)
Get a map of all the property values keyed by property id for the given resource.
|
static String |
getPropertyCategory(String absProperty)
Helper to get a property category from a string.
|
static String |
getPropertyId(String category,
String name) |
static Set<String> |
getPropertyIds(Map<String,Map<String,PropertyInfo>> componentPropertyInfoMap)
Extract the set of property ids from a component PropertyInfo map.
|
static Set<String> |
getPropertyIds(Resource.Type resourceType) |
static String |
getPropertyName(String absProperty)
Helper to get a property name from a string.
|
static Request |
getReadRequest(Set<String> propertyIds)
Factory method to create a read request from the given set of property ids.
|
static Request |
getReadRequest(Set<String> propertyIds,
Map<String,TemporalInfo> mapTemporalInfo)
Factory method to create a read request from the given set of property ids.
|
static Request |
getReadRequest(String... propertyIds)
Factory method to create a read request from the given set of property ids.
|
static Request |
getUpdateRequest(Map<String,Object> properties,
Map<String,String> requestInfoProperties)
Factory method to create an update request from the given map of properties.
|
public static Set<String> getPropertyIds(Resource.Type resourceType)
public static Set<String> getPropertyIds(Map<String,Map<String,PropertyInfo>> componentPropertyInfoMap)
componentPropertyInfoMap
- the mappublic static Map<String,Map<String,PropertyInfo>> getGangliaPropertyIds(Resource.Type resourceType)
public static Map<String,Map<String,PropertyInfo>> getJMXPropertyIds(Resource.Type resourceType)
public static Map<Resource.Type,String> getKeyPropertyIds(Resource.Type resourceType)
public static String getPropertyName(String absProperty)
absProperty
- the fully qualified propertypublic static String getPropertyCategory(String absProperty)
absProperty
- the fully qualified propertypublic static Set<String> getCategories(Set<String> propertyIds)
propertyIds
- the property idspublic static boolean containsProperty(Set<String> propertyIds, String propertyId)
propertyIds
- the set of property idspropertyId
- the property idpublic static boolean containsArguments(String propertyId)
propertyId
- the property id to checkpublic static Set<String> getAssociatedPropertyIds(Request request)
request
- the requestpublic static Map<String,Object> getProperties(Resource resource)
resource
- the resourcepublic static Request getCreateRequest(Set<Map<String,Object>> properties, Map<String,String> requestInfoProperties)
properties
- resource properties associated with the request; may be nullrequestInfoProperties
- request specific properties; may be nullpublic static Request getReadRequest(Set<String> propertyIds)
propertyIds
- the property ids associated with the request; may be nullpublic static Request getReadRequest(Set<String> propertyIds, Map<String,TemporalInfo> mapTemporalInfo)
propertyIds
- the property ids associated with the request; may be nullmapTemporalInfo
- the temporal infopublic static Request getReadRequest(String... propertyIds)
propertyIds
- the property ids associated with the request; may be nullpublic static Request getUpdateRequest(Map<String,Object> properties, Map<String,String> requestInfoProperties)
properties
- resource properties associated with the request; may be nullrequestInfoProperties
- request specific properties; may be nullCopyright © 2017. All rights reserved.