← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16044: Partial merge from TW branch. Adds methods to CompleteDataSetRegistrationService.

 

------------------------------------------------------------
revno: 16044
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-07-09 09:19:02 +0200
message:
  Partial merge from TW branch. Adds methods to CompleteDataSetRegistrationService.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/CompleteDataSetRegistrationService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultCompleteDataSetRegistrationService.java
  dhis-2/dhis-web/pom.xml


--
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/dataset/CompleteDataSetRegistrationService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/CompleteDataSetRegistrationService.java	2014-06-23 21:31:31 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/CompleteDataSetRegistrationService.java	2014-07-09 07:19:02 +0000
@@ -28,12 +28,13 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
-
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.period.Period;
 
+import java.util.Collection;
+import java.util.List;
+
 /**
  * @author Lars Helge Overland
  * @version $Id$
@@ -41,52 +42,67 @@
 public interface CompleteDataSetRegistrationService
 {
     String ID = CompleteDataSetRegistrationService.class.getName();
-    
+
     /**
      * Saves a CompleteDataSetRegistration.
-     * 
+     *
      * @param registration the CompleteDataSetRegistration to save.
      */
     void saveCompleteDataSetRegistration( CompleteDataSetRegistration registration );
 
     /**
      * Saves a CompleteDataSetRegistration.
-     * 
+     *
      * @param registration the CompleteDataSetRegistration to save.
-     * @param notify indicates whether a notification should be sent.
-     */    
+     * @param notify       indicates whether a notification should be sent.
+     */
     void saveCompleteDataSetRegistration( CompleteDataSetRegistration registration, boolean notify );
 
     /**
+     * Saves multiple CompleteDataSetRegistration.
+     *
+     * @param registrations List of CompleteDataSetRegistrations to save.
+     * @param notify        indicates whether a notification should be sent.
+     */
+    void saveCompleteDataSetRegistrations( List<CompleteDataSetRegistration> registrations, boolean notify );
+
+    /**
      * Updates a CompleteDataSetRegistration.
-     * 
+     *
      * @param registration the CompleteDataSetRegistration to update.
      */
     void updateCompleteDataSetRegistration( CompleteDataSetRegistration registration );
-    
+
     /**
      * Retrieves the CompleteDataSetRegistration for the given DataSet, Period
      * and Source.
-     * 
-     * @param dataSet the DataSet.
-     * @param period the Period.
-     * @param source the Source.
+     *
+     * @param dataSet              the DataSet.
+     * @param period               the Period.
+     * @param source               the Source.
      * @param attributeOptionCombo the attribute option combo.
      * @return the CompleteDataSetRegistration.
      */
