← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3498: Added licenses

 

------------------------------------------------------------
revno: 3498
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-05-01 11:07:35 +0200
message:
  Added licenses
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultDetailsAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/LoadPeriodsAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/CompleteDataEntryAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/CustomDataEntryAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataEntryAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataRecordingSelectAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/MultiDataEntrySelectAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ProgramStageCustomDataEntryAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveExecutionDateAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveProvidingFacilityAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValueAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ValidateProgramInstanceAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GetPatientDetailsAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/screen/DataEntryScreenManager.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/screen/DefaultDataEntryScreenManager.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/state/DefaultSelectedStateManager.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/state/PeriodGenericManager.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/state/PreviousPeriodsAction.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-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java	2011-03-31 01:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java	2011-05-01 09:07:35 +0000
@@ -34,8 +34,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.caseaggregation.CaseAggregationCondition;
 import org.hisp.dhis.caseaggregation.CaseAggregationConditionService;
 import org.hisp.dhis.caseentry.state.PeriodGenericManager;
@@ -60,8 +58,6 @@
 public class CaseAggregationResultAction
     implements Action
 {
-    Log log = LogFactory.getLog( getClass() );
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultDetailsAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultDetailsAction.java	2011-03-31 01:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultDetailsAction.java	2011-05-01 09:07:35 +0000
@@ -151,5 +151,4 @@
         
         return SUCCESS;
     }
-
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/LoadPeriodsAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/LoadPeriodsAction.java	2011-03-31 01:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/LoadPeriodsAction.java	2011-05-01 09:07:35 +0000
@@ -1,3 +1,30 @@
+/*
+ * Copyright (c) 2004-2009, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 package org.hisp.dhis.caseentry.action.caseaggregation;
 
 import java.util.ArrayList;
@@ -118,5 +145,4 @@
 
         return periods;
     }
-
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/CompleteDataEntryAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/CompleteDataEntryAction.java	2011-03-31 01:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/CompleteDataEntryAction.java	2011-05-01 09:07:35 +0000
@@ -38,8 +38,6 @@
 
 /**
  * @author Viet Nguyen
- * 
- * @version $Id$
  */
 public class CompleteDataEntryAction
     implements Action
@@ -157,5 +155,4 @@
         
         return SUCCESS;
     }
-
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/CustomDataEntryAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/CustomDataEntryAction.java	2011-04-24 15:50:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/CustomDataEntryAction.java	2011-05-01 09:07:35 +0000
@@ -32,8 +32,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.caseentry.screen.DataEntryScreenManager;
 import org.hisp.dhis.caseentry.state.SelectedStateManager;
 import org.hisp.dhis.dataelement.DataElement;
@@ -62,15 +60,10 @@
 
 /**
  * @author Viet Nguyen
- * @version $Id$
- * 
  */
-
 public class CustomDataEntryAction
     implements Action
 {
-    Log log = LogFactory.getLog( CustomDataEntryAction.class );
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataEntryAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataEntryAction.java	2011-03-31 01:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataEntryAction.java	2011-05-01 09:07:35 +0000
@@ -263,8 +263,7 @@
             optionMap.put( dataElement.getId(), dataElement.getCategoryCombo().getOptionCombos() );
         }
 
-        Collection<ProgramInstance> progamInstances = programInstanceService.getProgramInstances( patient, program,
-            false );
+        Collection<ProgramInstance> progamInstances = programInstanceService.getProgramInstances( patient, program, false );
 
         programInstance = progamInstances.iterator().next();
 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataRecordingSelectAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataRecordingSelectAction.java	2011-03-31 05:48:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/DataRecordingSelectAction.java	2011-05-01 09:07:35 +0000
