← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15285: Rename in HibernateTrackedEntityFormStore from getCommonForm to getFormsWithoutProgram.

 

------------------------------------------------------------
revno: 15285
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-05-16 15:52:42 +0800
message:
  Rename in HibernateTrackedEntityFormStore from getCommonForm to getFormsWithoutProgram.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityFormService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityFormStore.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityFormService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityFormStore.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityFormServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityFormStoreTest.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ShowEventWithRegistrationFormAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetTrackedEntityInstanceAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/ShowAddTrackedEntityInstanceFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/dataentryform/RemoveTrackedEntityFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/dataentryform/SaveTrackedEntityFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/dataentryform/ViewTrackedEntityFormAction.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/trackedentity/TrackedEntityFormService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityFormService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityFormService.java	2014-05-16 07:52:42 +0000
@@ -111,14 +111,14 @@
      * 
      * @return TrackedEntityForm
      */
-    TrackedEntityForm getTrackedEntityForm( Program program );
+    TrackedEntityForm getFormsWithProgram( Program program );
 
     /**
      * Get tracked entity form which doesn't belong to any program
      * 
      * @return TrackedEntityForm
      */
-    TrackedEntityForm getCommonTrackedEntityForm();
+    TrackedEntityForm getFormsWithoutProgram();
 
     /**
      * Prepares the custom registration by injecting required javascripts and

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityFormStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityFormStore.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityFormStore.java	2014-05-16 07:52:42 +0000
@@ -55,5 +55,5 @@
      * 
      * @return TrackedEntityForm
      */
-    TrackedEntityForm getCommonForm();
+    TrackedEntityForm getFormsWithoutProgram();
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityFormService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityFormService.java	2014-04-15 03:48:38 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityFormService.java	2014-05-16 07:52:42 +0000
@@ -121,15 +121,15 @@
     }
 
     @Override
-    public TrackedEntityForm getTrackedEntityForm( Program program )
+    public TrackedEntityForm getFormsWithProgram( Program program )
     {
         return formStore.get( program );
     }
 
     @Override
-    public TrackedEntityForm getCommonTrackedEntityForm()
+    public TrackedEntityForm getFormsWithoutProgram()
     {
-        return formStore.getCommonForm();
+        return formStore.getFormsWithoutProgram();
     }
 
     @Override

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityFormStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityFormStore.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityFormStore.java	2014-05-16 07:52:42 +0000
@@ -48,7 +48,7 @@
     }
 
     @Override
-    public TrackedEntityForm getCommonForm()
+    public TrackedEntityForm getFormsWithoutProgram()
     {
         return (TrackedEntityForm) getCriteria( Restrictions.isNull( "program" ) ).uniqueResult();
     }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityFormServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityFormServiceTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityFormServiceTest.java	2014-05-16 07:52:42 +0000
@@ -184,7 +184,7 @@
         entityFormService.saveTrackedEntityForm( entityFormB );
         entityFormService.saveTrackedEntityForm( entityFormC );
 
-        TrackedEntityForm form = entityFormService.getTrackedEntityForm( programA );
+        TrackedEntityForm form = entityFormService.getFormsWithProgram( programA );
         assertEquals( entityFormA, form );
     }
 
@@ -195,7 +195,7 @@
         entityFormService.saveTrackedEntityForm( entityFormB );
         entityFormService.saveTrackedEntityForm( entityFormC );
 
-        TrackedEntityForm form = entityFormService.getCommonTrackedEntityForm();
+        TrackedEntityForm form = entityFormService.getFormsWithoutProgram();
         assertEquals( entityFormC, form );
     }
 

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityFormStoreTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityFormStoreTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityFormStoreTest.java	2014-05-16 07:52:42 +0000
@@ -126,7 +126,7 @@
         entityFormStore.save( entityFormB );
         entityFormStore.save( entityFormC );
 
