Package org.opennms.web.rest.v1.config
Class SnmpTrapNorthbounderConfigurationResource
- java.lang.Object
-
- org.opennms.web.rest.v1.OnmsRestService
-
- org.opennms.web.rest.v1.config.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSnmpTrapNorthbounderConfigurationResource.ImportMappingsThe Class ImportMappings.static classSnmpTrapNorthbounderConfigurationResource.SnmpTrapSinkListThe Class SnmpTrapSinkList.-
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 SnmpTrapNorthbounderConfigurationResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()javax.ws.rs.core.ResponsegetConfiguration()Gets the configuration.javax.ws.rs.core.ResponsegetImportMappings(String trapSinkName)Gets the import mappings.SnmpTrapSinkgetSnmpTrapSink(String trapSinkName)Gets the SNMP trap sink.javax.ws.rs.core.ResponsegetSnmpTrapSinks()Gets all the SNMP trap sinks.javax.ws.rs.core.ResponsegetStatus()Gets the status.javax.ws.rs.core.ResponsegetStatus(Boolean enabled)Gets the status.javax.ws.rs.core.ResponseremoveImportMapping(String trapSinkName, String mappingName)Removes the import mapping.javax.ws.rs.core.ResponseremoveSnmpTrapSink(String trapSinkName)Removes a specific SNMP trap sink.javax.ws.rs.core.ResponsesetConfiguration(SnmpTrapNorthbounderConfig config)Sets the configuration.javax.ws.rs.core.ResponsesetImportMapping(String trapSinkName, SnmpTrapMappingGroup mappingGroup)Sets an import mapping.javax.ws.rs.core.ResponsesetSnmpTrapSink(SnmpTrapSink snmpTrapSink)Sets a SNMP trap sink.javax.ws.rs.core.ResponseupdateImportMapping(String trapSinkName, String mappingName, MultivaluedMapImpl params)Update import mapping.javax.ws.rs.core.ResponseupdateSnmpTrapSink(String trapSinkName, MultivaluedMapImpl params)Update a specific SNMP trap sink.-
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
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception- Specified by:
afterPropertiesSetin interfaceorg.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 namemappingGroup- 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 nameparams- 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 namemappingName- the mapping nameparams- 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 namemappingName- 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
-
-