This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See http://git.codelutin.com/observe.git commit 19bc788cf3cdde11ed220038c61b15c05cca2e6c Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Aug 20 10:36:36 2015 +0200 Suppression d'un module obsolete --- .../rest/wm/ObserveRestApplicationContext.java | 42 --------------- .../rest/wm/ObserveRestApplicationListener.java | 42 --------------- .../rest/wm/ObserveRestWebMotionFilter.java | 62 ---------------------- observe-services-rest/src/main/resources/mapping | 28 ---------- .../src/main/webapp/WEB-INF/web.xml | 36 ------------- 5 files changed, 210 deletions(-) diff --git a/observe-services-rest/src/main/java/fr/ird/observe/services/rest/wm/ObserveRestApplicationContext.java b/observe-services-rest/src/main/java/fr/ird/observe/services/rest/wm/ObserveRestApplicationContext.java deleted file mode 100644 index b950a16..0000000 --- a/observe-services-rest/src/main/java/fr/ird/observe/services/rest/wm/ObserveRestApplicationContext.java +++ /dev/null @@ -1,42 +0,0 @@ -package fr.ird.observe.services.rest.wm; - -/** - * @author Tony Chemit : chemit@codelutin.com - */ -public class ObserveRestApplicationContext { - - public static final String APPLICATION_CONTEXT_PARAMETER = ObserveRestApplicationContext.class.getName(); - - public static final String MISSING_APPLICATION_CONTEXT = - ObserveRestApplicationContext.class.getSimpleName() + " not found. You probably forgot to" + - " register " + ObserveRestApplicationListener.class.getName() + " in your web.xml"; - -// protected ObserveServiceConfig serviceConfig; -// -// protected ObserveTopiaApplicationContext rootContext; - - public void init() { - -// ObserveServiceConfig config = new ObserveServiceConfig(null); -// serviceConfig = config; -// Properties rootProperties = serviceConfig.getFlatOptions(); -// rootProperties.setProperty(TopiaConfigurationConstants.CONFIG_PERSISTENCE_CLASSES, ObserveEntityEnum.getImplementationClassesAsString()); -// -// rootContext = TopiaApplicationContextCache.getContext(rootProperties, ObserveConfigurationHelper.getCreateTopiaContextFunction(config)); - } - -// public ObserveServiceConfig getServiceConfig() { -// return serviceConfig; -// } - -// public ObserveTopiaPersistenceContext newTransaction() { -// ObserveTopiaPersistenceContext persistenceContext = rootContext.newPersistenceContext(); -// return persistenceContext; -// } - - public void close() { -// if (rootContext != null) { -// rootContext.closeContext(); -// } - } -} diff --git a/observe-services-rest/src/main/java/fr/ird/observe/services/rest/wm/ObserveRestApplicationListener.java b/observe-services-rest/src/main/java/fr/ird/observe/services/rest/wm/ObserveRestApplicationListener.java deleted file mode 100644 index 9f0d70b..0000000 --- a/observe-services-rest/src/main/java/fr/ird/observe/services/rest/wm/ObserveRestApplicationListener.java +++ /dev/null @@ -1,42 +0,0 @@ -package fr.ird.observe.services.rest.wm; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; - -/** - * @author Arnaud Thimel : thimel@codelutin.com - */ -public class ObserveRestApplicationListener implements ServletContextListener { - - private static final Log log = LogFactory.getLog(ObserveRestApplicationListener.class); - - protected ObserveRestApplicationContext context; - - @Override - public void contextInitialized(ServletContextEvent sce) { - - if (log.isInfoEnabled()) { - log.info("Initializing " + ObserveRestApplicationListener.class.getName()); - } - - context = new ObserveRestApplicationContext(); - context.init(); - - sce.getServletContext().setAttribute(ObserveRestApplicationContext.APPLICATION_CONTEXT_PARAMETER, context); - - } - - @Override - public void contextDestroyed(ServletContextEvent sce) { - - if (log.isInfoEnabled()) { - log.info("Destroying " + ObserveRestApplicationListener.class.getName()); - } - - context.close(); - } - -} diff --git a/observe-services-rest/src/main/java/fr/ird/observe/services/rest/wm/ObserveRestWebMotionFilter.java b/observe-services-rest/src/main/java/fr/ird/observe/services/rest/wm/ObserveRestWebMotionFilter.java deleted file mode 100644 index 2f9c67a..0000000 --- a/observe-services-rest/src/main/java/fr/ird/observe/services/rest/wm/ObserveRestWebMotionFilter.java +++ /dev/null @@ -1,62 +0,0 @@ -package fr.ird.observe.services.rest.wm; - -import com.google.common.base.Preconditions; -import org.debux.webmotion.server.WebMotionFilter; -import org.debux.webmotion.server.call.HttpContext; - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; - -/** - * @author Tony Chemit - chemit@codelutin.com - */ -public class ObserveRestWebMotionFilter extends WebMotionFilter { - -// protected ObserveTopiaPersistenceContext getTopiaContext(HttpContext context) { -// HttpServletRequest servletRequest = context.getRequest(); -// ObserveTopiaPersistenceContext result = (ObserveTopiaPersistenceContext) -// servletRequest -// .getAttribute(TopiaTransactionFilter.TOPIA_TRANSACTION_REQUEST_ATTRIBUTE); -// -// Preconditions.checkState(result != null, "TopiaContext not available"); -// -// return result; -// } - - protected ObserveRestApplicationContext getObserveApplicationContext(HttpContext context) { - - ServletContext servletContext = context.getServletContext(); - ObserveRestApplicationContext result = - (ObserveRestApplicationContext) servletContext - .getAttribute(ObserveRestApplicationContext.APPLICATION_CONTEXT_PARAMETER); - - Preconditions.checkState(result != null, ObserveRestApplicationContext.MISSING_APPLICATION_CONTEXT); - - return result; - - } - - public void inject(HttpContext context) { - -// final ObserveTopiaPersistenceContext persistenceContext = getTopiaContext(context); -// -// final ObserveRestApplicationContext applicationContext = getObserveApplicationContext(context); - - HttpServletRequest request = context.getRequest(); - String authenticationToken = request.getHeader("authenticationToken"); - -// DefaultServiceContext serviceContext = new DefaultServiceContext(applicationContext.getServiceConfig(), new Supplier<ObserveTopiaPersistenceContext>() { -// @Override -// public ObserveTopiaPersistenceContext get() { -// return persistenceContext; -// } -// }, authenticationToken); -// -// ServiceFactory serviceFactory = serviceContext.getServiceFactory(); -// request.setAttribute("serviceFactory", serviceFactory); - - doProcess(); - } - - -} diff --git a/observe-services-rest/src/main/resources/mapping b/observe-services-rest/src/main/resources/mapping deleted file mode 100644 index 7be48ba..0000000 --- a/observe-services-rest/src/main/resources/mapping +++ /dev/null @@ -1,28 +0,0 @@ -[config] -package.base=fr.inra.agrosyst.services.rest.wm -default.render=fr.inra.agrosyst.services.rest.wm.AgrosystJsonRender -server.controller.scope=request -server.listener.class=fr.inra.agrosyst.services.rest.wm.AgrosystServerListener - -[filters] -* /* AgrosystRestWebMotionFilter.inject - -[actions] -GET,POST /context/NavigationContextService/{method} action:NavigationContextServiceRest.{method} -GET,POST /domain/DomainService/{method} action:DomainServiceRest.{method} -GET,POST /generic/GenericEntityService/{method} action:GenericEntityServiceRest.{method} -GET,POST /growingplan/GrowingPlanService/{method} action:GrowingPlanServiceRest.{method} -GET,POST /growingsystem/GrowingSystemService/{method} action:GrowingSystemServiceRest.{method} -GET,POST /managementmode/ManagementModeService/{method} action:ManagementModeServiceRest.{method} -GET,POST /network/NetworkService/{method} action:NetworkServiceRest.{method} -GET,POST /plot/PlotService/{method} action:PlotServiceRest.{method} -GET,POST /practiced/PracticedCropCycleService/{method} action:PracticedCropCycleServiceRest.{method} -GET,POST /practiced/PracticedSystemService/{method} action:PracticedSystemServiceRest.{method} -GET,POST /effective/EffectiveCropCycleService/{method} action:EffectiveCropCycleServiceRest.{method} -GET,POST /referential/ImportService/{method} action:ImportServiceRest.{method} -GET,POST /referential/ExportService/{method} action:ExportServiceRest.{method} -GET,POST /referential/ReferentialService/{method} action:ReferentialServiceRest.{method} -GET,POST /security/AuthenticationService/{method} action:AuthenticationServiceRest.{method} -GET,POST /security/AuthorizationService/{method} action:AuthorizationServiceRest.{method} -GET,POST /security/BusinessAuthorizationService/{method} action:BusinessAuthorizationServiceRest.{method} -GET,POST /users/UserService/{method} action:UserServiceRest.{method} diff --git a/observe-services-rest/src/main/webapp/WEB-INF/web.xml b/observe-services-rest/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d0c6b38..0000000 --- a/observe-services-rest/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,36 +0,0 @@ -<!-- - #%L - Agrosyst :: Services :: REST by WebMotion - $Id: web.xml 2774 2014-01-17 17:42:48Z athimel $ - $HeadURL: https://svn.codelutin.com/agrosyst/trunk/agrosyst-services-rest-webmotion/sr... $ - %% - Copyright (C) 2013 - 2014 INRA - %% - INRA - Tous droits réservés - #L% - --> -<web-app version="3.0" - xmlns="http://java.sun.com/xml/ns/javaee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee - http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" > - - <display-name>Agrosyst REST API by WebMotion</display-name> - - <filter> - <filter-name>topiaTransaction</filter-name> - <filter-class> - fr.inra.agrosyst.services.rest.wm.AgrosystRestTransactionFilter - </filter-class> - </filter> - - <filter-mapping> - <filter-name>topiaTransaction</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - - <listener> - <listener-class>fr.inra.agrosyst.services.rest.wm.AgrosystRestApplicationListener</listener-class> - </listener> - -</web-app> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.