-    CompleteDataSetRegistration getCompleteDataSetRegistration( DataSet dataSet, Period period, 
+    CompleteDataSetRegistration getCompleteDataSetRegistration( DataSet dataSet, Period period,
         OrganisationUnit source, DataElementCategoryOptionCombo attributeOptionCombo );
-    
+
     /**
      * Deletes a CompleteDataSetRegistration.
-     * 
+     *
      * @param registration the CompleteDataSetRegistration to delete.
      */
     void deleteCompleteDataSetRegistration( CompleteDataSetRegistration registration );
-    
+
+    /**
+     * Deletes multiple CompleteDataSetRegistration.
+     *
+     * @param registrations the list of CompleteDataSetRegistration to delete.
+     */
+    void deleteCompleteDataSetRegistrations( List<CompleteDataSetRegistration> registrations );
+
     /**
      * Retrieves all CompleteDataSetRegistrations.
-     * 
+     *
      * @return a Collection of CompleteDataSetRegistrations.
      */
     Collection<CompleteDataSetRegistration> getAllCompleteDataSetRegistrations();
@@ -94,25 +110,25 @@
     /**
      * Retrieves the CompleteDataSetRegistrations for the given Collections of
      * DataSets, Sources and Periods.
-     * 
+     *
      * @param dataSets the Collection of DataSets.
-     * @param sources the Collection of Sources.
-     * @param periods the Collection of Periods.
+     * @param sources  the Collection of Sources.
+     * @param periods  the Collection of Periods.
      * @return a Collection of CompleteDataSetRegistrations.
      */
-    Collection<CompleteDataSetRegistration> getCompleteDataSetRegistrations( 
+    Collection<CompleteDataSetRegistration> getCompleteDataSetRegistrations(
         Collection<DataSet> dataSets, Collection<OrganisationUnit> sources, Collection<Period> periods );
-    
+
     /**
      * Deletes the CompleteDataSetRegistrations associated with the given DataSet.
-     * 
+     *
      * @param dataSet the DataSet.
      */
     void deleteCompleteDataSetRegistrations( DataSet dataSet );
 
     /**
      * Deletes the CompleteDataSetRegistrations associated with the given OrganisationUnit.
-     * 
+     *
      * @param unit the OrganisationUnit.
      */
     void deleteCompleteDataSetRegistrations( OrganisationUnit unit );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultCompleteDataSetRegistrationService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultCompleteDataSetRegistrationService.java	2014-06-23 21:31:31 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultCompleteDataSetRegistrationService.java	2014-07-09 07:19:02 +0000
@@ -28,8 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
-
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.message.MessageService;
@@ -37,6 +35,9 @@
 import org.hisp.dhis.period.Period;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.Collection;
+import java.util.List;
+
 /**
  * @author Lars Helge Overland
  * @version $Id$
@@ -62,7 +63,7 @@
     {
         this.messageService = messageService;
     }
-    
+
     private DataElementCategoryService categoryService;
 
     public void setCategoryService( DataElementCategoryService categoryService )
@@ -87,45 +88,61 @@
     public void saveCompleteDataSetRegistration( CompleteDataSetRegistration registration, boolean notify )
     {
         saveCompleteDataSetRegistration( registration );
-        
+
         if ( notify )
         {
             messageService.sendCompletenessMessage( registration );
         }
     }
-    
+
+    public void saveCompleteDataSetRegistrations( List<CompleteDataSetRegistration> registrations, boolean notify )
+    {
+        for ( CompleteDataSetRegistration registration : registrations )
+        {
+            saveCompleteDataSetRegistration( registration, notify );
+        }
+    }
+
     public void updateCompleteDataSetRegistration( CompleteDataSetRegistration registration )
     {
         completeDataSetRegistrationStore.updateCompleteDataSetRegistration( registration );
     }
-    
+
     public void deleteCompleteDataSetRegistration( CompleteDataSetRegistration registration )
     {
         completeDataSetRegistrationStore.deleteCompleteDataSetRegistration( registration );
     }
 
-    public CompleteDataSetRegistration getCompleteDataSetRegistration( DataSet dataSet, Period period, 
+    public void deleteCompleteDataSetRegistrations( List<CompleteDataSetRegistration> registrations )
+    {
+        for ( CompleteDataSetRegistration registration : registrations )
+        {
+            completeDataSetRegistrationStore.deleteCompleteDataSetRegistration( registration );
+        }
+    }
+
+    public CompleteDataSetRegistration getCompleteDataSetRegistration( DataSet dataSet, Period period,
         OrganisationUnit source, DataElementCategoryOptionCombo attributeOptionCombo )
     {
         return completeDataSetRegistrationStore.getCompleteDataSetRegistration( dataSet, period, source, attributeOptionCombo );
     }
-        
+
     public Collection<CompleteDataSetRegistration> getAllCompleteDataSetRegistrations()
     {
         return completeDataSetRegistrationStore.getAllCompleteDataSetRegistrations();
-    }    
+    }
 
-    public Collection<CompleteDataSetRegistration> getCompleteDataSetRegistrations( 
+    public Collection<CompleteDataSetRegistration> getCompleteDataSetRegistrations(
         Collection<DataSet> dataSets, Collection<OrganisationUnit> sources, Collection<Period> periods )
     {
         return completeDataSetRegistrationStore.getCompleteDataSetRegistrations( dataSets, sources, periods );
-    }    
-    
+    }
+
     public void deleteCompleteDataSetRegistrations( DataSet dataSet )
     {
         completeDataSetRegistrationStore.deleteCompleteDataSetRegistrations( dataSet );
     }
-    
+
     public void deleteCompleteDataSetRegistrations( OrganisationUnit unit )
     {
         completeDataSetRegistrationStore.deleteCompleteDataSetRegistrations( unit );

=== modified file 'dhis-2/dhis-web/pom.xml'
--- dhis-2/dhis-web/pom.xml	2014-06-30 14:54:09 +0000
+++ dhis-2/dhis-web/pom.xml	2014-07-09 07:19:02 +0000
@@ -49,7 +49,7 @@
             <compress>${useWarCompression}</compress>
           </archive>
         </configuration>
-      </plugin>
+      </plugin>	
       <plugin>
         <groupId>org.mortbay.jetty</groupId>
         <artifactId>maven-jetty-plugin</artifactId>
@@ -58,6 +58,12 @@
           <systemPropertyVariables>
             <org.mortbay.jetty.Request.maxFormContentSize>10000000</org.mortbay.jetty.Request.maxFormContentSize>
           </systemPropertyVariables>
+          <connectors>
+            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+              <port>8080</port>
+              <maxIdleTime>600000</maxIdleTime>
+            </connector>
+          </connectors>
           <contextPath>/</contextPath>
         </configuration>
       </plugin>