@@ -31,8 +31,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.caseentry.state.SelectedStateManager;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.patient.Patient;
@@ -55,8 +53,6 @@
 public class DataRecordingSelectAction
     implements Action
 {
-    Log log = LogFactory.getLog( DataRecordingSelectAction.class );
-
     private static final String DATAENTRY_FORM = "dataentryform";
 
     private static final String CUSTOM_DATAENTRY_FORM = "customentryform";

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java	2011-03-31 01:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/GetDataRecordsAction.java	2011-05-01 09:07:35 +0000
@@ -1,3 +1,30 @@
+/*
+ * Copyright (c) 2004-2009, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 package org.hisp.dhis.caseentry.action.caseentry;
 
 import java.util.ArrayList;
@@ -129,7 +156,7 @@
         return program;
     }
 
-    Collection<ProgramInstance> programInstances = new ArrayList<ProgramInstance>();
+    private Collection<ProgramInstance> programInstances = new ArrayList<ProgramInstance>();
 
     public Collection<ProgramInstance> getProgramInstances()
     {
@@ -280,5 +307,4 @@
 
         return SUCCESS;
     }
-
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/MultiDataEntrySelectAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/MultiDataEntrySelectAction.java	2011-03-31 01:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/MultiDataEntrySelectAction.java	2011-05-01 09:07:35 +0000
@@ -1,3 +1,30 @@
+/*
+ * Copyright (c) 2004-2009, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 package org.hisp.dhis.caseentry.action.caseentry;
 
 import java.util.ArrayList;
@@ -139,5 +166,4 @@
 
         return SUCCESS;
     }
-
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ProgramStageCustomDataEntryAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ProgramStageCustomDataEntryAction.java	2011-04-24 15:50:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ProgramStageCustomDataEntryAction.java	2011-05-01 09:07:35 +0000
@@ -1,3 +1,30 @@
+/*
+ * Copyright (c) 2004-2009, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 package org.hisp.dhis.caseentry.action.caseentry;
 
 import java.util.ArrayList;
@@ -5,8 +32,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.caseentry.screen.DataEntryScreenManager;
 import org.hisp.dhis.caseentry.state.SelectedStateManager;
 import org.hisp.dhis.dataelement.DataElement;
@@ -30,8 +55,6 @@
 
 public class ProgramStageCustomDataEntryAction implements Action
 {
-    Log log = LogFactory.getLog( ProgramStageCustomDataEntryAction.class );
-    
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveExecutionDateAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveExecutionDateAction.java	2011-03-31 01:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveExecutionDateAction.java	2011-05-01 09:07:35 +0000
@@ -24,6 +24,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 package org.hisp.dhis.caseentry.action.caseentry;
 
 import java.util.Date;
@@ -136,6 +137,5 @@
         }
 
         return SUCCESS;
-
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveProvidingFacilityAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveProvidingFacilityAction.java	2011-03-31 01:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveProvidingFacilityAction.java	2011-05-01 09:07:35 +0000
@@ -24,6 +24,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 package org.hisp.dhis.caseentry.action.caseentry;
 
 import java.util.Collection;

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValueAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValueAction.java	2011-03-31 01:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/SaveValueAction.java	2011-05-01 09:07:35 +0000
@@ -24,6 +24,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 package org.hisp.dhis.caseentry.action.caseentry;
 
 import java.util.Collection;

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ValidateProgramInstanceAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ValidateProgramInstanceAction.java	2011-04-29 07:41:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ValidateProgramInstanceAction.java	2011-05-01 09:07:35 +0000
@@ -37,7 +37,6 @@
 import org.hisp.dhis.caseentry.state.SelectedStateManager;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.patient.Patient;
 import org.hisp.dhis.patientdatavalue.PatientDataValue;
@@ -61,7 +60,6 @@
 public class ValidateProgramInstanceAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -80,8 +78,6 @@
     // Input
     // -------------------------------------------------------------------------
 
-    private I18nFormat format;
-
     private I18n i18n;
 
     // -------------------------------------------------------------------------
@@ -116,11 +112,6 @@
         this.programStageInstanceService = programStageInstanceService;
     }
 
-    public void setFormat( I18nFormat format )
-    {
-        this.format = format;
-    }
-
     public void setProgramInstanceService( ProgramInstanceService programInstanceService )
     {
         this.programInstanceService = programInstanceService;
@@ -170,8 +161,7 @@
 
         ProgramStage programStage = selectedStateManager.getSelectedProgramStage();
 
-        Collection<ProgramInstance> progamInstances = programInstanceService.getProgramInstances( patient, program,
-            false );
+        Collection<ProgramInstance> progamInstances = programInstanceService.getProgramInstances( patient, program, false );
 
         ProgramInstance programInstance = progamInstances.iterator().next();
 
@@ -181,17 +171,15 @@
         // ---------------------------------------------------------------------
         // Get selected objects
         // ---------------------------------------------------------------------
+        
         Set<ProgramStageDataElement> dataElements = programStage.getProgramStageDataElements();
 
         for ( ProgramStageDataElement psDataElement : dataElements )
         {
             DataElement dataElement = psDataElement.getDataElement();
             
-            // resultDEMultiStages
             checkDataElementInMultiStage( programStageInstance, organisationUnit, dataElement );
-
         }
-        // end Check validation for dataElement into the Stage
 
         // ---------------------------------------------------------------------
         // Check validations for dataelement into multi-stages
@@ -243,11 +231,9 @@
     }
 
     private void runProgramValidation( Collection<ProgramValidation> validations, ProgramInstance programInstance )
-        throws Exception
     {
         if ( validations != null )
         {
-
             for ( ProgramValidation validation : validations )
             {
                 boolean valid = programValidationService.runValidation( validation, programInstance );
@@ -258,27 +244,5 @@
                 }
             }
         }
-
-    }
-
-    private Object getObject( String type, String value )
-        throws Exception
-    {
-        if ( type.equals( DataElement.VALUE_TYPE_INT ) )
-        {
-            return Integer.valueOf( value );
-        }
-        else if ( type.equals( DataElement.VALUE_TYPE_BOOL ) )
-        {
-            return Boolean.valueOf( value );
-        }
-        else if ( type.equals( DataElement.VALUE_TYPE_DATE ) )
-        {
-            return format.parseDate( value.trim() );
-        }
-
-        return value;
-
-    }
-
+    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GetPatientDetailsAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GetPatientDetailsAction.java	2011-03-31 01:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GetPatientDetailsAction.java	2011-05-01 09:07:35 +0000
@@ -1,3 +1,30 @@
+/*
+ * Copyright (c) 2004-2009, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 package org.hisp.dhis.caseentry.action.report;
 
 import java.util.Collection;

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/screen/DataEntryScreenManager.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/screen/DataEntryScreenManager.java	2011-04-24 15:50:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/screen/DataEntryScreenManager.java	2011-05-01 09:07:35 +0000
@@ -1,5 +1,3 @@
-package org.hisp.dhis.caseentry.screen;
-
 /*
  * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
@@ -26,6 +24,9 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
+package org.hisp.dhis.caseentry.screen;
+
 import java.util.Collection;
 import java.util.Map;
 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/screen/DefaultDataEntryScreenManager.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/screen/DefaultDataEntryScreenManager.java	2011-04-24 15:50:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/screen/DefaultDataEntryScreenManager.java	2011-05-01 09:07:35 +0000
@@ -56,13 +56,11 @@
 
 /**
  * @author Viet Nguyen
- * @version $Id$
  */
 public class DefaultDataEntryScreenManager
     implements DataEntryScreenManager
 {
-
-    Log logger = LogFactory.getLog( getClass() );
+    private static final Log log = LogFactory.getLog( DefaultDataEntryScreenManager.class );
 
     private static final String DEFAULT_FORM = "defaultform";
 
@@ -1048,11 +1046,11 @@
                 
                 appendCode += metaDataCode;
 
-                // -----------------------------------------------------------
+                // -------------------------------------------------------------
                 // Check if this dataElement is from another programStage then
                 // disable
                 // If programStagsInstance is completed then disabled it
-                // -----------------------------------------------------------
+                // -------------------------------------------------------------
                 
                 disabled = "";
                 if ( programStageId != programStage.getId() || programStageInstance.isCompleted() )
@@ -1063,16 +1061,17 @@
                 {
                     appendCode += jQueryCalendar;
 
-                    // -----------------------------------------------------------
+                    // ---------------------------------------------------------
                     // Add ProvidedByOtherFacility checkbox
-                    // -----------------------------------------------------------
+                    // ---------------------------------------------------------
+                    
                     appendCode = addProvidedByOtherFacilityCheckbox( appendCode, patientDataValue );
 
                 }
 
-                // -----------------------------------------------------------
+                // -------------------------------------------------------------
                 // Get Org Unit name
-                // -----------------------------------------------------------
+                // -------------------------------------------------------------
                 
                 String orgUnitName = i18n.getString( NOTAVAILABLE );
                 if ( patientDataValue != null )
@@ -1116,6 +1115,47 @@
         return sb.toString();
     }
 
+    @Override
+    public Collection<ProgramStageDataElement> getProgramStageDataElements( String htmlCode )
+    {
+        Set<ProgramStageDataElement> result = new HashSet<ProgramStageDataElement>();
+
+        Pattern identifierPattern = Pattern
+            .compile( "id=\"value\\[([\\p{Digit}.]*)\\].(value|boolean|combo|date):value\\[([\\p{Digit}.]*)\\].(value|boolean|combo|date)\"" );
+
+        Matcher matcher = identifierPattern.matcher( htmlCode );
+
+        while ( matcher.find() )
+        {
+            String replaceString = matcher.group();
+            replaceString = replaceString.replaceAll( "[\\\"\\=\\.\\[\\]]|value|date|id|combo|boolean", "" );
+
+            Integer programStageId = Integer.parseInt( replaceString.split( ":" )[0] );
+            Integer dataElementId = Integer.parseInt( replaceString.split( ":" )[1] );
+
+            ProgramStage programStage = programStageService.getProgramStage( programStageId );
+
+            if ( programStage == null )
+            {
+                log.error( "program stage id : " + programStageId + " does not exist" );
+            }
+
+            DataElement dataElement = dataElementService.getDataElement( dataElementId );
+
+            if ( dataElement == null )
+            {
+                log.error( "data element id : " + programStageId + " does not exist" );
+            }
+
+            ProgramStageDataElement programStageDataElement = programStageDataElementService.get( programStage,
+                dataElement );
+
+            result.add( programStageDataElement );
+        }
+
+        return result;
+    }
+    
     // -------------------------------------------------------------------------
     // Supportive methods
     // -------------------------------------------------------------------------
@@ -1202,6 +1242,13 @@
 
     }
 
