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​(String nodeCriteria)
        Gets the hardware inventory.
        Parameters:
        nodeCriteria - the node criteria
        Returns:
        the root hardware entity
      • getHwEntityByIndex

        public OnmsHwEntity getHwEntityByIndex​(String nodeCriteria,
                                               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​(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​(String nodeCriteria,
                                                           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​(String nodeCriteria,
                                                        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​(String nodeCriteria,
                                                        Integer entPhysicalIndex)
        Delete hardware entity.
        Parameters:
        nodeCriteria - the node criteria
        entPhysicalIndex - the entity physical index
        Returns:
        the response