← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7524: Fixes issues with assumeTrue=false exporting

 

------------------------------------------------------------
revno: 7524
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-07-06 10:37:24 +0200
message:
  Fixes issues with assumeTrue=false exporting
modified:
  dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultExportService.java
  dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExportService.java
  dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Options.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/WebOptions.java


--
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-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultExportService.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultExportService.java	2012-06-27 15:59:59 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultExportService.java	2012-07-06 08:37:24 +0000
@@ -73,21 +73,9 @@
     //-------------------------------------------------------------------------------------------------------
 
     @Override
-    public MetaData getMetaData()
-    {
-        return getMetaData( Options.getDefaultOptions(), null );
-    }
-
-    @Override
-    public MetaData getMetaData( TaskId taskId )
-    {
-        return getMetaData( Options.getDefaultOptions(), taskId );
-    }
-
-    @Override
     public MetaData getMetaData( Options options )
     {
-        return getMetaData( Options.getDefaultOptions(), null );
+        return getMetaData( options, null );
     }
 
     @Override

=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExportService.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExportService.java	2012-06-27 15:59:59 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExportService.java	2012-07-06 08:37:24 +0000
@@ -34,10 +34,6 @@
  */
 public interface ExportService
 {
-    MetaData getMetaData();
-
-    MetaData getMetaData(TaskId taskId);
-
     MetaData getMetaData( Options options );
 
     MetaData getMetaData( Options options, TaskId taskId );

=== modified file 'dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Options.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Options.java	2012-05-27 21:50:00 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Options.java	2012-07-06 08:37:24 +0000
@@ -42,13 +42,6 @@
     // Static helpers
     //--------------------------------------------------------------------------
 
-    static private final Options DEFAULT_OPTIONS = new Options( true );
-
-    static public Options getDefaultOptions()
-    {
-        return DEFAULT_OPTIONS;
-    }
-
     protected static String stringAsString( String str, String defaultValue )
     {
         if ( str == null )
@@ -66,17 +59,17 @@
             return null;
         }
 
-        String patterns[] = new String[]{
+        String patterns[] = new String[] {
             "dd/MM/yyyy",
             "MM/yyyy",
             "yyyy"
         };
 
-        for(String pattern : patterns)
+        for ( String pattern : patterns )
         {
-            Date date = getDateByPattern(str, pattern);
+            Date date = getDateByPattern( str, pattern );
 
-            if(date != null)
+            if ( date != null )
             {
                 return date;
             }
@@ -160,27 +153,12 @@
     // Constructors
     //--------------------------------------------------------------------------
 
-    public Options()
-    {
-    }
-
-    public Options( boolean assumeTrue )
-    {
-        this.assumeTrue = assumeTrue;
-    }
-
     public Options( Map<String, String> options )
     {
         this.options = options;
         this.assumeTrue = options.get( "assumeTrue" ) == null || options.get( "assumeTrue" ).equalsIgnoreCase( "true" );
     }
 
-    public Options( Map<String, String> options, boolean assumeTrue )
-    {
-        this.options = options;
-        this.assumeTrue = assumeTrue;
-    }
-
     //--------------------------------------------------------------------------
     // Get options for classes/strings etc
     //--------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/WebOptions.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/WebOptions.java	2012-05-28 14:25:12 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/WebOptions.java	2012-07-06 08:37:24 +0000
@@ -37,25 +37,11 @@
 public class WebOptions
     extends Options
 {
-    public WebOptions()
-    {
-    }
-
-    public WebOptions( boolean assumeTrue )
-    {
-        super( assumeTrue );
-    }
-
     public WebOptions( Map<String, String> options )
     {
         super( options );
     }
 
-    public WebOptions( Map<String, String> options, boolean assumeTrue )
-    {
-        super( options, assumeTrue );
-    }
-
     //--------------------------------------------------------------------------
     // Getters for standard web options
     //--------------------------------------------------------------------------