Class JexlIndexStorageStrategy
- java.lang.Object
-
- org.opennms.netmgt.collection.support.IndexStorageStrategy
-
- org.opennms.netmgt.collection.support.JexlIndexStorageStrategy
-
- All Implemented Interfaces:
StorageStrategy
- Direct Known Subclasses:
ObjectNameStorageStrategy
public class JexlIndexStorageStrategy extends IndexStorageStrategy
- Author:
- roskens
-
-
Field Summary
Fields Modifier and Type Field Description protected OnmsJexlEngine
jexlEngine
-
Fields inherited from class org.opennms.netmgt.collection.support.IndexStorageStrategy
m_storageStrategyService
-
-
Constructor Summary
Constructors Constructor Description JexlIndexStorageStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getResourceNameFromIndex(CollectionResource resource)
This functions translate resourceIndex into a "unique" and "non-variable" name that could be identify a resource, as described earlier.void
setParameters(List<Parameter> parameterCollection)
setParametersvoid
updateContext(org.apache.commons.jexl2.JexlContext context, CollectionResource resource)
-
Methods inherited from class org.opennms.netmgt.collection.support.IndexStorageStrategy
getRelativePathForAttribute, getResourceTypeName, setResourceTypeName, setStorageStrategyService
-
-
-
-
Field Detail
-
jexlEngine
protected final OnmsJexlEngine jexlEngine
-
-
Method Detail
-
getResourceNameFromIndex
public String getResourceNameFromIndex(CollectionResource resource)
This functions translate resourceIndex into a "unique" and "non-variable" name that could be identify a resource, as described earlier. This method could be expensive because it could require send SNMP queries and make complicated functions to build the name. So you must try to call it only when is necessary.- Specified by:
getResourceNameFromIndex
in interfaceStorageStrategy
- Overrides:
getResourceNameFromIndex
in classIndexStorageStrategy
- Parameters:
resource
- aCollectionResource
object- Returns:
- a
String
object.
-
setParameters
public void setParameters(List<Parameter> parameterCollection) throws IllegalArgumentException
setParameters
- Specified by:
setParameters
in interfaceStorageStrategy
- Overrides:
setParameters
in classIndexStorageStrategy
- Parameters:
parameterCollection
- aList
object.- Throws:
IllegalArgumentException
-
updateContext
public void updateContext(org.apache.commons.jexl2.JexlContext context, CollectionResource resource) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
-