use of org.opennms.core.xml.AbstractJaxbConfigDao in project opennms by OpenNMS.
the class DataCollectionConfigResource method getDataCollectionConfiguration.
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_ATOM_XML })
public Response getDataCollectionConfiguration() throws ConfigurationResourceException {
LOG.debug("getDatacollectionConfigurationForLocation()");
@SuppressWarnings("unchecked") final AbstractJaxbConfigDao<DatacollectionConfig, DatacollectionConfig> dao = (AbstractJaxbConfigDao<DatacollectionConfig, DatacollectionConfig>) m_dataCollectionConfigDao;
final DatacollectionConfig dcc = dao.getContainer().getObject();
if (dcc == null) {
return Response.status(Status.NOT_FOUND).build();
}
return Response.ok(dcc.toDataCollectionConfig()).build();
}
Aggregations