Package org.opennms.web.rest.v1
Class ResourceRestService
- java.lang.Object
-
- org.opennms.web.rest.v1.OnmsRestService
-
- org.opennms.web.rest.v1.ResourceRestService
-
@Component("resourceRestService") public class ResourceRestService extends OnmsRestService
Read-only API for retrieving resources.- Author:
- jwhite
-
-
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 ResourceRestService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteResourceById(String resourceId)
ResourceDTO
getResourceById(String resourceId, int depth)
ResourceDTO
getResourceForNode(String nodeCriteria, int depth)
ResourceDTOCollection
getResources(int depth)
javax.ws.rs.core.Response
saveResourcesWithId(String[] resources)
List<ResourceDTO>
select(String nodes, String filterRules, String nodeSubresources, String stringProperties)
Selects nodes and parts of there resource information.-
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
-
getResources
@Transactional(readOnly=true) public ResourceDTOCollection getResources(int depth)
-
getResourceById
@Transactional(readOnly=true) public ResourceDTO getResourceById(String resourceId, int depth)
-
deleteResourceById
@Transactional(readOnly=false) public void deleteResourceById(String resourceId)
-
getResourceForNode
@Transactional(readOnly=true) public ResourceDTO getResourceForNode(String nodeCriteria, int depth)
-
select
@Transactional(readOnly=true) public List<ResourceDTO> select(String nodes, String filterRules, String nodeSubresources, String stringProperties)
Selects nodes and parts of there resource information.- If no
nodeSubresources
criteria is given then all subresources are returned but their nested content is not included. - If no
stringProperties
criteria is given then all string properties are included.
- Parameters:
nodes
- Comma separated list of node ids; both, database ids and foreign ids are supportedfilterRules
- Comma separated list of rule names for selecting nodesnodeSubresources
- Comma separated list of subresource names (the part after the dot)stringProperties
- Comma separated list of property names- Returns:
- If no
-
saveResourcesWithId
public javax.ws.rs.core.Response saveResourcesWithId(String[] resources)
-
-