Class SnmpTrapNorthbounderConfigurationResource

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

    @Component
    public class SnmpTrapNorthbounderConfigurationResource
    extends OnmsRestService
    implements org.springframework.beans.factory.InitializingBean
    The Class SnmpTrapNorthbounderConfigurationResource.
    Author:
    Alejandro Galue
    • Constructor Detail

      • SnmpTrapNorthbounderConfigurationResource

        public SnmpTrapNorthbounderConfigurationResource()
    • Method Detail

      • afterPropertiesSet

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

        public javax.ws.rs.core.Response getConfiguration()
        Gets the configuration.
        Returns:
        the configuration
      • setConfiguration

        public javax.ws.rs.core.Response setConfiguration​(SnmpTrapNorthbounderConfig config)
        Sets the configuration.
        Parameters:
        config - the full configuration object
        Returns:
        the response
      • getStatus

        public javax.ws.rs.core.Response getStatus()
        Gets the status.
        Returns:
        the status
      • getStatus

        public javax.ws.rs.core.Response getStatus​(Boolean enabled)
                                            throws javax.ws.rs.WebApplicationException
        Gets the status.
        Parameters:
        enabled - the enabled
        Returns:
        the status
        Throws:
        javax.ws.rs.WebApplicationException - the web application exception
      • getSnmpTrapSinks

        public javax.ws.rs.core.Response getSnmpTrapSinks()
        Gets all the SNMP trap sinks.
        Returns:
        the SNMP trap sinks
      • getSnmpTrapSink

        public SnmpTrapSink getSnmpTrapSink​(String trapSinkName)
        Gets the SNMP trap sink.
        Parameters:
        trapSinkName - the trap sink name
        Returns:
        the SNMP trap sink
      • getImportMappings

        public javax.ws.rs.core.Response getImportMappings​(String trapSinkName)
        Gets the import mappings.
        Parameters:
        trapSinkName - the trap sink name
        Returns:
        the import mappings
      • setSnmpTrapSink

        public javax.ws.rs.core.Response setSnmpTrapSink​(SnmpTrapSink snmpTrapSink)
        Sets a SNMP trap sink.

        If there is a trap sunk with the same name, the existing one will be overridden.

        Parameters:
        snmpTrapSink - the SNMP trap sink
        Returns:
        the response
      • setImportMapping

        public javax.ws.rs.core.Response setImportMapping​(String trapSinkName,
                                                          SnmpTrapMappingGroup mappingGroup)
        Sets an import mapping.
        Parameters:
        trapSinkName - the trap sink name
        mappingGroup - the mapping group
        Returns:
        the response
      • updateSnmpTrapSink

        public javax.ws.rs.core.Response updateSnmpTrapSink​(String trapSinkName,
                                                            MultivaluedMapImpl params)
        Update a specific SNMP trap sink.
        Parameters:
        trapSinkName - the trap sink name
        params - the parameters map
        Returns:
        the response
      • updateImportMapping

        public javax.ws.rs.core.Response updateImportMapping​(String trapSinkName,
                                                             String mappingName,
                                                             MultivaluedMapImpl params)
        Update import mapping.
        Parameters:
        trapSinkName - the trap sink name
        mappingName - the mapping name
        params - the parameters map
        Returns:
        the response
      • removeImportMapping

        public javax.ws.rs.core.Response removeImportMapping​(String trapSinkName,
                                                             String mappingName)
        Removes the import mapping.
        Parameters:
        trapSinkName - the trap sink name
        mappingName - the mapping name
        Returns:
        the response
      • removeSnmpTrapSink

        public javax.ws.rs.core.Response removeSnmpTrapSink​(String trapSinkName)
        Removes a specific SNMP trap sink.
        Parameters:
        trapSinkName - the trap sink name
        Returns:
        the response