← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13742: moved fred-api from /api-fred => /ohie/fred, also moved /api-fred/csd => /ohie/csd

 

------------------------------------------------------------
revno: 13742
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-01-15 21:09:56 +0700
message:
  moved fred-api from /api-fred => /ohie/fred, also moved /api-fred/csd => /ohie/csd
modified:
  dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/RedirectController.java
  dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityController.java
  dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FredController.java
  dhis-2/dhis-web/dhis-web-ohie/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/RedirectController.java'
--- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/RedirectController.java	2014-01-15 13:10:05 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/RedirectController.java	2014-01-15 14:09:56 +0000
@@ -40,9 +40,9 @@
 @Controller
 public class RedirectController
 {
-    @RequestMapping(value = { "/api-fred", "/" })
+    @RequestMapping(value = { "/ohie", "/" })
     public void redirectToCurrentVersion( HttpServletResponse response ) throws IOException
     {
-        response.sendRedirect( "/api-fred/v1" );
+        response.sendRedirect( "/ohie/fred/v1" );
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityController.java'
--- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityController.java	2014-01-15 13:10:05 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FacilityController.java	2014-01-15 14:09:56 +0000
@@ -582,7 +582,7 @@
 
             // temporary fix since ControllerLinkBuilder can't handle cross-servlet controllers
             level.put( "href", linkTo( OrganisationUnitLevelController.class ).slash( organisationUnitLevel.getUid() ).toString()
-                .replace( "/api-fred", "/api" ) );
+                .replace( "/ohie", "/api" ) );
 
             level.put( "name", organisationUnitLevel.getName() );
             level.put( "level", organisationUnitLevel.getLevel() );

=== modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FredController.java'
--- dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FredController.java	2014-01-15 13:10:05 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/java/org/hisp/dhis/web/ohie/fred/webapi/v1/controller/FredController.java	2014-01-15 14:09:56 +0000
@@ -38,12 +38,12 @@
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
-@Controller(value = "fred-controller-" + FredController.PREFIX)
-@RequestMapping(value = FredController.PREFIX)
-@PreAuthorize("hasRole('M_dhis-web-api-fred') or hasRole('ALL')")
+@Controller( value = "fred-controller-" + FredController.PREFIX )
+@RequestMapping( value = FredController.PREFIX )
+@PreAuthorize( "hasRole('M_dhis-web-api-fred') or hasRole('ALL')" )
 public class FredController
 {
-    public static final String PREFIX = "v1";
+    public static final String PREFIX = "fred/v1";
 
     @RequestMapping( value = "" )
     public void redirectToV1( HttpServletResponse response ) throws IOException

=== modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-ohie/src/main/webapp/WEB-INF/web.xml	2014-01-15 13:30:51 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/webapp/WEB-INF/web.xml	2014-01-15 14:09:56 +0000
@@ -14,7 +14,7 @@
     <filter-class>org.hisp.dhis.servlet.filter.HttpRedirectFilter</filter-class>
     <init-param>
       <param-name>redirectPath</param-name>
-      <param-value>api-fred</param-value>
+      <param-value>ohie</param-value>
     </init-param>
   </filter>
   <filter>
@@ -68,15 +68,15 @@
   </filter-mapping>
   <filter-mapping>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <url-pattern>/api-fred/*</url-pattern>
+    <url-pattern>/ohie/*</url-pattern>
   </filter-mapping>
   <filter-mapping>
     <filter-name>hiddenHttpMethodFilter</filter-name>
-    <url-pattern>/api-fred/*</url-pattern>
+    <url-pattern>/ohie/*</url-pattern>
   </filter-mapping>
   <filter-mapping>
     <filter-name>OpenSessionInViewFilter</filter-name>
-    <url-pattern>/api-fred/*</url-pattern>
+    <url-pattern>/ohie/*</url-pattern>
   </filter-mapping>
   <filter-mapping>
     <filter-name>springSecurityFilterChain</filter-name>
@@ -118,12 +118,12 @@
 
   <servlet-mapping>
     <servlet-name>ohie</servlet-name>
-    <url-pattern>/api-fred</url-pattern>
+    <url-pattern>/ohie</url-pattern>
   </servlet-mapping>
 
   <servlet-mapping>
     <servlet-name>ohie</servlet-name>
-    <url-pattern>/api-fred/*</url-pattern>
+    <url-pattern>/ohie/*</url-pattern>
   </servlet-mapping>
 
   <servlet-mapping>

=== modified file 'dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml	2014-01-15 13:30:51 +0000
+++ dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml	2014-01-15 14:09:56 +0000
@@ -73,15 +73,15 @@
   </filter-mapping>
   <filter-mapping>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <url-pattern>/api-fred/*</url-pattern>
+    <url-pattern>/ohie/*</url-pattern>
   </filter-mapping>
   <filter-mapping>
     <filter-name>hiddenHttpMethodFilter</filter-name>
-    <url-pattern>/api-fred/*</url-pattern>
+    <url-pattern>/ohie/*</url-pattern>
   </filter-mapping>
   <filter-mapping>
     <filter-name>OpenSessionInViewFilter</filter-name>
-    <url-pattern>/api-fred/*</url-pattern>
+    <url-pattern>/ohie/*</url-pattern>
   </filter-mapping>
   <filter-mapping>
     <filter-name>OpenSessionInViewFilter</filter-name>
@@ -157,16 +157,16 @@
     <url-pattern>/api/*</url-pattern>
   </servlet-mapping>
 
-  <!-- FRED Web-API -->
+  <!-- OHIE Web-API -->
 
   <servlet-mapping>
     <servlet-name>ohie</servlet-name>
-    <url-pattern>/api-fred</url-pattern>
+    <url-pattern>/ohie</url-pattern>
   </servlet-mapping>
 
   <servlet-mapping>
     <servlet-name>ohie</servlet-name>
-    <url-pattern>/api-fred/*</url-pattern>
+    <url-pattern>/ohie/*</url-pattern>
   </servlet-mapping>
   
 </web-app>