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 OnmsJexlEnginejexlEngine-
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 StringgetResourceNameFromIndex(CollectionResource resource)This functions translate resourceIndex into a "unique" and "non-variable" name that could be identify a resource, as described earlier.voidsetParameters(List<Parameter> parameterCollection)setParametersvoidupdateContext(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:
getResourceNameFromIndexin interfaceStorageStrategy- Overrides:
getResourceNameFromIndexin classIndexStorageStrategy- Parameters:
resource- aCollectionResourceobject- Returns:
- a
Stringobject.
-
setParameters
public void setParameters(List<Parameter> parameterCollection) throws IllegalArgumentException
setParameters
- Specified by:
setParametersin interfaceStorageStrategy- Overrides:
setParametersin classIndexStorageStrategy- Parameters:
parameterCollection- aListobject.- Throws:
IllegalArgumentException
-
updateContext
public void updateContext(org.apache.commons.jexl2.JexlContext context, CollectionResource resource) throws IllegalArgumentException- Throws:
IllegalArgumentException
-
-