Interface HwEntityDao

    • Method Detail

      • findRootByNodeId

        OnmsHwEntity findRootByNodeId​(Integer nodeId)
        Find root by node id.
        Parameters:
        nodeId - the node id
        Returns:
        the OpenNMS hardware entity
      • findRootEntityByNodeId

        OnmsHwEntity findRootEntityByNodeId​(Integer nodeId)
        Better performant than #findRootByNodeId. Useful when dealing with large trees. See NMS-13256 Find root by node id
        Parameters:
        nodeId - the node id
        Returns:
        the OpenNMS hardware entity
      • findEntityByIndex

        OnmsHwEntity findEntityByIndex​(Integer nodeId,
                                       Integer entPhysicalIndex)
        Find entity by index.
        Parameters:
        nodeId - the node id
        entPhysicalIndex - the entity physical index
        Returns:
        the OpenNMS hardware entity
      • findEntityByName

        OnmsHwEntity findEntityByName​(Integer nodeId,
                                      String entPhysicalName)
        Find entity by name.
        Parameters:
        nodeId - the node id
        entPhysicalName - the entity physical name
        Returns:
        the OpenNMS hardware entity
      • getAttributeValue

        String getAttributeValue​(Integer nodeId,
                                 Integer entPhysicalIndex,
                                 String attributeName)
        Gets the attribute value.
        Parameters:
        nodeId - the node id
        entPhysicalIndex - the entity physical index
        attributeName - the name of the desired attribute
        Returns:
        the attribute value
      • getAttributeValue

        String getAttributeValue​(Integer nodeId,
                                 String nameSource,
                                 String attributeName)
        Gets the attribute value.
        Parameters:
        nodeId - the node id
        nameSource - either the value of entPhysicalName or a regular expression to be applied over the entPhysicalName (should start with '~')
        attributeName - the name of the desired attribute
        Returns:
        the attribute value