Class ResourceRestService


  • @Component("resourceRestService")
    public class ResourceRestService
    extends OnmsRestService
    Read-only API for retrieving resources.
    Author:
    jwhite
    • Constructor Detail

      • ResourceRestService

        public ResourceRestService()
    • Method Detail

      • 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 supported
        filterRules - Comma separated list of rule names for selecting nodes
        nodeSubresources - Comma separated list of subresource names (the part after the dot)
        stringProperties - Comma separated list of property names
        Returns:
      • saveResourcesWithId

        public javax.ws.rs.core.Response saveResourcesWithId​(String[] resources)