dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21857
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10449: Cleanup code.
------------------------------------------------------------
revno: 10449
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-04-02 12:33:46 +0700
message:
Cleanup code.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ValidateProgramInstanceAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.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-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ValidateProgramInstanceAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ValidateProgramInstanceAction.java 2013-04-02 04:33:34 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/ValidateProgramInstanceAction.java 2013-04-02 05:33:46 +0000
@@ -33,8 +33,6 @@
import java.util.Map;
import org.hisp.dhis.caseentry.state.SelectedStateManager;
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.program.ProgramExpressionService;
import org.hisp.dhis.program.ProgramStageInstance;
import org.hisp.dhis.program.ProgramValidation;
import org.hisp.dhis.program.ProgramValidationResult;
@@ -57,14 +55,6 @@
private ProgramValidationService programValidationService;
- private ProgramExpressionService programExpressionService;
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private I18nFormat format;
-
// -------------------------------------------------------------------------
// Output
// -------------------------------------------------------------------------
@@ -79,21 +69,11 @@
// Getters && Setters
// -------------------------------------------------------------------------
- public void setProgramExpressionService( ProgramExpressionService programExpressionService )
- {
- this.programExpressionService = programExpressionService;
- }
-
public void setSelectedStateManager( SelectedStateManager selectedStateManager )
{
this.selectedStateManager = selectedStateManager;
}
- public void setFormat( I18nFormat format )
- {
- this.format = format;
- }
-
public Map<Integer, String> getLeftsideFormulaMap()
{
return leftsideFormulaMap;
@@ -124,59 +104,13 @@
{
programValidationResults = new ArrayList<ProgramValidationResult>();
- // ---------------------------------------------------------------------
- // Get selected objects
- // ---------------------------------------------------------------------
-
ProgramStageInstance programStageInstance = selectedStateManager.getSelectedProgramStageInstance();
- // ---------------------------------------------------------------------
- // Check validations for dataelement into multi-stages
- // ---------------------------------------------------------------------
-
- // runProgramValidation( programValidationService.getProgramValidation(
- // programStageInstance.getProgramStage() ),
- // programStageInstance );
-
Collection<ProgramValidation> validation = programValidationService.getProgramValidation( programStageInstance
.getProgramStage() );
programValidationResults = programValidationService.validate( validation, programStageInstance );
-
+
return SUCCESS;
}
- // -------------------------------------------------------------------------
- // Support method
- // -------------------------------------------------------------------------
-
- private void runProgramValidation( Collection<ProgramValidation> validations,
- ProgramStageInstance programStageInstance )
- {
- // if ( validations != null )
- // {
- // for ( ProgramValidation validation : validations )
- // {
- // ProgramValidationResult validationResult =
- // programValidationService.validate( validation,
- // programStageInstance, format );
- //
- // if ( validationResult != null )
- // {
- // programValidationResults.add( validationResult );
- //
- // leftsideFormulaMap.put(
- // validationResult.getProgramValidation().getId(),
- // programExpressionService.getExpressionDescription(
- // validationResult.getProgramValidation()
- // .getLeftSide().getExpression() ) );
- //
- // rightsideFormulaMap.put(
- // validationResult.getProgramValidation().getId(),
- // programExpressionService.getExpressionDescription(
- // validationResult.getProgramValidation()
- // .getRightSide().getExpression() ) );
- // }
- // }
- // }
- }
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-03-25 04:02:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-04-02 05:33:46 +0000
@@ -346,8 +346,6 @@
ref="org.hisp.dhis.caseentry.state.SelectedStateManager" />
<property name="programValidationService"
ref="org.hisp.dhis.program.ProgramValidationService" />
- <property name="programExpressionService"
- ref="org.hisp.dhis.program.ProgramExpressionService" />
</bean>
<bean id="org.hisp.dhis.caseentry.action.GetProgramMetaDataAction"