@Component public class SnmpTrapNorthbounderConfigurationResource extends OnmsRestService implements org.springframework.beans.factory.InitializingBean
Modifier and Type | Class and Description |
---|---|
static class |
SnmpTrapNorthbounderConfigurationResource.ImportMappings
The Class ImportMappings.
|
static class |
SnmpTrapNorthbounderConfigurationResource.SnmpTrapSinkList
The Class SnmpTrapSinkList.
|
OnmsRestService.ComparisonOperation
DEFAULT_LIMIT
Constructor and Description |
---|
SnmpTrapNorthbounderConfigurationResource() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
javax.ws.rs.core.Response |
getConfiguration()
Gets the configuration.
|
javax.ws.rs.core.Response |
getImportMappings(String trapSinkName)
Gets the import mappings.
|
javax.ws.rs.core.Response |
getSnmpTrapSink(String trapSinkName)
Gets the SNMP trap sink.
|
javax.ws.rs.core.Response |
getSnmpTrapSinks()
Gets all the SNMP trap sinks.
|
javax.ws.rs.core.Response |
getStatus()
Gets the status.
|
javax.ws.rs.core.Response |
getStatus(Boolean enabled)
Gets the status.
|
javax.ws.rs.core.Response |
removeImportMapping(String trapSinkName,
String mappingName)
Removes the import mapping.
|
javax.ws.rs.core.Response |
removeSnmpTrapSink(String trapSinkName)
Removes a specific SNMP trap sink.
|
javax.ws.rs.core.Response |
setConfiguration(javax.ws.rs.core.UriInfo uriInfo,
SnmpTrapNorthbounderConfig config)
Sets the configuration.
|
javax.ws.rs.core.Response |
setImportMapping(javax.ws.rs.core.UriInfo uriInfo,
String trapSinkName,
SnmpTrapMappingGroup mappingGroup)
Sets an import mapping.
|
javax.ws.rs.core.Response |
setSnmpTrapSink(javax.ws.rs.core.UriInfo uriInfo,
SnmpTrapSink snmpTrapSink)
Sets a SNMP trap sink.
|
javax.ws.rs.core.Response |
updateImportMapping(javax.ws.rs.core.UriInfo uriInfo,
String trapSinkName,
String mappingName,
MultivaluedMapImpl params)
Update import mapping.
|
javax.ws.rs.core.Response |
updateSnmpTrapSink(javax.ws.rs.core.UriInfo uriInfo,
String trapSinkName,
MultivaluedMapImpl params)
Update a specific SNMP trap sink.
|
applyQueryFilters, applyQueryFilters, getBadRequestResponse, getBeanWrapperForClass, getException, getException, getNumericValue, getRedirectUri, readLock, readUnlock, removeParameter, removeParameter, setProperties, writeLock, writeUnlock
public SnmpTrapNorthbounderConfigurationResource()
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
@GET @Produces(value={"application/xml","application/json","application/atom+xml"}) public javax.ws.rs.core.Response getConfiguration()
@POST public javax.ws.rs.core.Response setConfiguration(@Context javax.ws.rs.core.UriInfo uriInfo, SnmpTrapNorthbounderConfig config)
uriInfo
- the UEI infoconfig
- the full configuration object@GET @Path(value="status") @Produces(value="text/plain") public javax.ws.rs.core.Response getStatus()
@PUT @Path(value="status") @Produces(value="text/plain") public javax.ws.rs.core.Response getStatus(@QueryParam(value="enabled") Boolean enabled) throws javax.ws.rs.WebApplicationException
enabled
- the enabledjavax.ws.rs.WebApplicationException
- the web application exception@GET @Path(value="trapsinks") @Produces(value={"application/xml","application/json","application/atom+xml"}) public javax.ws.rs.core.Response getSnmpTrapSinks()
@GET @Path(value="trapsinks/{trapsinkName}") @Produces(value={"application/xml","application/json","application/atom+xml"}) public javax.ws.rs.core.Response getSnmpTrapSink(@PathParam(value="trapsinkName") String trapSinkName)
trapSinkName
- the trap sink name@GET @Path(value="trapsinks/{trapsinkName}/import-mappings") @Produces(value={"application/xml","application/json","application/atom+xml"}) public javax.ws.rs.core.Response getImportMappings(@PathParam(value="trapsinkName") String trapSinkName)
trapSinkName
- the trap sink name@POST @Path(value="trapsinks") @Consumes(value={"application/xml","application/json","application/atom+xml"}) public javax.ws.rs.core.Response setSnmpTrapSink(@Context javax.ws.rs.core.UriInfo uriInfo, SnmpTrapSink snmpTrapSink)
If there is a trap sunk with the same name, the existing one will be overridden.
uriInfo
- the URI infosnmpTrapSink
- the SNMP trap sink@POST @Path(value="trapsinks/{trapsinkName}/import-mappings") @Consumes(value={"application/xml","application/json","application/atom+xml"}) public javax.ws.rs.core.Response setImportMapping(@Context javax.ws.rs.core.UriInfo uriInfo, @PathParam(value="trapsinkName") String trapSinkName, SnmpTrapMappingGroup mappingGroup)
uriInfo
- the UEI infotrapSinkName
- the trap sink namemappingGroup
- the mapping group@PUT @Consumes(value="application/x-www-form-urlencoded") @Path(value="trapsinks/{trapsinkName}") public javax.ws.rs.core.Response updateSnmpTrapSink(@Context javax.ws.rs.core.UriInfo uriInfo, @PathParam(value="trapsinkName") String trapSinkName, MultivaluedMapImpl params)
uriInfo
- the URI infotrapSinkName
- the trap sink nameparams
- the parameters map@PUT @Consumes(value="application/x-www-form-urlencoded") @Path(value="trapsinks/{trapsinkName}/import-mappings/{mappingName}") public javax.ws.rs.core.Response updateImportMapping(@Context javax.ws.rs.core.UriInfo uriInfo, @PathParam(value="trapsinkName") String trapSinkName, @PathParam(value="mappingName") String mappingName, MultivaluedMapImpl params)
uriInfo
- the UEI infotrapSinkName
- the trap sink namemappingName
- the mapping nameparams
- the parameters map@DELETE @Path(value="trapsinks/{trapsinkName}/import-mappings/{mappingName}") @Produces(value={"application/xml","application/json","application/atom+xml"}) public javax.ws.rs.core.Response removeImportMapping(@PathParam(value="trapsinkName") String trapSinkName, @PathParam(value="mappingName") String mappingName)
trapSinkName
- the trap sink namemappingName
- the mapping name@DELETE @Path(value="trapsinks/{trapsinkName}") @Produces(value={"application/xml","application/json","application/atom+xml"}) public javax.ws.rs.core.Response removeSnmpTrapSink(@PathParam(value="trapsinkName") String trapSinkName)
trapSinkName
- the trap sink nameCopyright © 2016. All rights reserved.