dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #00822
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 248: - Added name property to Period for mapping client. - Work in progress on technical doc.
------------------------------------------------------------
revno: 248
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Thu 2009-04-23 23:12:33 +0200
message:
- Added name property to Period for mapping client. - Work in progress on technical doc.
modified:
dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/impl/DefaultDataMartService.java
dhis-2/dhis-services/dhis-service-datamart-default/src/main/resources/META-INF/dhis/beans.xml
docs/Technical Architecture DHIS 2.doc
gis/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetPeriodsByPeriodTypeAction.java
gis/dhis-web-mapping/src/main/webapp/dhis-web-mapping/jsonPeriods.vm
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/impl/DefaultDataMartService.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/impl/DefaultDataMartService.java 2009-03-13 11:51:35 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/impl/DefaultDataMartService.java 2009-04-23 21:12:33 +0000
@@ -90,35 +90,7 @@
{
this.crossTabService = crossTabService;
}
-
- private DataElementService dataElementService;
-
- public void setDataElementService( DataElementService dataElementService )
- {
- this.dataElementService = dataElementService;
- }
-
- private IndicatorService indicatorService;
-
- public void setIndicatorService( IndicatorService indicatorService )
- {
- this.indicatorService = indicatorService;
- }
-
- private PeriodService periodService;
-
- public void setPeriodService( PeriodService periodService )
- {
- this.periodService = periodService;
- }
-
- private DataElementCategoryOptionComboService categoryOptionComboService;
-
- public void setCategoryOptionComboService( DataElementCategoryOptionComboService categoryOptionComboService )
- {
- this.categoryOptionComboService = categoryOptionComboService;
- }
-
+
private DataElementDataMart dataElementDataMart;
public void setDataElementDataMart( DataElementDataMart dataElementDataMart )
@@ -168,6 +140,34 @@
this.averageBoolAggregator = averageBooleanDataElementAggregator;
}
+ private DataElementService dataElementService;
+
+ public void setDataElementService( DataElementService dataElementService )
+ {
+ this.dataElementService = dataElementService;
+ }
+
+ private IndicatorService indicatorService;
+
+ public void setIndicatorService( IndicatorService indicatorService )
+ {
+ this.indicatorService = indicatorService;
+ }
+
+ private PeriodService periodService;
+
+ public void setPeriodService( PeriodService periodService )
+ {
+ this.periodService = periodService;
+ }
+
+ private DataElementCategoryOptionComboService categoryOptionComboService;
+
+ public void setCategoryOptionComboService( DataElementCategoryOptionComboService categoryOptionComboService )
+ {
+ this.categoryOptionComboService = categoryOptionComboService;
+ }
+
// -------------------------------------------------------------------------
// DataMartInternalProcess implementation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/resources/META-INF/dhis/beans.xml 2009-03-14 09:35:20 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/resources/META-INF/dhis/beans.xml 2009-04-23 21:12:33 +0000
@@ -43,20 +43,12 @@
ref="org.hisp.dhis.datamart.DataMartStore"/>
<property name="crossTabService"
ref="org.hisp.dhis.datamart.crosstab.CrossTabService"/>
- <property name="dataElementService"
- ref="org.hisp.dhis.dataelement.DataElementService"/>
- <property name="indicatorService"
- ref="org.hisp.dhis.indicator.IndicatorService"/>
- <property name="periodService"
- ref="org.hisp.dhis.period.PeriodService"/>
- <property name="categoryOptionComboService"
- ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService"/>
<property name="dataElementDataMart"
ref="org.hisp.dhis.datamart.dataelement.DataElementDataMart"/>
+ <property name="indicatorDataMart"
+ ref="org.hisp.dhis.datamart.indicator.IndicatorDataMart"/>
<property name="calculatedDataElementDataMart"
ref="org.hisp.dhis.datamart.calculateddataelement.CalculatedDataElementDataMart"/>
- <property name="indicatorDataMart"
- ref="org.hisp.dhis.datamart.indicator.IndicatorDataMart"/>
<property name="sumIntAggregator"
ref="org.hisp.dhis.datamart.aggregation.dataelement.SumIntAggregator"/>
<property name="averageIntAggregator"
@@ -65,6 +57,14 @@
ref="org.hisp.dhis.datamart.aggregation.dataelement.SumBoolAggregator"/>
<property name="averageBoolAggregator"
ref="org.hisp.dhis.datamart.aggregation.dataelement.AverageBoolAggregator"/>
+ <property name="dataElementService"
+ ref="org.hisp.dhis.dataelement.DataElementService"/>
+ <property name="indicatorService"
+ ref="org.hisp.dhis.indicator.IndicatorService"/>
+ <property name="periodService"
+ ref="org.hisp.dhis.period.PeriodService"/>
+ <property name="categoryOptionComboService"
+ ref="org.hisp.dhis.dataelement.DataElementCategoryOptionComboService"/>
</bean>
<!-- Crosstab -->
=== modified file 'docs/Technical Architecture DHIS 2.doc'
Binary files docs/Technical Architecture DHIS 2.doc 2009-04-23 19:30:27 +0000 and docs/Technical Architecture DHIS 2.doc 2009-04-23 21:12:33 +0000 differ
=== modified file 'gis/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetPeriodsByPeriodTypeAction.java'
--- gis/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetPeriodsByPeriodTypeAction.java 2009-04-20 16:57:53 +0000
+++ gis/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetPeriodsByPeriodTypeAction.java 2009-04-23 21:12:33 +0000
@@ -31,6 +31,7 @@
import java.util.Collections;
import java.util.List;
+import org.hisp.dhis.i18n.I18nFormat;
import org.hisp.dhis.period.Period;
import org.hisp.dhis.period.PeriodService;
import org.hisp.dhis.period.PeriodType;
@@ -55,6 +56,13 @@
{
this.periodService = periodService;
}
+
+ private I18nFormat format;
+
+ public void setFormat( I18nFormat format )
+ {
+ this.format = format;
+ }
// -------------------------------------------------------------------------
// Input
@@ -91,6 +99,11 @@
{
object = new ArrayList<Period>( periodService.getPeriodsByPeriodType( periodType ) );
+ for ( Period period : object )
+ {
+ period.setName( format.formatPeriod( period ) );
+ }
+
Collections.sort( object, new PeriodComparator() );
}
=== modified file 'gis/dhis-web-mapping/src/main/webapp/dhis-web-mapping/jsonPeriods.vm'
--- gis/dhis-web-mapping/src/main/webapp/dhis-web-mapping/jsonPeriods.vm 2009-04-17 21:35:32 +0000
+++ gis/dhis-web-mapping/src/main/webapp/dhis-web-mapping/jsonPeriods.vm 2009-04-23 21:12:33 +0000
@@ -4,7 +4,8 @@
{
"id": $!{period.id},
"startDate": "$!format.formatDate( ${period.startDate} )",
- "endDate": "$!format.formatDate( ${period.endDate} )"
+ "endDate": "$!format.formatDate( ${period.endDate} )",
+ "name": "$!encoder.jsEncode( ${period.name} )"
}#if( $velocityCount < $size ),#end
#end
] }
--
Trunk
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.