|
|
|
@ -23,19 +23,9 @@ public class SDIService extends ResourceConfig{
|
|
|
|
|
//
|
|
|
|
|
public SDIService() {
|
|
|
|
|
super();
|
|
|
|
|
packages("org.gcube.spatial.data");
|
|
|
|
|
// packages("org.gcube.spatial.data.sdi.model");
|
|
|
|
|
// register(io.swagger.jaxrs.listing.ApiListingResource.class);
|
|
|
|
|
// register(io.swagger.jaxrs.listing.SwaggerSerializers.class);
|
|
|
|
|
register(MultiPartFeature.class);
|
|
|
|
|
// register(MoxyXmlFeature.class);
|
|
|
|
|
ApplicationContext context=ContextProvider.get();
|
|
|
|
|
log.warn("Initializing App : Properties.. ");
|
|
|
|
|
ApplicationContext context=ContextProvider.get();
|
|
|
|
|
ContainerConfiguration configuration=context.container().configuration();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String hostName=configuration.hostname();
|
|
|
|
|
Integer port=configuration.port();
|
|
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
URL resourceUrl = context.application().getResource("/WEB-INF/config.properties");
|
|
|
|
|
LocalConfiguration.init(resourceUrl).
|
|
|
|
@ -51,6 +41,38 @@ public class SDIService extends ResourceConfig{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
packages("org.gcube.spatial.data");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// log.warn("Initializing App : Binders");
|
|
|
|
|
//
|
|
|
|
|
// AbstractBinder binder = new AbstractBinder() {
|
|
|
|
|
// @Override
|
|
|
|
|
// protected void configure() {
|
|
|
|
|
// bindFactory(SDIManagerImpl.class).to(SDIManager.class);
|
|
|
|
|
// bindFactory(CapabilitiesProviderFactory.class).to(CapabilitiesProvider.class);
|
|
|
|
|
// bindFactory(PersistenceProviderFactory.class).to(PersistenceProvider.class);
|
|
|
|
|
// bindFactory(PluginManagerFactory.class).to(PluginManager.class);
|
|
|
|
|
// bindFactory(RequestManagerFactory.class).to(RequestManager.class);
|
|
|
|
|
// bindFactory(TicketManagerFactory.class).to(TicketManager.class);
|
|
|
|
|
// }
|
|
|
|
|
// };
|
|
|
|
|
// register(binder);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
register(MultiPartFeature.class);
|
|
|
|
|
// register(MoxyXmlFeature.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// String hostName=configuration.hostname();
|
|
|
|
|
// Integer port=configuration.port();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//SWAGGER
|
|
|
|
|
// BeanConfig beanConfig = new BeanConfig();
|
|
|
|
|