dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10058
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2744: Removed the storedBy and timestamp values from the response to the saveValue action. Not in use a...
------------------------------------------------------------
revno: 2744
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-01-25 17:14:19 +0100
message:
Removed the storedBy and timestamp values from the response to the saveValue action. Not in use and stealing a few bytes for each value saved.
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveCommentAction.java
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveValueAction.java
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/status.vm
--
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-dataentry/src/main/java/org/hisp/dhis/de/action/SaveCommentAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveCommentAction.java 2010-08-20 08:34:39 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveCommentAction.java 2011-01-25 16:14:19 +0000
@@ -144,20 +144,6 @@
return statusCode;
}
- private Date timestamp;
-
- public Date getTimestamp()
- {
- return timestamp;
- }
-
- private String storedBy;
-
- public String getStoredBy()
- {
- return storedBy;
- }
-
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -172,7 +158,7 @@
DataElementCategoryOptionCombo optionCombo = categoryService.getDataElementCategoryOptionCombo( optionComboId );
- storedBy = currentUserService.getCurrentUsername();
+ String storedBy = currentUserService.getCurrentUsername();
if ( storedBy == null )
{
@@ -213,12 +199,6 @@
dataValueService.updateDataValue( dataValue );
}
- if ( dataValue != null )
- {
- this.timestamp = dataValue.getTimestamp();
- this.storedBy = dataValue.getStoredBy();
- }
-
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveValueAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveValueAction.java 2010-11-11 21:55:05 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SaveValueAction.java 2011-01-25 16:14:19 +0000
@@ -142,27 +142,13 @@
return optionComboId;
}
- private int statusCode;
+ private int statusCode = 0;
public int getStatusCode()
{
return statusCode;
}
- private Date timestamp;
-
- public Date getTimestamp()
- {
- return timestamp;
- }
-
- private String storedBy;
-
- public String getStoredBy()
- {
- return storedBy;
- }
-
private String inputId;
public String getInputId()
@@ -187,7 +173,7 @@
DataElement dataElement = dataElementService.getDataElement( dataElementId );
- storedBy = currentUserService.getCurrentUsername();
+ String storedBy = currentUserService.getCurrentUsername();
DataElementCategoryOptionCombo optionCombo = categoryService.getDataElementCategoryOptionCombo( optionComboId );
@@ -234,12 +220,6 @@
dataValueService.updateDataValue( dataValue );
}
- if ( dataValue != null )
- {
- this.timestamp = dataValue.getTimestamp();
- this.storedBy = dataValue.getStoredBy();
- }
-
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/status.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/status.vm 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/status.vm 2011-01-25 16:14:19 +0000
@@ -1,5 +1,3 @@
<status>
<code>$statusCode</code>
- <timestamp>#if( $timestamp ) $format.formatDateTime( $timestamp ) #end</timestamp>
- <storedBy>$!encoder.xmlEncode( storedBy )</storedBy>
</status>