use of org.opennms.netmgt.model.OnmsHwEntity in project opennms by OpenNMS.
the class HwEntityDaoHibernate method getAttributeValue.
/* (non-Javadoc)
* @see org.opennms.netmgt.dao.api.HwEntityDao#getAttributeValue(java.lang.Integer, java.lang.String, java.lang.String)
*/
@Override
public String getAttributeValue(Integer nodeId, String nameSource, String attributeName) {
boolean isRegex = nameSource.startsWith("~");
if (isRegex) {
OnmsHwEntity r = findRootByNodeId(nodeId);
return r == null ? null : findAttribute(r, nameSource.substring(1), attributeName);
}
OnmsHwEntity e = findEntityByName(nodeId, nameSource);
return e == null ? null : getAttributeValue(e, attributeName);
}
Aggregations