+    /**
+     * Replaces i18n string in the custom form code.
+     * 
+     * @param dataEntryFormCode the data entry form html.
+     * @param i18n the I18n object.
+     * @return internationalized data entry form html.
+     */
     private String populateI18nStrings( String dataEntryFormCode, I18n i18n )
     {
         StringBuffer sb = new StringBuffer();
@@ -1236,46 +1283,4 @@
 
         return result;
     }
-
-    @Override
-    public Collection<ProgramStageDataElement> getProgramStageDataElements( String htmlCode )
-    {
-        Set<ProgramStageDataElement> result = new HashSet<ProgramStageDataElement>();
-
-        Pattern identifierPattern = Pattern
-            .compile( "id=\"value\\[([\\p{Digit}.]*)\\].(value|boolean|combo|date):value\\[([\\p{Digit}.]*)\\].(value|boolean|combo|date)\"" );
-
-        Matcher matcher = identifierPattern.matcher( htmlCode );
-
-        while ( matcher.find() )
-        {
-            String replaceString = matcher.group();
-            replaceString = replaceString.replaceAll( "[\\\"\\=\\.\\[\\]]|value|date|id|combo|boolean", "" );
-
-            Integer programStageId = Integer.parseInt( replaceString.split( ":" )[0] );
-            Integer dataElementId = Integer.parseInt( replaceString.split( ":" )[1] );
-
-            ProgramStage programStage = programStageService.getProgramStage( programStageId );
-
-            if ( programStage == null )
-            {
-                logger.error( "program stage id : " + programStageId + " does not exist" );
-            }
-
-            DataElement dataElement = dataElementService.getDataElement( dataElementId );
-
-            if ( dataElement == null )
-            {
-                logger.error( "data element id : " + programStageId + " does not exist" );
-            }
-
-            ProgramStageDataElement programStageDataElement = programStageDataElementService.get( programStage,
-                dataElement );
-
-            result.add( programStageDataElement );
-        }
-
-        return result;
-    }
-
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/state/DefaultSelectedStateManager.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/state/DefaultSelectedStateManager.java	2011-03-31 01:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/state/DefaultSelectedStateManager.java	2011-05-01 09:07:35 +0000
@@ -222,5 +222,4 @@
     {
         return ActionContext.getContext().getSession();
     }
