Package org.opennms.web.rest.v1
Class HardwareInventoryResource
- java.lang.Object
-
- org.opennms.web.rest.v1.OnmsRestService
-
- org.opennms.web.rest.v1.HardwareInventoryResource
-
- Direct Known Subclasses:
NodeHardwareInventoryRestService
@Component("hardwareInventoryResource") @Transactional public class HardwareInventoryResource extends OnmsRestServiceThe 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opennms.web.rest.v1.OnmsRestService
OnmsRestService.ComparisonOperation
-
-
Field Summary
-
Fields inherited from class org.opennms.web.rest.v1.OnmsRestService
DEFAULT_LIMIT
-
-
Constructor Summary
Constructors Constructor Description HardwareInventoryResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponseaddOrReplaceChild(String nodeCriteria, Integer parentEntPhysicalIndex, OnmsHwEntity child)Adds or replaces a child entity.javax.ws.rs.core.ResponsedeleteHwEntity(String nodeCriteria, Integer entPhysicalIndex)Delete hardware entity.OnmsHwEntitygetHardwareInventory(String nodeCriteria)Gets the hardware inventory.OnmsHwEntitygetHwEntityByIndex(String nodeCriteria, Integer entPhysicalIndex)Gets the hardware entity by index.javax.ws.rs.core.ResponsesetHardwareInventory(String nodeCriteria, OnmsHwEntity entity)Sets the hardware inventory (root object)javax.ws.rs.core.ResponseupdateHwEntity(String nodeCriteria, Integer entPhysicalIndex, MultivaluedMapImpl params)Update hardware entity.-
Methods inherited from class org.opennms.web.rest.v1.OnmsRestService
applyQueryFilters, applyQueryFilters, getBadRequestResponse, getBeanWrapperForClass, getException, getException, getNumericValue, getRedirectUri, readLock, readUnlock, removeParameter, removeParameter, setProperties, writeLock, writeUnlock
-
-
-
-
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 criteriaentPhysicalIndex- 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 criteriaentity- 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 criteriaparentEntPhysicalIndex- the parent entity physical indexchild- 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 criteriaentPhysicalIndex- the entity physical indexparams- the parameters- Returns:
- the response
-
-