ApplicationConfig.java [src/java/m/comet] Revision: default Date:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package m.comet;
import csip.Config;
import csip.ContextConfig;
import java.util.HashSet;
import java.util.Set;
import javax.servlet.ServletContext;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.Context;
/**
*
* @author rumpal
*/
@javax.ws.rs.ApplicationPath("")
public class ApplicationConfig extends Application {
@Context
private ServletContext context;
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> resources = new HashSet<>();
addRestResourceClasses(resources);
ContextConfig.filterServices(context, resources);
Config.register(resources);
return resources;
}
private void addRestResourceClasses(Set<Class<?>> resources) {
resources.add(csip.ArchiveService.class);
resources.add(csip.CatalogService.class);
resources.add(csip.ControlService.class);
resources.add(csip.DynamicPyModelDataService.class);
resources.add(csip.GzipWriterInterceptor.class);
resources.add(csip.QueryService.class);
resources.add(csip.QueueingModelDataService.class);
resources.add(csip.ReportService.class);
resources.add(csip.UIService.class);
resources.add(m.comet.comet01_soilparams.V1_0.class);
resources.add(m.comet.comet02_soilinput.V1_0.class);
resources.add(m.comet.comet03_cliparams.V1_0.class);
resources.add(m.comet.comet04_cliinput.V1_0.class);
resources.add(m.comet.comet04_climate.V1_0.class);
resources.add(m.comet.comet05_practparams.V1_0.class);
resources.add(m.comet.comet06_cometplanner.V1_0.class);
}
}