-
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/state/PeriodGenericManager.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/state/PeriodGenericManager.java	2011-03-31 01:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/state/PeriodGenericManager.java	2011-05-01 09:07:35 +0000
@@ -37,31 +37,26 @@
  */
 public interface PeriodGenericManager
 {
-    public static final String SESSION_KEY_BASE_PERIOD_START = "SESSION_KEY_BASE_PERIOD_START";
-
-    public static final String SESSION_KEY_BASE_PERIOD_END = "SESSION_KEY_BASE_PERIOD_END";
-
-    public static final String SESSION_KEY_SELECTED_PERIOD_INDEX_START = "SESSION_KEY_SELECTED_PERIOD_INDEX_START";
-
-    public static final String SESSION_KEY_SELECTED_PERIOD_INDEX_END = "SESSION_KEY_SELECTED_PERIOD_INDEX_END";
-
+    final String SESSION_KEY_BASE_PERIOD_START = "SESSION_KEY_BASE_PERIOD_START";
+    final String SESSION_KEY_BASE_PERIOD_END = "SESSION_KEY_BASE_PERIOD_END";
+    final String SESSION_KEY_SELECTED_PERIOD_INDEX_START = "SESSION_KEY_SELECTED_PERIOD_INDEX_START";
+    final String SESSION_KEY_SELECTED_PERIOD_INDEX_END = "SESSION_KEY_SELECTED_PERIOD_INDEX_END";
    
-    public void setSelectedPeriodIndex( String key, Integer index );
-
-    public Integer getSelectedPeriodIndex( String key );
-
-    public Period getSelectedPeriod( String key, String baseKey );
-
-    public void setPeriodType( String periodTypeName );
-
-    public void clearSelectedPeriod();
-
-    public void clearBasePeriod();
-
-    public List<Period> getPeriodList( String key, String baseKey );
-
-    public void nextPeriodSpan( String key, String baseKey );
-
-    public void previousPeriodSpan( String key, String baseKey );
-
+    void setSelectedPeriodIndex( String key, Integer index );
+
+    Integer getSelectedPeriodIndex( String key );
+
+    Period getSelectedPeriod( String key, String baseKey );
+
+    void setPeriodType( String periodTypeName );
+
+    void clearSelectedPeriod();
+
+    void clearBasePeriod();
+
+    List<Period> getPeriodList( String key, String baseKey );
+
+    void nextPeriodSpan( String key, String baseKey );
+
+    void previousPeriodSpan( String key, String baseKey );
 }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/state/PreviousPeriodsAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/state/PreviousPeriodsAction.java	2011-01-05 01:13:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/state/PreviousPeriodsAction.java	2011-05-01 09:07:35 +0000
@@ -35,10 +35,7 @@
 
 /**
  * @author Torgeir Lorange Ostby
- * @version $Id: PreviousPeriodsAction.java 2966 2007-03-03 14:38:20Z torgeilo $
- *          *
- * @modifier Dang Duy Hieu
- * @since 2009-10-14
+ * @author Dang Duy Hieu
  */
 public class PreviousPeriodsAction
     implements Action
@@ -107,5 +104,4 @@
 
         return SUCCESS;
     }
-
 }