dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30355
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15409: enabled export of certain tracker objects
------------------------------------------------------------
revno: 15409
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-05-26 13:54:16 +0200
message:
enabled export of certain tracker objects
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSection.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeGroup.java
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/MetaData.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-api/src/main/java/org/hisp/dhis/program/ProgramStage.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java 2014-05-23 12:36:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java 2014-05-26 11:54:16 +0000
@@ -36,6 +36,7 @@
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import org.hisp.dhis.common.BaseIdentifiableObject;
import org.hisp.dhis.common.DxfNamespaces;
+import org.hisp.dhis.common.IdentifiableObject;
import org.hisp.dhis.common.view.DetailedView;
import org.hisp.dhis.common.view.ExportView;
import org.hisp.dhis.dataentryform.DataEntryForm;
@@ -416,4 +417,41 @@
this.reportDateToUse = reportDateToUse;
}
+ @Override
+ public void mergeWith( IdentifiableObject other )
+ {
+ super.mergeWith( other );
+
+ if ( other.getClass().isInstance( this ) )
+ {
+ ProgramStage programStage = (ProgramStage) other;
+
+ description = programStage.getDescription();
+ minDaysFromStart = programStage.getMinDaysFromStart();
+ irregular = programStage.getIrregular();
+ program = programStage.getProgram();
+ dataEntryForm = programStage.getDataEntryForm();
+ standardInterval = programStage.getStandardInterval();
+ reportDateDescription = programStage.getReportDateDescription();
+ autoGenerateEvent = programStage.isAutoGenerated();
+ validCompleteOnly = programStage.getValidCompleteOnly();
+ displayGenerateEventBox = programStage.getDisplayGenerateEventBox();
+ captureCoordinates = programStage.getCaptureCoordinates();
+ blockEntryForm = programStage.getBlockEntryForm();
+ remindCompleted = programStage.getRemindCompleted();
+ generatedByEnrollmentDate = programStage.getGeneratedByEnrollmentDate();
+ allowGenerateNextVisit = programStage.getAllowGenerateNextVisit();
+ openAfterEnrollment = programStage.getOpenAfterEnrollment();
+ reportDateToUse = programStage.getReportDateToUse();
+
+ programStageDataElements.clear();
+ programStageDataElements.addAll( programStage.getProgramStageDataElements() );
+
+ programStageSections.clear();
+ programStageSections.addAll( programStage.getProgramStageSections() );
+
+ reminders.clear();
+ reminders.addAll( programStage.getReminders() );
+ }
+ }
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSection.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSection.java 2014-05-23 15:28:46 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSection.java 2014-05-26 11:54:16 +0000
@@ -43,7 +43,6 @@
/**
* @author Chau Thu Tran
- * @version ProgramStageSection.java 11:07:27 AM Aug 22, 2012 $
*/
@JacksonXmlRootElement( localName = "programStageSection", namespace = DxfNamespaces.DXF_2_0 )
public class ProgramStageSection
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeGroup.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeGroup.java 2014-05-26 11:54:16 +0000
@@ -37,6 +37,7 @@
import org.hisp.dhis.common.BaseIdentifiableObject;
import org.hisp.dhis.common.DxfNamespaces;
import org.hisp.dhis.common.IdentifiableObject;
+import org.hisp.dhis.common.annotation.Scanned;
import org.hisp.dhis.common.view.DetailedView;
import org.hisp.dhis.common.view.ExportView;
@@ -59,6 +60,7 @@
private Integer sortOrder;
+ @Scanned
private List<TrackedEntityAttribute> attributes = new ArrayList<TrackedEntityAttribute>();
// -------------------------------------------------------------------------
=== 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-20 16:56:12 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java 2014-05-26 11:54:16 +0000
@@ -195,12 +195,6 @@
importClasses.remove( BaseDimensionalObject.class );
// tracker types are not enabled for meta-data import-export yet
- exportClasses.remove( Program.class );
- exportClasses.remove( ProgramStage.class );
- exportClasses.remove( RelationshipType.class );
- exportClasses.remove( TrackedEntity.class );
- exportClasses.remove( TrackedEntityAttribute.class );
- exportClasses.remove( TrackedEntityAttributeGroup.class );
importClasses.remove( Program.class );
importClasses.remove( ProgramStage.class );
importClasses.remove( RelationshipType.class );
@@ -211,8 +205,6 @@
// special class which is created on demand in association with other objects
exportClasses.remove( DataElementOperand.class );
importClasses.remove( DataElementOperand.class );
- exportClasses.remove( CategoryOptionGroupSet.class );
- importClasses.remove( CategoryOptionGroupSet.class );
allExportClasses.put( MetaDataFilter.class, "metaDataFilters" );
exportClasses.remove( MetaDataFilter.class );
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java 2014-04-03 16:03:26 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/MetaData.java 2014-05-26 11:54:16 +0000
@@ -198,18 +198,18 @@
private List<DataSet> dataSets = new ArrayList<DataSet>();
+ private List<MetaDataFilter> metaDataFilters = new ArrayList<MetaDataFilter>();
+
+ private List<Event> events = new ArrayList<Event>();
+
+ private List<EventReport> eventReports = new ArrayList<EventReport>();
+
private List<Program> programs = new ArrayList<Program>();
private List<ProgramStage> programStages = new ArrayList<ProgramStage>();
private List<RelationshipType> relationshipTypes = new ArrayList<RelationshipType>();
- private List<MetaDataFilter> metaDataFilters = new ArrayList<MetaDataFilter>();
-
- private List<Event> events = new ArrayList<Event>();
-
- private List<EventReport> eventReports = new ArrayList<EventReport>();
-
private List<TrackedEntity> trackedEntities = new ArrayList<TrackedEntity>();
private List<TrackedEntityAttribute> trackedEntityAttributes = new ArrayList<TrackedEntityAttribute>();