Class RestClient


  • public class RestClient
    extends Object
    • Method Detail

      • forLocalhost

        public static RestClient forLocalhost()
        Create a REST client that connects to http://localhost:8980/ with the default credentials. Used for testing.
        Returns:
        a new REST client for OpenNMS on the localhost
      • getDisplayVersion

        public String getDisplayVersion()
      • addOrReplaceRequisition

        public void addOrReplaceRequisition​(Requisition requisition)
      • importRequisition

        public void importRequisition​(String foreignSource)
      • getResponseForNode

        public javax.ws.rs.core.Response getResponseForNode​(String nodeCriteria)
      • addNode

        public javax.ws.rs.core.Response addNode​(OnmsNode onmsNode)
      • addInterface

        public javax.ws.rs.core.Response addInterface​(String nodeCriteria,
                                                      OnmsIpInterface ipInterface)
      • deleteInterface

        public javax.ws.rs.core.Response deleteInterface​(String nodeCriteria,
                                                         String ipAddress)
      • getResponseForService

        public javax.ws.rs.core.Response getResponseForService​(String nodeCriteria,
                                                               String ipAddress,
                                                               String service)
      • deleteNode

        public javax.ws.rs.core.Response deleteNode​(String nodeCriteria)
      • deleteService

        public javax.ws.rs.core.Response deleteService​(String nodeCriteria,
                                                       String ipAddress,
                                                       String service)
      • getResponseForInterface

        public javax.ws.rs.core.Response getResponseForInterface​(String nodeCriteria,
                                                                 String ipAddress)
      • addMinion

        public javax.ws.rs.core.Response addMinion​(OnmsMinion minion)
      • deleteMinion

        public javax.ws.rs.core.Response deleteMinion​(String id)
      • sendEvent

        public void sendEvent​(Event event)
      • sendEvent

        public void sendEvent​(Event event,
                              boolean clearDates)
      • getFlowCount

        public Long getFlowCount​(long start,
                                 long end)
      • getResourcesForNode

        public ResourceDTO getResourcesForNode​(String nodeCriteria)
      • resetGeocoderConfiguration

        public void resetGeocoderConfiguration()
      • addCategory

        public void addCategory​(String categoryName)
      • addCategoryToNode

        public void addCategoryToNode​(String nodeCriteria,
                                      String categoryName)
      • sendGraphML

        public void sendGraphML​(String graphName,
                                InputStream graphMLStream)
      • getGraphML

        public javax.ws.rs.core.Response getGraphML​(String graphName)
      • deleteGraphML

        public void deleteGraphML​(String graphName)