← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7356: added strategy to importOptions, use with ?strategy=

 

------------------------------------------------------------
revno: 7356
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-06-23 13:02:41 +0300
message:
  added strategy to importOptions, use with ?strategy=
modified:
  dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ImportOptions.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/ImportOptions.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ImportOptions.java	2012-05-07 16:32:54 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ImportOptions.java	2012-06-23 10:02:41 +0000
@@ -42,7 +42,9 @@
     private boolean dryRun = false;
 
     private ImportStrategy importStrategy;
-    
+
+    private String strategy;
+
     private boolean skipExistingCheck;
 
     private static final ImportOptions DEFAULT_OPTIONS = new ImportOptions( IdentifiableProperty.UID, IdentifiableProperty.UID, false, ImportStrategy.NEW_AND_UPDATES, false );
@@ -118,6 +120,11 @@
         this.dryRun = dryRun;
     }
 
+    public void setStrategy( String strategy )
+    {
+        this.importStrategy = strategy != null ? ImportStrategy.valueOf( strategy.toUpperCase() ) : null;
+    }
+
     public void setImportStrategy( String strategy )
     {
         this.importStrategy = strategy != null ? ImportStrategy.valueOf( strategy.toUpperCase() ) : null;