Class HardwareInventoryResource

  • Direct Known Subclasses:
    NodeHardwareInventoryRestService

    @Component("hardwareInventoryResource")
    @Transactional
    public class HardwareInventoryResource
    extends OnmsRestService
    The Class HardwareInventoryResource. Retrieve the root entity (all hardware inventory) GET /nodes/{nodeId}/hardwareInventory Override the root entity (all hardware inventory) POST /nodes/{nodeId}/hardwareInventory Retrieve a specific entity GET /nodes/{nodeId}/hardwareInventory/{entPhysicalIndex} Delete a specific entity DELETE /nodes/{nodeId}/hardwareInventory/{entPhysicalIndex} Modify an existing entity PUT /nodes/{nodeId}/hardwareInventory/{entPhysicalIndex} Add a child entity POST /nodes/{nodeId}/hardwareInventory/{entPhysicalIndex}
    Author:
    Alejandro Galue
    • Constructor Detail

      • HardwareInventoryResource

        public HardwareInventoryResource()
    • Method Detail

      • getHardwareInventory

        public OnmsHwEntity getHardwareInventory​(java.lang.String nodeCriteria)
        Gets the hardware inventory.
        Parameters:
        nodeCriteria - the node criteria
        Returns:
        the root hardware entity
      • getHwEntityByIndex

        public OnmsHwEntity getHwEntityByIndex​(java.lang.String nodeCriteria,
                                               java.lang.Integer entPhysicalIndex)
        Gets the hardware entity by index.
        Parameters:
        nodeCriteria - the node criteria
        entPhysicalIndex - the entity physical index
        Returns:
        the hardware entity
      • setHardwareInventory

        public javax.ws.rs.core.Response setHardwareInventory​(java.lang.String nodeCriteria,
                                                              OnmsHwEntity entity)
        Sets the hardware inventory (root object)
        Parameters:
        nodeCriteria - the node criteria
        entity - the root entity object
        Returns:
        the response
      • addOrReplaceChild

        public javax.ws.rs.core.Response addOrReplaceChild​(java.lang.String nodeCriteria,
                                                           java.lang.Integer parentEntPhysicalIndex,
                                                           OnmsHwEntity child)
        Adds or replaces a child entity.
        Parameters:
        nodeCriteria - the node criteria
        parentEntPhysicalIndex - the parent entity physical index
        child - the child
        Returns:
        the response
      • updateHwEntity

        public javax.ws.rs.core.Response updateHwEntity​(java.lang.String nodeCriteria,
                                                        java.lang.Integer entPhysicalIndex,
                                                        MultivaluedMapImpl params)
        Update hardware entity.
        Parameters:
        nodeCriteria - the node criteria
        entPhysicalIndex - the entity physical index
        params - the parameters
        Returns:
        the response
      • deleteHwEntity

        public javax.ws.rs.core.Response deleteHwEntity​(java.lang.String nodeCriteria,
                                                        java.lang.Integer entPhysicalIndex)
        Delete hardware entity.
        Parameters:
        nodeCriteria - the node criteria
        entPhysicalIndex - the entity physical index
        Returns:
        the response