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 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
-
-
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.Response
addOrReplaceChild(java.lang.String nodeCriteria, java.lang.Integer parentEntPhysicalIndex, OnmsHwEntity child)
Adds or replaces a child entity.javax.ws.rs.core.Response
deleteHwEntity(java.lang.String nodeCriteria, java.lang.Integer entPhysicalIndex)
Delete hardware entity.OnmsHwEntity
getHardwareInventory(java.lang.String nodeCriteria)
Gets the hardware inventory.OnmsHwEntity
getHwEntityByIndex(java.lang.String nodeCriteria, java.lang.Integer entPhysicalIndex)
Gets the hardware entity by index.javax.ws.rs.core.Response
setHardwareInventory(java.lang.String nodeCriteria, OnmsHwEntity entity)
Sets the hardware inventory (root object)javax.ws.rs.core.Response
updateHwEntity(java.lang.String nodeCriteria, java.lang.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(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 criteriaentPhysicalIndex
- 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 criteriaentity
- 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 criteriaparentEntPhysicalIndex
- the parent entity physical indexchild
- 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 criteriaentPhysicalIndex
- the entity physical indexparams
- 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 criteriaentPhysicalIndex
- the entity physical index- Returns:
- the response
-
-