@Component public class SyslogNorthbounderConfigurationResource extends OnmsRestService implements org.springframework.beans.factory.InitializingBean
Modifier and Type | Class and Description |
---|---|
static class |
SyslogNorthbounderConfigurationResource.SyslogDestinationList
The Class SyslogDestinationList.
|
OnmsRestService.ComparisonOperation
DEFAULT_LIMIT
Constructor and Description |
---|
SyslogNorthbounderConfigurationResource() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
javax.ws.rs.core.Response |
getConfiguration()
Gets the configuration.
|
javax.ws.rs.core.Response |
getEmailDestinations()
Gets all the email destinations.
|
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 |
getSyslogDestination(String destinationName)
Gets a syslog destination.
|
javax.ws.rs.core.Response |
removeSyslogDestination(String destinationName)
Removes a specific syslog destination.
|
javax.ws.rs.core.Response |
setConfiguration(javax.ws.rs.core.UriInfo uriInfo,
SyslogNorthbounderConfig config)
Sets the configuration.
|
javax.ws.rs.core.Response |
setSyslogDestination(javax.ws.rs.core.UriInfo uriInfo,
SyslogDestination destination)
Sets a syslog destination.
|
javax.ws.rs.core.Response |
updateSyslogDestination(javax.ws.rs.core.UriInfo uriInfo,
String destinationName,
MultivaluedMapImpl params)
Update a specific Syslog Destination.
|
applyQueryFilters, applyQueryFilters, getBadRequestResponse, getBeanWrapperForClass, getException, getException, getNumericValue, getRedirectUri, readLock, readUnlock, removeParameter, removeParameter, setProperties, writeLock, writeUnlock
public SyslogNorthbounderConfigurationResource()
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, SyslogNorthbounderConfig 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="destinations") @Produces(value={"application/xml","application/json","application/atom+xml"}) public javax.ws.rs.core.Response getEmailDestinations()
@GET @Path(value="destinations/{destinationName}") @Produces(value={"application/xml","application/json","application/atom+xml"}) public javax.ws.rs.core.Response getSyslogDestination(@PathParam(value="destinationName") String destinationName)
destinationName
- the destination name@POST @Path(value="destinations") @Consumes(value={"application/xml","application/json","application/atom+xml"}) public javax.ws.rs.core.Response setSyslogDestination(@Context javax.ws.rs.core.UriInfo uriInfo, SyslogDestination destination)
If there is a destination with the same name, the existing one will be overridden.
uriInfo
- the URI infodestination
- the destination@PUT @Consumes(value="application/x-www-form-urlencoded") @Path(value="destinations/{destinationName}") public javax.ws.rs.core.Response updateSyslogDestination(@Context javax.ws.rs.core.UriInfo uriInfo, @PathParam(value="destinationName") String destinationName, MultivaluedMapImpl params)
uriInfo
- the URI infodestinationName
- the destination nameparams
- the parameters map@DELETE @Path(value="destinations/{destinationName}") @Produces(value={"application/xml","application/json","application/atom+xml"}) public javax.ws.rs.core.Response removeSyslogDestination(@PathParam(value="destinationName") String destinationName)
destinationName
- the destination nameCopyright © 2016. All rights reserved.