dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30301
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15384: minor import opts + code format
------------------------------------------------------------
revno: 15384
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-05-23 17:28:46 +0200
message:
minor import opts + code format
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramDataEntryService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramExpression.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramExpressionService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicatorService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicatorStore.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceStore.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSection.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSectionService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSectionStore.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageStore.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStatus.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStore.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttributeService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttributeStore.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationStore.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageDataElementSortOrderComparator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageInstanceDueDateComparator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageInstanceVisitDateComparator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageMinDaysComparator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageSectionSortOrderComparator.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/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2014-05-14 15:14:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2014-05-23 15:28:46 +0000
@@ -28,12 +28,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonView;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+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.view.DetailedView;
@@ -48,12 +48,11 @@
import org.hisp.dhis.user.UserAuthorityGroup;
import org.hisp.dhis.validation.ValidationCriteria;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonView;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
/**
* @author Abyot Asalefew
@@ -62,20 +61,15 @@
public class Program
extends BaseIdentifiableObject
{
- /**
- * Determines if a de-serialized file is compatible with this class.
- */
- private static final long serialVersionUID = -2581751965520009382L;
-
public static final List<String> TYPE_LOOKUP = Arrays.asList( "", "MULTIPLE_EVENTS_WITH_REGISTRATION",
"SINGLE_EVENT_WITH_REGISTRATION", "SINGLE_EVENT_WITHOUT_REGISTRATION" );
-
public static final int MULTIPLE_EVENTS_WITH_REGISTRATION = 1;
-
public static final int SINGLE_EVENT_WITH_REGISTRATION = 2;
-
public static final int SINGLE_EVENT_WITHOUT_REGISTRATION = 3;
-
+ /**
+ * Determines if a de-serialized file is compatible with this class.
+ */
+ private static final long serialVersionUID = -2581751965520009382L;
private String description;
private Integer version;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramDataEntryService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramDataEntryService.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramDataEntryService.java 2014-05-23 15:28:46 +0000
@@ -28,17 +28,16 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.Collection;
-import java.util.regex.Pattern;
-
import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.trackedentitydatavalue.TrackedEntityDataValue;
+import java.util.Collection;
+import java.util.regex.Pattern;
+
/**
* @author Chau Thu Tran
* @version $ ProgramDataEntryService.java May 26, 2011 3:56:03 PM $
- *
*/
public interface ProgramDataEntryService
{
@@ -53,15 +52,15 @@
/**
* Prepares the data entry form for data entry by injecting required
* javascripts and drop down lists.
- *
- * @param htmlCode the HTML code of the data entry form.
- * @param dataValues the {@link TrackedEntityDataValue} which are registered for
- * this form.
- * @param programStage {@link ProgramStage}
+ *
+ * @param htmlCode the HTML code of the data entry form.
+ * @param dataValues the {@link TrackedEntityDataValue} which are registered for
+ * this form.
+ * @param programStage {@link ProgramStage}
* @param programStageInstance The {@link ProgramStageInstance} associated
- * with entry form
- * @param organisationUnit The {@link OrganisationUnit} associated with this
- * program stage instance.
+ * with entry form
+ * @param organisationUnit The {@link OrganisationUnit} associated with this
+ * program stage instance.
* @return HTML code for the form.
*/
String prepareDataEntryFormForEntry( String htmlCode, Collection<TrackedEntityDataValue> dataValues, I18n i18n,
@@ -70,11 +69,10 @@
/**
* Prepare DataEntryForm code for save by reversing the effects of
* prepareDataEntryFormForEdit().
- *
- * @param htmlCode the HTML code of the data entry form.
- * @param i18n I18n object
+ *
+ * @param htmlCode the HTML code of the data entry form.
+ * @param i18n I18n object
* @param programStage {@link ProgramStage}
- *
* @return htmlCode the HTML code of the data entry form.
*/
String prepareDataEntryFormForAdd( String htmlCode, I18n i18n, ProgramStage programStage );
@@ -82,9 +80,8 @@
/**
* Prepares the data entry form code by injecting the data element operand
* name as value and title for each entry field.
- *
+ *
* @param htmlCode the HTML code of the data entry form.
- *
* @return HTML code for the data entry form.
*/
String prepareDataEntryFormForEdit( String htmlCode );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramExpression.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramExpression.java 2014-05-23 14:58:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramExpression.java 2014-05-23 15:28:46 +0000
@@ -45,18 +45,15 @@
public class ProgramExpression
implements Serializable
{
- private static final long serialVersionUID = -2807997671779497354L;
-
public static final String SEPARATOR_ID = "\\.";
- public static String OBJECT_PROGRAM_STAGE_DATAELEMENT = "DE";
- public static String OBJECT_PROGRAM_STAGE = "PS";
-
public static final String SEPARATOR_OBJECT = ":";
public static final String DUE_DATE = "DUE_DATE";
public static final String REPORT_DATE = "REPORT_DATE";
public static final String RANGE_IN_DUE_DATE = "RANGE_IN_DUE_DATE";
public static final String NOT_NULL_VALUE_IN_EXPRESSION = "NOT-NULL-VALUE";
-
+ private static final long serialVersionUID = -2807997671779497354L;
+ public static String OBJECT_PROGRAM_STAGE_DATAELEMENT = "DE";
+ public static String OBJECT_PROGRAM_STAGE = "PS";
private int id;
private String expression;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramExpressionService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramExpressionService.java 2014-05-16 15:26:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramExpressionService.java 2014-05-23 15:28:46 +0000
@@ -28,11 +28,11 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.Map;
-
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.trackedentitydatavalue.TrackedEntityDataValue;
+import java.util.Map;
+
/**
* An Expression is the expression of e.g. a validation rule of a program. It
* consist of a String representation of the rule as well as references to the
@@ -44,9 +44,8 @@
* i) [DE:1.2] where 1 refers to the program stage identifier and 2 refers to
* the data element identifier.
* <p/>
- *
+ *
* @author Chau Thu Tran
- *
* @version ProgramExpressionService.java 2:59:58 PM Nov 8, 2012 $
*/
public interface ProgramExpressionService
@@ -55,45 +54,42 @@
/**
* Adds an {@link ProgramExpression}
- *
+ *
* @param programExpression The to ProgramExpression add.
- *
* @return A generated unique id of the added {@link ProgramExpression}.
*/
int addProgramExpression( ProgramExpression programExpression );
/**
* Updates an {@link ProgramExpression}.
- *
+ *
* @param programExpression the ProgramExpression to update.
*/
void updateProgramExpression( ProgramExpression programExpression );
/**
* Deletes a {@link ProgramExpression}.
- *
+ *
* @param programExpression the ProgramExpression to delete.
*/
void deleteProgramExpression( ProgramExpression programExpression );
/**
* Returns a {@link ProgramExpression}.
- *
+ *
* @param id the id of the ProgramExpression to return.
- *
* @return the ProgramExpression with the given id
*/
ProgramExpression getProgramExpression( int id );
/**
* Get value of program expression
- *
- * @param programExpression {@link ProgramExpression}
- * @param programStageInstance The {@link ProgramStageInstance} associate
- * with this expression
+ *
+ * @param programExpression {@link ProgramExpression}
+ * @param programStageInstance The {@link ProgramStageInstance} associate
+ * with this expression
* @param trackedEntityDataValueMap TrackedEntityDataValue<The id of {@link DataElement}
- * , {@link TrackedEntityDataValue} >
- *
+ * , {@link TrackedEntityDataValue} >
* @return The expression value
*/
String getProgramExpressionValue( ProgramExpression programExpression, ProgramStageInstance programStageInstance,
@@ -101,9 +97,8 @@
/**
* Get the description of a program expression
- *
+ *
* @param programExpression The expression
- *
* @return the description of an expression
*/
String getExpressionDescription( String programExpression );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java 2014-05-23 14:58:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicator.java 2014-05-23 15:28:46 +0000
@@ -46,21 +46,15 @@
public class ProgramIndicator
extends BaseNameableObject
{
- private static final long serialVersionUID = 7920320128945484331L;
-
- public static String OBJECT_PROGRAM_STAGE_DATAELEMENT = "DE";
-
- public static String SEPARATOR_OBJECT = ":";
-
public static final String SEPARATOR_ID = "\\.";
-
public static final String VALUE_TYPE_DATE = "date";
public static final String VALUE_TYPE_INT = "int";
-
public static final String INCIDENT_DATE = "incident_date";
public static final String ENROLLEMENT_DATE = "enrollment_date";
public static final String CURRENT_DATE = "current_date";
-
+ private static final long serialVersionUID = 7920320128945484331L;
+ public static String OBJECT_PROGRAM_STAGE_DATAELEMENT = "DE";
+ public static String SEPARATOR_OBJECT = ":";
public static final String regExp = "\\[" + OBJECT_PROGRAM_STAGE_DATAELEMENT + SEPARATOR_OBJECT + "([a-zA-Z0-9\\- ]+["
+ SEPARATOR_ID + "[0-9]*]*)" + "\\]";
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicatorService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicatorService.java 2014-05-23 15:22:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicatorService.java 2014-05-23 15:28:46 +0000
@@ -39,39 +39,37 @@
{
/**
* Adds an {@link ProgramIndicator}
- *
+ *
* @param programIndicator The to ProgramIndicator add.
- *
* @return A generated unique id of the added {@link ProgramIndicator}.
*/
int addProgramIndicator( ProgramIndicator programIndicator );
/**
* Updates an {@link ProgramIndicator}.
- *
+ *
* @param programIndicator the ProgramIndicator to update.
*/
void updateProgramIndicator( ProgramIndicator programIndicator );
/**
* Deletes a {@link ProgramIndicator}.
- *
+ *
* @param programIndicator the ProgramIndicator to delete.
*/
void deleteProgramIndicator( ProgramIndicator programIndicator );
/**
* Returns a {@link ProgramIndicator}.
- *
+ *
* @param id the id of the ProgramIndicator to return.
- *
* @return the ProgramIndicator with the given id
*/
ProgramIndicator getProgramIndicator( int id );
/**
* Returns a {@link ProgramIndicator} with a given name.
- *
+ *
* @param name the name of the ProgramIndicator to return.
* @return the ProgramIndicator with the given name, or null if no match.
*/
@@ -79,16 +77,16 @@
/**
* Returns a {@link ProgramIndicator} with a given short name.
- *
+ *
* @param shortName the name of the ProgramIndicator to return.
* @return the ProgramIndicator with the given short name, or null if no
- * match.
+ * match.
*/
ProgramIndicator getProgramIndicatorByShortName( String shortName );
/**
* Returns the {@link ProgramIndicator} with the given UID.
- *
+ *
* @param uid the UID.
* @return the ProgramIndicator with the given UID, or null if no match.
*/
@@ -96,17 +94,16 @@
/**
* Returns all {@link ProgramIndicator}.
- *
+ *
* @return a collection of all ProgramIndicator, or an empty collection if
- * there are no ProgramIndicators.
+ * there are no ProgramIndicators.
*/
Collection<ProgramIndicator> getAllProgramIndicators();
/**
* Get {@link ProgramIndicator} of a program
- *
+ *
* @param program Program
- *
* @return ProgramIndicators belong to the program
*/
Collection<ProgramIndicator> getProgramIndicators( Program program );
@@ -114,28 +111,25 @@
/**
* Calculate an program indicator value based on program instance and an
* indicator defined for a TrackedEntityInstance
- *
- * @param programInstance ProgramInstance
+ *
+ * @param programInstance ProgramInstance
* @param programIndicator ProgramIndicator
- *
* @return Indicator value
*/
String getProgramIndicatorValue( ProgramInstance programInstance, ProgramIndicator programIndicator );
/**
* Get indicator values of all program indicators defined for a TrackedEntityInstance
- *
+ *
* @param programInstance ProgramInstance
- *
* @return Map<Indicator name, Indicator value>
*/
Map<String, String> getProgramIndicatorValues( ProgramInstance programInstance );
/**
* Get description of an indicator expression
- *
+ *
* @param expression A expression string
- *
* @return The description
*/
String getExpressionDescription( String expression );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicatorStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicatorStore.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicatorStore.java 2014-05-23 15:28:46 +0000
@@ -28,10 +28,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.hisp.dhis.common.GenericNameableObjectStore;
+
import java.util.Collection;
-import org.hisp.dhis.common.GenericNameableObjectStore;
-
/**
* @author Chau Thu Tran
* @version $ ProgramIndicatorStore.java Apr 16, 2013 1:15:12 PM $
@@ -41,9 +41,8 @@
{
/**
* Get {@link ProgramIndicator} of a program
- *
+ *
* @param program Program
- *
* @return ProgramIndicators belong to the program
*/
Collection<ProgramIndicator> getByProgram( Program program );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java 2014-04-18 06:34:14 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java 2014-05-23 15:28:46 +0000
@@ -56,25 +56,18 @@
public class ProgramInstance
extends BaseIdentifiableObject
{
+ /**
+ * Determines if a de-serialized file is compatible with this class.
+ */
+ private static final long serialVersionUID = -1235315582356509653L;
public static int STATUS_ACTIVE = 0;
+ private Integer status = STATUS_ACTIVE;
public static int STATUS_COMPLETED = 1;
public static int STATUS_CANCELLED = 2;
-
- /**
- * Determines if a de-serialized file is compatible with this class.
- */
- private static final long serialVersionUID = -1235315582356509653L;
-
private int id;
-
private Date dateOfIncident; //TODO rename to incidenceDate
-
private Date enrollmentDate;
-
private Date endDate;
-
- private Integer status = STATUS_ACTIVE;
-
private TrackedEntityInstance entityInstance;
private Program program;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceService.java 2014-05-23 15:22:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceService.java 2014-05-23 15:28:46 +0000
@@ -28,15 +28,15 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-
import org.hisp.dhis.common.Grid;
import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.trackedentity.TrackedEntityInstance;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
/**
* @author Abyot Asalefew
* @version $Id$
@@ -47,58 +47,54 @@
/**
* Adds an {@link ProgramInstance}
- *
+ *
* @param programInstance The to ProgramInstance add.
- *
* @return A generated unique id of the added {@link ProgramInstance}.
*/
int addProgramInstance( ProgramInstance programInstance );
/**
* Deletes a {@link ProgramInstance}.
- *
+ *
* @param programInstance the ProgramInstance to delete.
*/
void deleteProgramInstance( ProgramInstance programInstance );
/**
* Updates an {@link ProgramInstance}.
- *
+ *
* @param programInstance the ProgramInstance to update.
*/
void updateProgramInstance( ProgramInstance programInstance );
/**
* Returns a {@link ProgramInstance}.
- *
+ *
* @param id the id of the ProgramInstance to return.
- *
* @return the ProgramInstance with the given id
*/
ProgramInstance getProgramInstance( int id );
/**
* Returns the {@link ProgramInstance} with the given UID.
- *
+ *
* @param uid the UID.
* @return the ProgramInstance with the given UID, or null if no match.
*/
ProgramInstance getProgramInstance( String uid );
-
+
/**
* Retrieve program instances on a program
- *
+ *
* @param program Program
- *
* @return ProgramInstance list
*/
Collection<ProgramInstance> getProgramInstances( Program program );
/**
* Retrieve program instances on program list
- *
+ *
* @param programs Program list
- *
* @return ProgramInstance list
*/
Collection<ProgramInstance> getProgramInstances( Collection<Program> programs );
@@ -106,10 +102,9 @@
/**
* Retrieve program instances of whom registered in to a orgunit from
* program list
- *
- * @param programs Program list
+ *
+ * @param programs Program list
* @param organisationUnit Organisation Unit
- *
* @return ProgramInstance list
*/
Collection<ProgramInstance> getProgramInstances( Collection<Program> programs, OrganisationUnit organisationUnit );
@@ -117,12 +112,11 @@
/**
* Retrieve program instances of whom registered in to a orgunit from
* program list with a certain status
- *
- * @param programs Program list
+ *
+ * @param programs Program list
* @param organisationUnit Organisation Unit
- * @param status Status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- *
+ * @param status Status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
* @return ProgramInstance list
*/
Collection<ProgramInstance> getProgramInstances( Collection<Program> programs, OrganisationUnit organisationUnit,
@@ -130,55 +124,50 @@
/**
* Retrieve program instances on a program by status
- *
+ *
* @param program Program
- * @param status Status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- *
+ * @param status Status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
* @return ProgramInstance list
*/
Collection<ProgramInstance> getProgramInstances( Program program, Integer status );
/**
* Retrieve program instances on a program list by status
- *
+ *
* @param programs Program list
- * @param status Status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- *
+ * @param status Status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
* @return ProgramInstance list
*/
Collection<ProgramInstance> getProgramInstances( Collection<Program> programs, Integer status );
/**
* Retrieve program instances on a TrackedEntityInstance by a status
- *
+ *
* @param entityInstance TrackedEntityInstance
- * @param status Status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- *
+ * @param status Status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
* @return ProgramInstance list
*/
Collection<ProgramInstance> getProgramInstances( TrackedEntityInstance entityInstance, Integer status );
/**
* Retrieve program instances on a TrackedEntityInstance by a program
- *
+ *
* @param entityInstance TrackedEntityInstance
- * @param program Program
- *
+ * @param program Program
* @return ProgramInstance list
*/
Collection<ProgramInstance> getProgramInstances( TrackedEntityInstance entityInstance, Program program );
/**
* Retrieve program instances on a TrackedEntityInstance with a status by a program
- *
+ *
* @param entityInstance TrackedEntityInstance
- * @param program Program
- * @param status Status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- *
+ * @param program Program
+ * @param status Status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
* @return ProgramInstance list
*/
Collection<ProgramInstance> getProgramInstances( TrackedEntityInstance entityInstance, Program program, Integer status );
@@ -186,12 +175,11 @@
/**
* Retrieve program instances with active status on an orgunit by a program
* with result limited
- *
- * @param program Program
+ *
+ * @param program Program
* @param organisationUnit Organisation Unit
- * @param min First result
- * @param max Maximum results
- *
+ * @param min First result
+ * @param max Maximum results
* @return ProgramInstance list
*/
Collection<ProgramInstance> getProgramInstances( Program program, OrganisationUnit organisationUnit, Integer min,
@@ -200,14 +188,13 @@
/**
* Retrieve program instances with active status on an orgunit by a program
* for a certain period with result limited
- *
- * @param program Program
+ *
+ * @param program Program
* @param orgunitIds Organisation Units
- * @param startDate The start date for retrieving on enrollment-date
- * @param endDate The end date for retrieving on enrollment-date
- * @param min First result
- * @param max Maximum results
- *
+ * @param startDate The start date for retrieving on enrollment-date
+ * @param endDate The end date for retrieving on enrollment-date
+ * @param min First result
+ * @param max Maximum results
* @return ProgramInstance list
*/
Collection<ProgramInstance> getProgramInstances( Program program, Collection<Integer> orgunitIds, Date startDate,
@@ -216,33 +203,30 @@
/**
* Get the number of program instances which are active status and
* registered in a certain orgunit by a program for a certain period
- *
- * @param program Program
+ *
+ * @param program Program
* @param orgunitIds Organisation Units
- * @param startDate The start date for retrieving on enrollment-date
- * @param endDate The end date for retrieving on enrollment-date
- *
+ * @param startDate The start date for retrieving on enrollment-date
+ * @param endDate The end date for retrieving on enrollment-date
* @return ProgramInstance list
*/
int countProgramInstances( Program program, Collection<Integer> orgunitIds, Date startDate, Date endDate );
/**
* Retrieve history of a TrackedEntityInstance
- *
+ *
* @param entityInstance TrackedEntityInstance
- * @param i18n I18n object
- *
+ * @param i18n I18n object
* @return Grid list in which each grid is the program information details
- * of the TrackedEntityInstance
+ * of the TrackedEntityInstance
*/
List<Grid> getProgramInstanceReport( TrackedEntityInstance entityInstance, I18n i18n );
/**
* Export a program information details report
- *
+ *
* @param programInstance ProgramInstance
- * @param i18n I18n object
- *
+ * @param i18n I18n object
* @return Grid object
*/
Grid getProgramInstanceReport( ProgramInstance programInstance, I18n i18n );
@@ -250,14 +234,13 @@
/**
* Retrieve program instances with a certain status on a program and an
* orgunit ids list for a period
- *
- * @param status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- * @param program ProgramInstance
+ *
+ * @param status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
+ * @param program ProgramInstance
* @param orgunitIds A list of orgunit ids
- * @param startDate The start date for retrieving on enrollment-date
- * @param endDate The end date for retrieving on enrollment-date
- *
+ * @param startDate The start date for retrieving on enrollment-date
+ * @param endDate The end date for retrieving on enrollment-date
* @return ProgramInstance list
*/
Collection<ProgramInstance> getProgramInstancesByStatus( Integer status, Program program,
@@ -266,36 +249,34 @@
/**
* Get the number of program instances of a program which have a certain
* status and an orgunit ids list for a period
- *
- * @param status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- * @param program ProgramInstance
+ *
+ * @param status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
+ * @param program ProgramInstance
* @param orgunitIds A list of orgunit ids
- * @param startDate The start date for retrieving on enrollment-date
- * @param endDate The end date for retrieving on enrollment-date
- *
+ * @param startDate The start date for retrieving on enrollment-date
+ * @param endDate The end date for retrieving on enrollment-date
* @return A number
*/
int countProgramInstancesByStatus( Integer status, Program program, Collection<Integer> orgunitIds, Date startDate,
Date endDate );
-
+
/**
* Retrieve scheduled list of entityInstances registered
- *
+ *
* @return A SchedulingProgramObject list
*/
Collection<SchedulingProgramObject> getScheduleMesssages();
/**
* Enroll a TrackedEntityInstance into a program. Must be run inside a transaction.
- *
+ *
* @param entityInstance TrackedEntityInstance
- * @param program Program
+ * @param program Program
* @param enrollmentDate The date of enrollment
* @param dateOfIncident The date of incident
- * @param orgunit Organisation Unit
- *
+ * @param orgunit Organisation Unit
* @return ProgramInsance
*/
ProgramInstance enrollTrackedEntityInstance( TrackedEntityInstance entityInstance, Program program, Date enrollmentDate, Date dateOfIncident,
@@ -305,9 +286,8 @@
* Check a program instance if it can be completed automatically. If there
* is some event of this program-isntance uncompleted or this program has
* any repeatable stage, then this program cannot be completed automatically
- *
+ *
* @param programInstance ProgramInstance
- *
* @return True/False value
*/
boolean canAutoCompleteProgramInstanceStatus( ProgramInstance programInstance );
@@ -315,14 +295,14 @@
/**
* Complete a program instance. Besides, program template messages will be
* send if it was defined to send when to complete this program
- *
+ *
* @param programInstance ProgramInstance
*/
void completeProgramInstanceStatus( ProgramInstance programInstance );
/**
* Set status as skipped for overdue events; Remove scheduled events
- *
+ *
* @param programInstance ProgramInstance
*/
void cancelProgramInstanceStatus( ProgramInstance programInstance );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceStore.java 2014-05-23 15:22:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceStore.java 2014-05-23 15:28:46 +0000
@@ -46,18 +46,16 @@
/**
* Retrieve program instances on a program
- *
+ *
* @param program Program
- *
* @return ProgramInstance list
*/
Collection<ProgramInstance> get( Program program );
/**
* Retrieve program instances on program list
- *
+ *
* @param programs Program list
- *
* @return ProgramInstance list
*/
Collection<ProgramInstance> get( Collection<Program> programs );
@@ -65,10 +63,9 @@
/**
* Retrieve program instances of whom registered in to a orgunit from
* program list
- *
- * @param programs Program list
+ *
+ * @param programs Program list
* @param organisationUnit Organisation Unit
- *
* @return ProgramInstance list
*/
Collection<ProgramInstance> get( Collection<Program> programs, OrganisationUnit organisationUnit );
@@ -76,67 +73,61 @@
/**
* Retrieve program instances of whom registered in to a orgunit from
* program list with a certain status
- *
- * @param programs Program list
+ *
+ * @param programs Program list
* @param organisationUnit Organisation Unit
- * @param status Status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- *
+ * @param status Status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
* @return ProgramInstance list
*/
Collection<ProgramInstance> get( Collection<Program> programs, OrganisationUnit organisationUnit, int status );
/**
* Retrieve program instances on a program by status
- *
+ *
* @param program Program
- * @param status Status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- *
+ * @param status Status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
* @return ProgramInstance list
*/
Collection<ProgramInstance> get( Program program, Integer status );
/**
* Retrieve program instances on a program list by status
- *
+ *
* @param programs Program list
- * @param status Status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- *
+ * @param status Status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
* @return ProgramInstance list
*/
Collection<ProgramInstance> get( Collection<Program> programs, Integer status );
/**
* Retrieve program instances on a TrackedEntityInstance by a status
- *
+ *
* @param entityInstance TrackedEntityInstance
- * @param status Status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- *
+ * @param status Status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
* @return ProgramInstance list
*/
Collection<ProgramInstance> get( TrackedEntityInstance entityInstance, Integer status );
/**
* Retrieve program instances on a TrackedEntityInstance by a program
- *
+ *
* @param entityInstance TrackedEntityInstance
- * @param program Program
- *
+ * @param program Program
* @return ProgramInstance list
*/
Collection<ProgramInstance> get( TrackedEntityInstance entityInstance, Program program );
/**
* Retrieve program instances on a TrackedEntityInstance with a status by a program
- *
+ *
* @param entityInstance TrackedEntityInstance
- * @param program Program
- * @param status Status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- *
+ * @param program Program
+ * @param status Status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
* @return ProgramInstance list
*/
Collection<ProgramInstance> get( TrackedEntityInstance entityInstance, Program program, Integer status );
@@ -144,12 +135,11 @@
/**
* Retrieve program instances with active status on an orgunit by a program
* with result limited
- *
- * @param program Program
+ *
+ * @param program Program
* @param organisationUnit Organisation Unit
- * @param min First result
- * @param max Maximum results
- *
+ * @param min First result
+ * @param max Maximum results
* @return ProgramInstance list
*/
Collection<ProgramInstance> get( Program program, OrganisationUnit organisationUnit, Integer min, Integer max );
@@ -157,14 +147,13 @@
/**
* Retrieve program instances with active status on an orgunit by a program
* for a certain period with result limited
- *
- * @param program Program
+ *
+ * @param program Program
* @param orgunitIds Organisation Units
- * @param startDate The start date for retrieving on enrollment-date
- * @param endDate The end date for retrieving on enrollment-date
- * @param min First result
- * @param max Maximum results
- *
+ * @param startDate The start date for retrieving on enrollment-date
+ * @param endDate The end date for retrieving on enrollment-date
+ * @param min First result
+ * @param max Maximum results
* @return ProgramInstance list
*/
Collection<ProgramInstance> get( Program program, Collection<Integer> orgunitIds, Date startDate, Date endDate,
@@ -172,10 +161,9 @@
/**
* Get the number of program instances of a program on an organisation unit
- *
- * @param program Program
+ *
+ * @param program Program
* @param organisationUnit Organisation Unit
- *
* @return ProgramInstance list
*/
int count( Program program, OrganisationUnit organisationUnit );
@@ -183,12 +171,11 @@
/**
* Get the number of program instances which are active status and
* registered in a certain orgunit by a program for a certain period
- *
- * @param program Program
+ *
+ * @param program Program
* @param orgunitIds Organisation Units
- * @param startDate The start date for retrieving on enrollment-date
- * @param endDate The end date for retrieving on enrollment-date
- *
+ * @param startDate The start date for retrieving on enrollment-date
+ * @param endDate The end date for retrieving on enrollment-date
* @return ProgramInstance list
*/
int count( Program program, Collection<Integer> orgunitIds, Date startDate, Date endDate );
@@ -196,14 +183,13 @@
/**
* Get the number of program instances of a program which have a certain
* status and an orgunit ids list for a period
- *
- * @param status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- * @param program ProgramInstance
+ *
+ * @param status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
+ * @param program ProgramInstance
* @param orgunitIds A list of orgunit ids
- * @param startDate The start date for retrieving on enrollment-date
- * @param endDate The end date for retrieving on enrollment-date
- *
+ * @param startDate The start date for retrieving on enrollment-date
+ * @param endDate The end date for retrieving on enrollment-date
* @return A number
*/
int countByStatus( Integer status, Program program, Collection<Integer> orgunitIds, Date startDate, Date endDate );
@@ -211,14 +197,13 @@
/**
* Retrieve program instances with a certain status on a program and an
* orgunit ids list for a period
- *
- * @param status of program-instance, include STATUS_ACTIVE,
- * STATUS_COMPLETED and STATUS_CANCELLED
- * @param program ProgramInstance
+ *
+ * @param status of program-instance, include STATUS_ACTIVE,
+ * STATUS_COMPLETED and STATUS_CANCELLED
+ * @param program ProgramInstance
* @param orgunitIds A list of orgunit ids
- * @param startDate The start date for retrieving on enrollment-date
- * @param endDate The end date for retrieving on enrollment-date
- *
+ * @param startDate The start date for retrieving on enrollment-date
+ * @param endDate The end date for retrieving on enrollment-date
* @return ProgramInstance list
*/
Collection<ProgramInstance> getByStatus( Integer status, Program program, Collection<Integer> orgunitIds,
@@ -226,7 +211,7 @@
/**
* Rerieve schedule list of patiens registered
- *
+ *
* @return A SchedulingProgramObject list
*/
Collection<SchedulingProgramObject> getSendMesssageEvents( String dateToCompare );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramService.java 2014-05-23 15:22:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramService.java 2014-05-23 15:28:46 +0000
@@ -28,12 +28,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.Collection;
-
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.trackedentity.TrackedEntity;
import org.hisp.dhis.validation.ValidationCriteria;
+import java.util.Collection;
+
/**
* @author Abyot Asalefew
* @version $Id$
@@ -44,16 +44,15 @@
/**
* Adds an {@link Program}
- *
+ *
* @param program The to Program add.
- *
* @return A generated unique id of the added {@link Program}.
*/
int addProgram( Program program );
/**
* Updates an {@link Program}.
- *
+ *
* @param program the Program to update.
*/
void updateProgram( Program program );
@@ -62,23 +61,22 @@
* Deletes a {@link Program}. All {@link ProgramStage},
* {@link ProgramInstance} and {@link ProgramStageInstance} belong to this
* program are removed
- *
+ *
* @param program the Program to delete.
*/
void deleteProgram( Program program );
/**
* Returns a {@link Program}.
- *
+ *
* @param id the id of the Program to return.
- *
* @return the Program with the given id
*/
Program getProgram( int id );
/**
* Returns a {@link Program} with a given name.
- *
+ *
* @param name the name of the Program to return.
* @return the Program with the given name, or null if no match.
*/
@@ -86,35 +84,33 @@
/**
* Returns all {@link Program}.
- *
+ *
* @return a collection of all Program, or an empty collection if there are
- * no Programs.
+ * no Programs.
*/
Collection<Program> getAllPrograms();
/**
* Get all {@link Program} belong to a orgunit
- *
+ *
* @param organisationUnit {@link OrganisationUnit}
- *
* @return The program list
*/
Collection<Program> getPrograms( OrganisationUnit organisationUnit );
/**
* Get {@link Program} by the current user.
- *
+ *
* @return The program list the current user
*/
Collection<Program> getProgramsByCurrentUser();
/**
* Get {@link Program} by the current user and a certain type
- *
+ *
* @param type The type of program. There are three types, include Multi
- * events with registration, Single event with registration and
- * Single event without registration.
- *
+ * events with registration, Single event with registration and
+ * Single event without registration.
* @return Program list by a type specified
*/
Collection<Program> getProgramsByCurrentUser( int type );
@@ -122,39 +118,36 @@
/**
* Get {@link Program} included in the expression of a
* {@link ValidationCriteria}
- *
+ *
* @param validationCriteria {@link ValidationCriteria}
- *
* @return Program list
*/
Collection<Program> getPrograms( ValidationCriteria validationCriteria );
/**
* Get {@link Program} by a type
- *
+ *
* @param type The type of program. There are three types, include Multi
- * events with registration, Single event with registration and
- * Single event without registration
- *
+ * events with registration, Single event with registration and
+ * Single event without registration
* @return Program list by a type specified
*/
Collection<Program> getPrograms( int type );
/**
* Get {@link Program} assigned to an {@link OrganisationUnit} by a type
- *
- * @param type The type of program. There are three types, include Multi
- * events with registration, Single event with registration and
- * Single event without registration
+ *
+ * @param type The type of program. There are three types, include Multi
+ * events with registration, Single event with registration and
+ * Single event without registration
* @param orgunit Where programs assigned
- *
* @return Program list by a type specified
*/
Collection<Program> getPrograms( int type, OrganisationUnit orgunit );
/**
* Returns the {@link Program} with the given UID.
- *
+ *
* @param uid the UID.
* @return the Program with the given UID, or null if no match.
*/
@@ -162,52 +155,49 @@
/**
* Get {@link Program} belong to an orgunit by the current user
- *
+ *
* @param organisationUnit {@link OrganisationUnit}
*/
Collection<Program> getProgramsByCurrentUser( OrganisationUnit organisationUnit );
/**
* Get {@link TrackedEntity} by TrackedEntity
- *
+ *
* @param trackedEntity {@link TrackedEntity}
*/
Collection<Program> getProgramsByTrackedEntity( TrackedEntity trackedEntity );
/**
* Returns The number of Programs with the key searched
- *
+ *
* @param name Keyword for searching by name
- *
* @return A number
- *
*/
Integer getProgramCountByName( String name );
/**
* Returns {@link Program} list with paging
- *
+ *
* @param name Keyword for searching by name
- * @param min First result
- * @param max Maximum results
+ * @param min First result
+ * @param max Maximum results
* @return a collection of all Program, or an empty collection if
- * there are no Program.
+ * there are no Program.
*/
Collection<Program> getProgramBetweenByName( String name, int min, int max );
/**
* Returns The number of all Program available
- *
*/
Integer getProgramCount();
/**
* Returns {@link Program} list with paging
- *
+ *
* @param min First result
* @param max Maximum results
* @return a collection of all Program, or an empty collection if
- * there are no Program.
+ * there are no Program.
*/
Collection<Program> getProgramsBetween( int min, int max );
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementService.java 2014-05-23 15:22:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementService.java 2014-05-23 15:28:46 +0000
@@ -28,13 +28,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.hisp.dhis.dataelement.DataElement;
+
import java.util.Collection;
-import org.hisp.dhis.dataelement.DataElement;
-
/**
* @author Viet Nguyen
- *
* @version $Id$
*/
public interface ProgramStageDataElementService
@@ -43,22 +42,21 @@
/**
* Adds an {@link ProgramStageDataElement}
- *
+ *
* @param programStageDataElement The to ProgramStageDataElement add.
- *
*/
void addProgramStageDataElement( ProgramStageDataElement programStageDataElement );
/**
* Updates an {@link ProgramStageDataElement}.
- *
+ *
* @param programStageDataElement the ProgramStageDataElement to update.
*/
void updateProgramStageDataElement( ProgramStageDataElement programStageDataElement );
/**
* Deletes a {@link ProgramStageDataElement}.
- *
+ *
* @param programStageDataElement the ProgramStageDataElement to delete.
*/
void deleteProgramStageDataElement( ProgramStageDataElement programStageDataElement );
@@ -66,27 +64,25 @@
/**
* Retrieve ProgramStageDataElement list on a program stage and a data
* element
- *
+ *
* @param programStage ProgramStage
- * @param dataElement DataElement
- *
+ * @param dataElement DataElement
* @return ProgramStageDataElement
*/
ProgramStageDataElement get( ProgramStage programStage, DataElement dataElement );
/**
* Returns all {@link ProgramStageDataElement}
- *
+ *
* @return a collection of all ProgramStageDataElement, or an empty
- * collection if there are no ProgramStageDataElements.
+ * collection if there are no ProgramStageDataElements.
*/
Collection<ProgramStageDataElement> getAllProgramStageDataElements();
/**
* Retrieve Data element list on a program stage
- *
+ *
* @param programStage ProgramStage
- *
* @return ProgramStageDataElement list
*/
Collection<DataElement> getListDataElement( ProgramStage programStage );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java 2014-05-23 14:58:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java 2014-05-23 15:28:46 +0000
@@ -45,38 +45,26 @@
public class ProgramStageInstance
extends BaseIdentifiableObject
{
- /**
- * Determines if a de-serialized file is compatible with this class.
- */
- private static final long serialVersionUID = 6239130884678145713L;
-
public static final int ACTIVE_STATUS = 0;
+ private Integer status = ACTIVE_STATUS;
public static final int COMPLETED_STATUS = 1;
public static final int VISITED_STATUS = 2;
public static final int FUTURE_VISIT_STATUS = 3;
public static final int LATE_VISIT_STATUS = 4;
public static final int SKIPPED_STATUS = 5;
-
+ /**
+ * Determines if a de-serialized file is compatible with this class.
+ */
+ private static final long serialVersionUID = 6239130884678145713L;
private ProgramInstance programInstance;
-
private ProgramStage programStage;
-
private Date dueDate;
-
private Date executionDate;
-
private OrganisationUnit organisationUnit;
-
private boolean completed;
-
private List<OutboundSms> outboundSms = new ArrayList<OutboundSms>();
-
private List<MessageConversation> messageConversations = new ArrayList<MessageConversation>();
-
private TrackedEntityComment comment;
-
- private Integer status = ACTIVE_STATUS;
-
private Double longitude;
private Double latitude;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java 2014-05-23 15:22:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java 2014-05-23 15:28:46 +0000
@@ -28,15 +28,15 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-
import org.hisp.dhis.common.GenericIdentifiableObjectStore;
import org.hisp.dhis.common.Grid;
import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.trackedentity.TrackedEntityInstance;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
/**
* @author Abyot Asalefew
* @version $Id$
@@ -49,53 +49,49 @@
/**
* Retrieve an event on a program instance and a program stage. For
* repeatable stage, the system returns the last event
- *
+ *
* @param programInstance ProgramInstance
- * @param programStage ProgramStage
- *
+ * @param programStage ProgramStage
* @return ProgramStageInstance
*/
ProgramStageInstance get( ProgramInstance programInstance, ProgramStage programStage );
/**
* Retrieve an event list on program instance list with a certain status
- *
+ *
* @param programInstances ProgramInstance list
- * @param completed Optional flag to only get completed (<code>true</code> )
- * or uncompleted (<code>false</code>) instances.
- *
+ * @param completed Optional flag to only get completed (<code>true</code> )
+ * or uncompleted (<code>false</code>) instances.
* @return ProgramStageInstance list
*/
Collection<ProgramStageInstance> get( Collection<ProgramInstance> programInstances, boolean completed );
/**
* Get all events by TrackedEntityInstance, optionally filtering by completed.
- *
+ *
* @param entityInstance TrackedEntityInstance
- *
- * @param completed - optional flag to only get completed (
- * <code>true</code> ) or uncompleted (<code>false</code>) instances.
- *
+ * @param completed - optional flag to only get completed (
+ * <code>true</code> ) or uncompleted (<code>false</code>) instances.
* @return ProgramStageInstance list
*/
List<ProgramStageInstance> get( TrackedEntityInstance entityInstance, boolean completed );
/**
* Retrieve scheduled list of entityInstances registered
- *
+ *
* @return A SchedulingProgramObject list
*/
Collection<SchedulingProgramObject> getSendMesssageEvents();
/**
* Get the number of events by completed status
- *
+ *
* @param programStage Program
- * @param orgunitIds The ids of orgunits where the events happened
- * @param startDate Optional date the instance should be on or after.
- * @param endDate Optional date the instance should be on or before.
- * @param completed Optional flag to only get completed (<code>true</code> )
- * or uncompleted (<code>false</code>) instances.
+ * @param orgunitIds The ids of orgunits where the events happened
+ * @param startDate Optional date the instance should be on or after.
+ * @param endDate Optional date the instance should be on or before.
+ * @param completed Optional flag to only get completed (<code>true</code> )
+ * or uncompleted (<code>false</code>) instances.
* @return A number
*/
int count( ProgramStage programStage, Collection<Integer> orgunitIds, Date startDate, Date endDate,
@@ -103,26 +99,25 @@
/**
* Get the number of over due events of a program stage in a certain period
- *
+ *
* @param programStage ProgramStage
- * @param orgunitIds The ids of orgunits where the events happened
- * @param startDate Optional date the instance should be on or after.
- * @param endDate Optional date the instance should be on or before.
- *
+ * @param orgunitIds The ids of orgunits where the events happened
+ * @param startDate Optional date the instance should be on or after.
+ * @param endDate Optional date the instance should be on or before.
* @return A number
*/
int getOverDueCount( ProgramStage programStage, Collection<Integer> orgunitIds, Date startDate, Date endDate );
/**
* Get the number of program instances completed
- *
- * @param program Program
+ *
+ * @param program Program
* @param orgunitIds The ids of orgunits where the events happened
- * @param after Optional date the instance should be on or after.
- * @param before Optional date the instance should be on or before.
- * @param status The status of event. There are four statuses for events,
- * includes COMPLETED_STATUS, VISITED_STATUS, FUTURE_VISIT_STATUS,
- * LATE_VISIT_STATUS
+ * @param after Optional date the instance should be on or after.
+ * @param before Optional date the instance should be on or before.
+ * @param status The status of event. There are four statuses for events,
+ * includes COMPLETED_STATUS, VISITED_STATUS, FUTURE_VISIT_STATUS,
+ * LATE_VISIT_STATUS
* @return A number
*/
int averageNumberCompleted( Program program, Collection<Integer> orgunitIds, Date after, Date before, int status );
@@ -130,12 +125,11 @@
/**
* Get/Export a report about the number of events of a program completed on
* a orgunit
- *
+ *
* @param orgunitIds The ids of orgunits where the events happened
- * @param program The program needs for reporting
- * @param startDate Optional date the instance should be on or after.
- * @param endDate Optional date the instance should be on or before.
- *
+ * @param program The program needs for reporting
+ * @param startDate Optional date the instance should be on or after.
+ * @param endDate Optional date the instance should be on or before.
* @return Grid
*/
Grid getCompleteness( Collection<Integer> orgunitIds, Program program, String startDate, String endDate, I18n i18n );
=== 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-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSection.java 2014-05-23 15:28:46 +0000
@@ -28,9 +28,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.ArrayList;
-import java.util.List;
-
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonView;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
@@ -41,9 +38,11 @@
import org.hisp.dhis.common.view.DetailedView;
import org.hisp.dhis.common.view.ExportView;
+import java.util.ArrayList;
+import java.util.List;
+
/**
* @author Chau Thu Tran
- *
* @version ProgramStageSection.java 11:07:27 AM Aug 22, 2012 $
*/
@JacksonXmlRootElement( localName = "programStageSection", namespace = DxfNamespaces.DXF_2_0 )
@@ -82,16 +81,16 @@
// Constructors
// -------------------------------------------------------------------------
- public void setSortOrder( Integer sortOrder )
- {
- this.sortOrder = sortOrder;
- }
-
public Integer getSortOrder()
{
return sortOrder;
}
+ public void setSortOrder( Integer sortOrder )
+ {
+ this.sortOrder = sortOrder;
+ }
+
@JsonProperty
@JsonView( { DetailedView.class, ExportView.class } )
@JacksonXmlElementWrapper( localName = "programStageDataElements", namespace = DxfNamespaces.DXF_2_0 )
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSectionService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSectionService.java 2014-05-16 15:26:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSectionService.java 2014-05-23 15:28:46 +0000
@@ -31,7 +31,6 @@
/**
* @author Chau Thu Tran
- *
* @version ProgramStageSectionService.java 11:12:41 AM Aug 22, 2012 $
*/
public interface ProgramStageSectionService
@@ -44,44 +43,41 @@
/**
* Adds an {@link ProgramStageSection}
- *
+ *
* @param programStageSection The to ProgramStageSection add.
- *
* @return A generated unique id of the added {@link ProgramStageSection}.
*/
int saveProgramStageSection( ProgramStageSection programStageSection );
/**
* Deletes a {@link ProgramStageSection}.
- *
+ *
* @param programStageSection the ProgramStageSection to delete.
*/
void deleteProgramStageSection( ProgramStageSection programStageSection );
/**
* Updates an {@link ProgramStageSection}.
- *
+ *
* @param programStageSection the ProgramStageSection to update.
*/
void updateProgramStageSection( ProgramStageSection programStageSection );
/**
* Returns a {@link ProgramStageSection}.
- *
+ *
* @param id the id of the ProgramStageSection to return.
- *
* @return the ProgramStageSection with the given id
*/
ProgramStageSection getProgramStageSection( int id );
/**
* Retrieve a program stage section by name and a program stage
- *
- * @param name Name of program stage
+ *
+ * @param name Name of program stage
* @param programStage Specify a {@link Program} for retrieving a program
- * stage. The system allows the name of program stages are duplicated
- * on different programs
- *
+ * stage. The system allows the name of program stages are duplicated
+ * on different programs
* @return ProgramStage
*/
ProgramStageSection getProgramStageSectionByName( String name, ProgramStage programStage );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSectionStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSectionStore.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSectionStore.java 2014-05-23 15:28:46 +0000
@@ -39,12 +39,11 @@
{
/**
* Retrieve a program stage section by name and a program stage
- *
- * @param name Name of program stage
+ *
+ * @param name Name of program stage
* @param programStage Specify a {@link Program} for retrieving a program
- * stage. The system allows the name of program stages are duplicated
- * on different programs
- *
+ * stage. The system allows the name of program stages are duplicated
+ * on different programs
* @return ProgramStage
*/
ProgramStageSection getByNameAndProgramStage( String name, ProgramStage programStage );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageService.java 2014-05-16 15:26:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageService.java 2014-05-23 15:28:46 +0000
@@ -43,39 +43,37 @@
/**
* Adds an {@link ProgramStage}
- *
+ *
* @param programStage The to ProgramStage add.
- *
* @return A generated unique id of the added {@link ProgramStage}.
*/
int saveProgramStage( ProgramStage programStage );
/**
* Deletes a {@link ProgramStage}.
- *
+ *
* @param programStage the ProgramStage to delete.
*/
void deleteProgramStage( ProgramStage programStage );
/**
* Updates an {@link ProgramStage}.
- *
+ *
* @param programStage the ProgramStage to update.
*/
void updateProgramStage( ProgramStage programStage );
/**
* Returns a {@link ProgramStage}.
- *
+ *
* @param id the id of the ProgramStage to return.
- *
* @return the ProgramStage with the given id
*/
ProgramStage getProgramStage( int id );
/**
* Returns the {@link ProgramStage} with the given UID.
- *
+ *
* @param uid the UID.
* @return the ProgramStage with the given UID, or null if no match.
*/
@@ -83,12 +81,11 @@
/**
* Retrieve a program stage by name and a program
- *
- * @param name Name of program stage
+ *
+ * @param name Name of program stage
* @param program Specify a {@link Program} for retrieving a program stage.
- * The system allows the name of program stages are duplicated on
- * different programs
- *
+ * The system allows the name of program stages are duplicated on
+ * different programs
* @return ProgramStage
*/
ProgramStage getProgramStageByName( String name, Program program );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageStore.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageStore.java 2014-05-23 15:28:46 +0000
@@ -39,12 +39,11 @@
/**
* Retrieve a program stage by name and a program
- *
- * @param name Name of program stage
+ *
+ * @param name Name of program stage
* @param program Specify a {@link Program} for retrieving a program stage.
- * The system allows the name of program stages are duplicated on
- * different programs
- *
+ * The system allows the name of program stages are duplicated on
+ * different programs
* @return ProgramStage
*/
ProgramStage getByNameAndProgram( String name, Program program );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStatus.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStatus.java 2014-04-04 22:14:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStatus.java 2014-05-23 15:28:46 +0000
@@ -34,9 +34,9 @@
public enum ProgramStatus
{
ACTIVE( 0 ), COMPLETED( 1 ), CANCELLED( 2 );
-
+
private int value;
-
+
private ProgramStatus( int value )
{
this.value = value;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStore.java 2014-04-06 15:48:31 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStore.java 2014-05-23 15:28:46 +0000
@@ -45,50 +45,46 @@
/**
* Get {@link Program} by a type
- *
+ *
* @param type The type of program. There are three types, include Multi
- * events with registration, Single event with registration and
- * Single event without registration
- *
+ * events with registration, Single event with registration and
+ * Single event without registration
* @return Program list by a type specified
*/
Collection<Program> getByType( int type );
/**
* Get {@link Program} assigned to an {@link OrganisationUnit} by a type
- *
+ *
* @param organisationUnit Where programs assigned
- *
* @return Program list by a type specified
*/
Collection<Program> get( OrganisationUnit organisationUnit );
/**
* Get {@link Program} assigned to an {@link OrganisationUnit} by a type
- *
- * @param type The type of program. There are three types, include Multi
- * events with registration, Single event with registration and
- * Single event without registration
+ *
+ * @param type The type of program. There are three types, include Multi
+ * events with registration, Single event with registration and
+ * Single event without registration
* @param orgunit Where programs assigned
- *
* @return Program list by a type specified
*/
Collection<Program> get( int type, OrganisationUnit orgunit );
/**
* Get {@link Program} by the current user.
- *
+ *
* @return The program list the current user
*/
Collection<Program> getByCurrentUser();
/**
* Get {@link Program} by the current user and a certain type
- *
+ *
* @param type The type of program. There are three types, include Multi
- * events with registration, Single event with registration and
- * Single event without registration.
- *
+ * events with registration, Single event with registration and
+ * Single event without registration.
* @return Program list by a type specified
*/
Collection<Program> getByCurrentUser( int type );
@@ -96,19 +92,18 @@
/**
* Get {@link Program} which are displayed on all {@link OrganisationUnit}
* for searching or enrolling a person
- *
+ *
* @param displayOnAllOrgunit Optional flag to specify programs can
- * displayed for searching or enrolling (<code>true</code> ) or
- * cannot be used on the orgunit (<code>false</code>) instances.
- * @param orgunit {@link OrganisationUnit}
- *
+ * displayed for searching or enrolling (<code>true</code> ) or
+ * cannot be used on the orgunit (<code>false</code>) instances.
+ * @param orgunit {@link OrganisationUnit}
* @return Program list
*/
Collection<Program> getProgramsByDisplayOnAllOrgunit( boolean displayOnAllOrgunit, OrganisationUnit orgunit );
/**
* Get {@link Program} by TrackedEntity
- *
+ *
* @param trackedEntity {@link TrackedEntity}
*/
Collection<Program> getByTrackedEntity( TrackedEntity trackedEntity );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java 2014-05-23 15:22:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java 2014-05-23 15:28:46 +0000
@@ -33,7 +33,6 @@
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
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.view.DetailedView;
@@ -47,7 +46,7 @@
* @author Chau Thu Tran
* @version $ ProgramTrackedEntityAttribute.java Jan 7, 2014 9:16:05 AM $
*/
-@JacksonXmlRootElement( localName = "programTrackedEntityAttribute", namespace = DxfNamespaces.DXF_2_0 )
+@JacksonXmlRootElement(localName = "programTrackedEntityAttribute", namespace = DxfNamespaces.DXF_2_0)
public class ProgramTrackedEntityAttribute
implements Serializable
{
@@ -136,22 +135,22 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+ @JsonView({ DetailedView.class, ExportView.class })
+ @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public Boolean isMandatory()
{
return mandatory;
}
-
+
public void setMandatory( Boolean mandatory )
{
this.mandatory = mandatory;
}
@JsonProperty
- @JsonSerialize( as = BaseIdentifiableObject.class )
- @JsonView( { DetailedView.class, ExportView.class, WithoutOrganisationUnitsView.class } )
- @JacksonXmlProperty( localName = "personAttribute", namespace = DxfNamespaces.DXF_2_0 )
+ @JsonSerialize(as = BaseIdentifiableObject.class)
+ @JsonView({ DetailedView.class, ExportView.class, WithoutOrganisationUnitsView.class })
+ @JacksonXmlProperty(localName = "personAttribute", namespace = DxfNamespaces.DXF_2_0)
public TrackedEntityAttribute getAttribute()
{
return attribute;
@@ -173,8 +172,8 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class, WithoutOrganisationUnitsView.class } )
- @JacksonXmlProperty( localName = "displayInList", namespace = DxfNamespaces.DXF_2_0 )
+ @JsonView({ DetailedView.class, ExportView.class, WithoutOrganisationUnitsView.class })
+ @JacksonXmlProperty(localName = "displayInList", namespace = DxfNamespaces.DXF_2_0)
public boolean isDisplayInList()
{
return displayInList;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttributeService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttributeService.java 2014-04-14 06:52:39 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttributeService.java 2014-05-23 15:28:46 +0000
@@ -32,7 +32,6 @@
/**
* @author Chau Thu Tran
- *
* @version $ ProgramTrackedEntityAttributeService.java Mar 19, 2014 2:53:34 PM
* $
*/
@@ -40,10 +39,9 @@
{
/**
* Get ProgramTrackedEntityAttribute by Program and TrackedEntityAttribute
- *
- * @param program Program
+ *
+ * @param program Program
* @param attribute TrackedEntityAttribute
- *
* @return ProgramTrackedEntityAttribute
*/
ProgramTrackedEntityAttribute getProgramTrackedEntityAttribute( Program program, TrackedEntityAttribute attribute );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttributeStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttributeStore.java 2014-04-14 06:52:39 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttributeStore.java 2014-05-23 15:28:46 +0000
@@ -32,16 +32,15 @@
/**
* @author Chau Thu Tran
- *
* @version $ ProgramTrackedEntityAttributeStore.java Mar 19, 2014 2:54:23 PM $
*/
public interface ProgramTrackedEntityAttributeStore
{
/**
* Get ProgramTrackedEntityAttribute by Program and TrackedEntityAttribute
- * @param program Program
+ *
+ * @param program Program
* @param attribute TrackedEntityAttribute
- *
* @return ProgramTrackedEntityAttribute
*/
ProgramTrackedEntityAttribute get( Program program, TrackedEntityAttribute attribute );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java 2014-05-23 15:09:21 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidation.java 2014-05-23 15:28:46 +0000
@@ -46,13 +46,11 @@
public class ProgramValidation
extends BaseIdentifiableObject
{
+ public static final String SEPARATOR_OBJECT = ":";
/**
* Determines if a de-serialized file is compatible with this class.
*/
private static final long serialVersionUID = 4785165717118297802L;
-
- public static final String SEPARATOR_OBJECT = ":";
-
public static String OBJECT_PROGRAM_STAGE_DATAELEMENT = "DE";
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationService.java 2014-05-16 15:26:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationService.java 2014-05-23 15:28:46 +0000
@@ -40,68 +40,63 @@
/**
* Adds an {@link ProgramValidation}
- *
+ *
* @param programValidation The to ProgramValidation add.
- *
* @return A generated unique id of the added {@link ProgramValidation}.
*/
int addProgramValidation( ProgramValidation programValidation );
/**
* Deletes a {@link ProgramValidation}
- *
+ *
* @param programValidation The ProgramValidation to delete.
*/
void deleteProgramValidation( ProgramValidation programValidation );
/**
* Updates an {@link ProgramValidation}.
- *
+ *
* @param programValidation The ProgramValidation to update.
*/
void updateProgramValidation( ProgramValidation programValidation );
/**
* Returns a {@link ProgramValidation}.
- *
+ *
* @param id the id of the ProgramValidation to return.
- *
* @return the ProgramValidation with the given id
*/
ProgramValidation getProgramValidation( int id );
/**
* Returns all {@link ProgramValidation}.
- *
+ *
* @return a collection of all ProgramValidation, or an empty collection if
- * there are no ProgramValidations.
+ * there are no ProgramValidations.
*/
Collection<ProgramValidation> getAllProgramValidation();
/**
* Get validation by {@link Program}
- *
+ *
* @param program Program
- *
* @return ProgramValidation list
*/
Collection<ProgramValidation> getProgramValidation( Program program );
/**
* Get validation by program stage
- *
+ *
* @param programStage {@link ProgramStage}
- *
* @return ProgramValidation list
*/
Collection<ProgramValidation> getProgramValidation( ProgramStage programStage );
/**
* Get validation violated in an event
- *
- * @param validation ProgramValidation List
+ *
+ * @param validation ProgramValidation List
* @param programStageInstance {@link ProgramStageInstance}
- *
* @return List of validation violated
*/
Collection<ProgramValidationResult> validate( Collection<ProgramValidation> validation,
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationStore.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationStore.java 2014-05-23 15:28:46 +0000
@@ -28,10 +28,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.hisp.dhis.common.GenericStore;
+
import java.util.Collection;
-import org.hisp.dhis.common.GenericStore;
-
/**
* @author Chau Thu Tran
* @version $ ProgramValidationStore.java Apr 28, 2011 10:33:44 AM $
@@ -43,9 +43,8 @@
/**
* Get validation by program
- *
+ *
* @param program {@link Program}
- *
* @return ProgramValidation list
*/
Collection<ProgramValidation> get( Program program );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageDataElementSortOrderComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageDataElementSortOrderComparator.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageDataElementSortOrderComparator.java 2014-05-23 15:28:46 +0000
@@ -28,21 +28,21 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.hisp.dhis.program.ProgramStageDataElement;
+
import java.util.Comparator;
-import org.hisp.dhis.program.ProgramStageDataElement;
-
public class ProgramStageDataElementSortOrderComparator
implements Comparator<ProgramStageDataElement>
{
@Override
public int compare( ProgramStageDataElement object0, ProgramStageDataElement object1 )
{
- if ( object0.getDataElement().getSortOrder() == null )
+ if ( object0.getDataElement().getSortOrder() == null )
{
return object1.getDataElement().getSortOrder() != null ? -1 : 0;
}
-
+
return object0.getDataElement().getSortOrder().compareTo( object1.getDataElement().getSortOrder() );
}
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageInstanceDueDateComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageInstanceDueDateComparator.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageInstanceDueDateComparator.java 2014-05-23 15:28:46 +0000
@@ -28,13 +28,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.hisp.dhis.program.ProgramStageInstance;
+
import java.util.Comparator;
-import org.hisp.dhis.program.ProgramStageInstance;
-
/**
* @author Chau Thu Tran
- *
* @version $ProgramStageInstanceDueDateComparator.java Jun 7, 2012 9:49:25 AM$
*/
public class ProgramStageInstanceDueDateComparator
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageInstanceVisitDateComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageInstanceVisitDateComparator.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageInstanceVisitDateComparator.java 2014-05-23 15:28:46 +0000
@@ -28,14 +28,13 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.hisp.dhis.program.ProgramStageInstance;
+
import java.util.Comparator;
import java.util.Date;
-import org.hisp.dhis.program.ProgramStageInstance;
-
/**
* @author Chau Thu Tran
- *
* @version ProgramStageInstanceVisitDateComparator.java 8:24:02 PM Mar 5, 2013
* $
*/
@@ -44,8 +43,8 @@
{
public int compare( ProgramStageInstance programStageInstance1, ProgramStageInstance programStageInstance2 )
{
- Date d1 = (programStageInstance1.getExecutionDate() != null ) ? programStageInstance1.getExecutionDate() : programStageInstance1.getDueDate();
- Date d2 = (programStageInstance2.getExecutionDate() != null ) ? programStageInstance2.getExecutionDate() : programStageInstance2.getDueDate();
+ Date d1 = (programStageInstance1.getExecutionDate() != null) ? programStageInstance1.getExecutionDate() : programStageInstance1.getDueDate();
+ Date d2 = (programStageInstance2.getExecutionDate() != null) ? programStageInstance2.getExecutionDate() : programStageInstance2.getDueDate();
if ( d1.before( d2 ) )
{
return -1;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageMinDaysComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageMinDaysComparator.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageMinDaysComparator.java 2014-05-23 15:28:46 +0000
@@ -28,13 +28,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.hisp.dhis.program.ProgramStage;
+
import java.util.Comparator;
-import org.hisp.dhis.program.ProgramStage;
-
/**
* @author Chau Thu Tran
- *
* @version $ProgramStageMinDaysComparator.java Jun 12, 2012 3:22:20 PM$
*/
public class ProgramStageMinDaysComparator implements Comparator<ProgramStage>
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageSectionSortOrderComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageSectionSortOrderComparator.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/comparator/ProgramStageSectionSortOrderComparator.java 2014-05-23 15:28:46 +0000
@@ -28,13 +28,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.hisp.dhis.program.ProgramStageSection;
+
import java.util.Comparator;
-import org.hisp.dhis.program.ProgramStageSection;
-
/**
* @author Chau Thu Tran
- *
* @version ProgramStageSectionSortOrderComparator.java 9:32:23 AM Feb 4, 2013 $
*/
public class ProgramStageSectionSortOrderComparator