Class ForeignSourceConfigRestService

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean

    @Component("foreignSourceConfigRestService")
    @Path("foreignSourcesConfig")
    public class ForeignSourceConfigRestService
    extends OnmsRestService
    implements org.springframework.beans.factory.InitializingBean
    The Class ForeignSourceConfigRestService.
    Author:
    Alejandro Galue
    • Field Detail

      • m_foreignSourceService

        @Autowired
        protected ForeignSourceService m_foreignSourceService
        The foreign source service.
      • m_pollerConfig

        @Autowired
        protected PollerConfig m_pollerConfig
        The poller configuration.
    • Constructor Detail

      • ForeignSourceConfigRestService

        public ForeignSourceConfigRestService()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        Exception
      • getAvailablePolicies

        @GET
        @Path("policies")
        @Produces({"application/xml","application/json","application/atom+xml"})
        public ForeignSourceConfigRestService.SimplePluginConfigList getAvailablePolicies()
        Gets the available policies.
        Returns:
        the available policies
      • getAvailableDetectors

        @GET
        @Path("detectors")
        @Produces({"application/xml","application/json","application/atom+xml"})
        public ForeignSourceConfigRestService.SimplePluginConfigList getAvailableDetectors()
        Gets the available detectors.
        Returns:
        the available detectors
      • getServices

        @GET
        @Path("services/{groupName}")
        @Produces({"application/xml","application/json","application/atom+xml"})
        public ForeignSourceConfigRestService.ElementList getServices​(@PathParam("groupName")
                                                                      String groupName)
        Gets the services.

        It will include all the configured service monitors from poller-configuration.xml.

        If the groupName is not null, it will include the services defined on the foreign source.

        Parameters:
        groupName - the group name
        Returns:
        the services
      • getCategories

        @GET
        @Path("categories")
        @Produces({"application/xml","application/json","application/atom+xml"})
        public ForeignSourceConfigRestService.ElementList getCategories()
        Gets the categories.
        Returns:
        the categories