-        TrackedEntityForm form = entityFormStore.getCommonForm();
+        TrackedEntityForm form = entityFormStore.getFormsWithoutProgram();
         assertEquals( entityFormC, form );
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ShowEventWithRegistrationFormAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ShowEventWithRegistrationFormAction.java	2014-05-14 13:37:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ShowEventWithRegistrationFormAction.java	2014-05-16 07:52:42 +0000
@@ -205,7 +205,7 @@
 
         if ( programId == null || programId.isEmpty() )
         {
-            trackedEntityForm = trackedEntityFormService.getCommonTrackedEntityForm();
+            trackedEntityForm = trackedEntityFormService.getFormsWithoutProgram();
 
             if ( trackedEntityForm != null && trackedEntityForm.getDataEntryForm() != null )
             {
@@ -217,7 +217,7 @@
         else
         {
             program = programService.getProgram( programId );
-            trackedEntityForm = trackedEntityFormService.getTrackedEntityForm( program );
+            trackedEntityForm = trackedEntityFormService.getFormsWithProgram( program );
 
             if ( trackedEntityForm != null && trackedEntityForm.getDataEntryForm() != null )
             {

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetTrackedEntityInstanceAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetTrackedEntityInstanceAction.java	2014-04-30 11:15:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/GetTrackedEntityInstanceAction.java	2014-05-16 07:52:42 +0000
@@ -285,7 +285,7 @@
 
         if ( programId == null || programId.isEmpty() )
         {
-            trackedEntityForm = trackedEntityFormService.getCommonTrackedEntityForm();
+            trackedEntityForm = trackedEntityFormService.getFormsWithoutProgram();
 
             if ( trackedEntityForm != null && trackedEntityForm.getDataEntryForm() != null )
             {
@@ -297,7 +297,7 @@
         else
         {
             program = programService.getProgram( programId );
-            trackedEntityForm = trackedEntityFormService.getTrackedEntityForm( program );
+            trackedEntityForm = trackedEntityFormService.getFormsWithProgram( program );
 
             Collection<ProgramInstance> programInstances = programInstanceService.getProgramInstances( entityInstance,
                 program, ProgramInstance.STATUS_ACTIVE );

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/ShowAddTrackedEntityInstanceFormAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/ShowAddTrackedEntityInstanceFormAction.java	2014-05-14 13:37:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/ShowAddTrackedEntityInstanceFormAction.java	2014-05-16 07:52:42 +0000
@@ -311,7 +311,7 @@
 
         if ( programId == null || programId.isEmpty() )
         {
-            trackedEntityForm = trackedEntityFormService.getCommonTrackedEntityForm();
+            trackedEntityForm = trackedEntityFormService.getFormsWithoutProgram();
 
             if ( trackedEntityForm != null && trackedEntityForm.getDataEntryForm() != null )
             {
@@ -323,7 +323,7 @@
         else
         {
             program = programService.getProgram( programId );
-            trackedEntityForm = trackedEntityFormService.getTrackedEntityForm( program );
+            trackedEntityForm = trackedEntityFormService.getFormsWithProgram( program );
 
             if ( trackedEntityForm != null && trackedEntityForm.getDataEntryForm() != null )
             {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/dataentryform/RemoveTrackedEntityFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/dataentryform/RemoveTrackedEntityFormAction.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/dataentryform/RemoveTrackedEntityFormAction.java	2014-05-16 07:52:42 +0000
@@ -85,11 +85,11 @@
         {
             Program program = programService.getProgram( id );
 
-            registrationForm = formService.getTrackedEntityForm( program );
+            registrationForm = formService.getFormsWithProgram( program );
         }
         else
         {
-            registrationForm = formService.getCommonTrackedEntityForm();
+            registrationForm = formService.getFormsWithoutProgram();
         }
 
         if ( registrationForm != null )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/dataentryform/SaveTrackedEntityFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/dataentryform/SaveTrackedEntityFormAction.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/dataentryform/SaveTrackedEntityFormAction.java	2014-05-16 07:52:42 +0000
@@ -119,12 +119,12 @@
 
         if ( programId == null )
         {
-            registrationForm = formService.getCommonTrackedEntityForm();
+            registrationForm = formService.getFormsWithoutProgram();
         }
         else
         {
             program = programService.getProgram( programId );
-            registrationForm = formService.getTrackedEntityForm( program );
+            registrationForm = formService.getFormsWithProgram( program );
         }
 
         // ---------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/dataentryform/ViewTrackedEntityFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/dataentryform/ViewTrackedEntityFormAction.java	2014-03-20 05:43:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/dataentryform/ViewTrackedEntityFormAction.java	2014-05-16 07:52:42 +0000
@@ -158,7 +158,7 @@
 
         if ( programId == null )
         {
-            registrationForm = formService.getCommonTrackedEntityForm();
+            registrationForm = formService.getFormsWithoutProgram();
 
             attributes = attributeService.getAllTrackedEntityAttributes();
 
@@ -171,7 +171,7 @@
         {
             program = programService.getProgram( programId );
             programAttributes = program.getAttributes();
-            registrationForm = formService.getTrackedEntityForm( program );
+            registrationForm = formService.getFormsWithProgram( program );
         }
 
         // ---------------------------------------------------------------------