dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30361
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15415: minor fixes
------------------------------------------------------------
revno: 15415
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-05-26 15:32:42 +0200
message:
minor fixes
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.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-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java 2014-05-26 13:29:12 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java 2014-05-26 13:32:42 +0000
@@ -28,12 +28,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
import org.hisp.dhis.attribute.Attribute;
import org.hisp.dhis.chart.Chart;
import org.hisp.dhis.common.BaseDimensionalObject;
@@ -89,6 +85,10 @@
import org.hisp.dhis.validation.ValidationRule;
import org.hisp.dhis.validation.ValidationRuleGroup;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
/**
* @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
*/
@@ -108,7 +108,7 @@
static
{
- allExportClasses = new LinkedHashMap<Class<? extends IdentifiableObject>, String>();
+ allExportClasses = Maps.newLinkedHashMap();
allExportClasses.put( SqlView.class, "sqlViews" );
allExportClasses.put( Concept.class, "concepts" );
@@ -182,8 +182,8 @@
allExportClasses.put( BaseDimensionalObject.class, "dimensions" );
- exportClasses = new LinkedHashMap<Class<? extends IdentifiableObject>, String>( allExportClasses );
- importClasses = new LinkedHashMap<Class<? extends IdentifiableObject>, String>( allExportClasses );
+ exportClasses = Maps.newLinkedHashMap( allExportClasses );
+ importClasses = Maps.newLinkedHashMap( allExportClasses );
// this is considered data, and is not available for meta-data export/import
exportClasses.remove( MessageConversation.class );
@@ -203,7 +203,7 @@
exportClasses.remove( MetaDataFilter.class );
importClasses.remove( MetaDataFilter.class );
- deletableClasses = new LinkedHashMap<Class<? extends IdentifiableObject>, String>( importClasses );
+ deletableClasses = Maps.newLinkedHashMap( importClasses );
deletableClasses.remove( User.class );
deletableClasses.remove( UserGroup.class );
deletableClasses.remove( UserAuthorityGroup.class );
@@ -226,7 +226,7 @@
public static List<Class<? extends IdentifiableObject>> getImportClasses()
{
- return new ArrayList<Class<? extends IdentifiableObject>>( importClasses.keySet() );
+ return Lists.newArrayList( importClasses.keySet() );
}
public static Map<Class<? extends IdentifiableObject>, String> getDeletableMap()
@@ -236,6 +236,6 @@
public static List<Class<? extends IdentifiableObject>> getDeletableClasses()
{
- return new ArrayList<Class<? extends IdentifiableObject>>( deletableClasses.keySet() );
+ return Lists.newArrayList( deletableClasses.keySet() );
}
}