dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10073
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2750: Reverted r 2748
------------------------------------------------------------
revno: 2750
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-01-25 20:27:15 +0100
message:
Reverted r 2748
modified:
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/TextUtils.java
dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/TextUtilsTest.java
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.js
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOperandsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/GetDataElementCategoryListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categorycombo/GetDataElementCategoryComboListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/concept/GetConceptListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ValidateDataElementAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/GetDataElementGroupListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroupset/ListDataElementGroupSetAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/GetIndicatorGroupListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/ListIndicatorGroupSetAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatortype/GetIndicatorTypeListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataSetListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroup/GetOrganisationUnitGroupListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroupset/GetGroupSetListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserListAction.java
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/GetAllChartsAction.java
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/document/action/GetAllDocumentsAction.java
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/GetAllReportsAction.java
dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/GetValidationRuleListAction.java
dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/validationrulegroup/GetValidationRuleGroupListAction.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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/TextUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/TextUtils.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/TextUtils.java 2011-01-25 19:27:15 +0000
@@ -98,12 +98,4 @@
{
return string != null && string.trim().length() == 0 ? null : string;
}
-
- /**
- * Returns a trimmed/reduced at the redundant spaces string for a given input
- */
- public static String getTrimmedValue( String value )
- {
- return value.trim().replaceAll( "\\s+", " " );
- }
}
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/TextUtilsTest.java'
--- dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/TextUtilsTest.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/TextUtilsTest.java 2011-01-25 19:27:15 +0000
@@ -30,7 +30,6 @@
import junit.framework.TestCase;
import static org.hisp.dhis.system.util.TextUtils.subString;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
/**
* @author Lars Helge Overland
@@ -57,9 +56,4 @@
assertEquals( "", subString( STRING, 4, 0 ) );
}
-
- public void testGetTrimmedValue()
- {
- assertEquals( "abc def 123", getTrimmedValue( " abc def 123 " ) );
- }
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.ajax.js 2011-01-25 19:27:15 +0000
@@ -188,7 +188,7 @@
this.params = params;
this.jQuerySelectionString = jQuerySelectionString;
- jQuery.postJSON( '../dhis-web-commons-ajax-json/getOperands.action'
+ jQuery.getJSON( '../dhis-web-commons-ajax-json/getOperands.action'
, this.params
, function( json ){
jQuery.each( json.operands, function(i, item){
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.js 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.js 2011-01-25 19:27:15 +0000
@@ -660,7 +660,7 @@
// select by name and filter by form for performance over form.find("[name=...]")
var form = this.currentForm;
return $(document.getElementsByName(name)).map(function(index, element) {
- return element.form == form && element.name == name && element || null;
+ return element.form == form && element.name == name && element || null;
});
},
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOperandsAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOperandsAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOperandsAction.java 2011-01-25 19:27:15 +0000
@@ -27,13 +27,11 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
-
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import org.apache.commons.lang.StringUtils;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementCategoryService;
import org.hisp.dhis.dataelement.DataElementOperand;
@@ -53,7 +51,7 @@
extends ActionPagingSupport<DataElementOperand>
{
private static Filter<DataElement> AGGREGATABLE_FILTER = new AggregatableDataElementFilter();
-
+
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
@@ -89,12 +87,12 @@
{
this.id = id;
}
-
+
private String key;
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
private Integer dataSetId;
@@ -152,7 +150,7 @@
{
dataElements = new ArrayList<DataElement>( dataElementService.getDataElementGroup( id ).getMembers() );
}
- else if ( isNotBlank( key ) )
+ else if ( !StringUtils.isEmpty( key ) )
{
dataElements = new ArrayList<DataElement>( dataElementService.getDataElementsLikeName( key ) );
}
@@ -175,8 +173,7 @@
FilterUtils.filter( dataElements, new DataElementPeriodTypeFilter( periodType ) );
}
- operands = new ArrayList<DataElementOperand>( dataElementCategoryService.getOperands( dataElements,
- includeTotals ) );
+ operands = new ArrayList<DataElementOperand>( dataElementCategoryService.getOperands( dataElements, includeTotals ) );
Collections.sort( operands, new DataElementOperandNameComparator() );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/GetDataElementCategoryListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/GetDataElementCategoryListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/GetDataElementCategoryListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -74,9 +73,9 @@
{
return defaultCategory;
}
-
+
private String key;
-
+
public String getKey()
{
return key;
@@ -84,7 +83,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
@@ -98,18 +97,16 @@
if ( isNotBlank( key ) ) // Filter on key only if set
{
this.paging = createPaging( dataElementCategoryService.getDataElementCategoryCountByName( key ) );
-
- dataElementCategories = new ArrayList<DataElementCategory>( dataElementCategoryService
- .getDataElementCategorysBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
+
+ dataElementCategories = new ArrayList<DataElementCategory>( dataElementCategoryService.getDataElementCategorysBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
}
else
{
this.paging = createPaging( dataElementCategoryService.getDataElementCategoryCount() );
-
- dataElementCategories = new ArrayList<DataElementCategory>( dataElementCategoryService
- .getDataElementCategorysBetween( paging.getStartPos(), paging.getPageSize() ) );
+
+ dataElementCategories = new ArrayList<DataElementCategory>( dataElementCategoryService.getDataElementCategorysBetween( paging.getStartPos(), paging.getPageSize() ) );
}
-
+
Collections.sort( dataElementCategories, new DataElementCategoryNameComparator() );
return SUCCESS;
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categorycombo/GetDataElementCategoryComboListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categorycombo/GetDataElementCategoryComboListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categorycombo/GetDataElementCategoryComboListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -74,9 +73,8 @@
{
return defaultCombo;
}
-
private String key;
-
+
public String getKey()
{
return key;
@@ -84,9 +82,10 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -99,20 +98,18 @@
if ( isNotBlank( key ) ) // Filter on key only if set
{
this.paging = createPaging( dataElementCategoryService.getDataElementCategoryComboCountByName( key ) );
-
- dataElementCategoryCombos = new ArrayList<DataElementCategoryCombo>( dataElementCategoryService
- .getDataElementCategoryCombosBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
+
+ dataElementCategoryCombos = new ArrayList<DataElementCategoryCombo>( dataElementCategoryService.getDataElementCategoryCombosBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
}
else
{
this.paging = createPaging( dataElementCategoryService.getDataElementCategoryComboCount() );
-
- dataElementCategoryCombos = new ArrayList<DataElementCategoryCombo>( dataElementCategoryService
- .getDataElementCategoryCombosBetween( paging.getStartPos(), paging.getPageSize() ) );
+
+ dataElementCategoryCombos = new ArrayList<DataElementCategoryCombo>( dataElementCategoryService.getDataElementCategoryCombosBetween( paging.getStartPos(), paging.getPageSize() ) );
}
-
+
Collections.sort( dataElementCategoryCombos, new DataElementCategoryComboNameComparator() );
-
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/concept/GetConceptListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/concept/GetConceptListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/concept/GetConceptListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -84,7 +83,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -142,7 +141,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
@@ -150,7 +149,7 @@
// -------------------------------------------------------------------------
public String execute()
- {
+ {
if ( dataDictionaryId == null ) // None, get current data dictionary
{
dataDictionaryId = dataDictionaryModeManager.getCurrentDataDictionary();
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ValidateDataElementAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ValidateDataElementAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ValidateDataElementAction.java 2011-01-25 19:27:15 +0000
@@ -115,6 +115,7 @@
if ( name != null )
{
+
DataElement match = dataElementService.getDataElementByName( name );
if ( match != null && (id == null || match.getId() != id) )
@@ -148,7 +149,7 @@
return ERROR;
}
- }
+ }
// ---------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/GetDataElementGroupListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/GetDataElementGroupListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/GetDataElementGroupListAction.java 2011-01-25 19:27:15 +0000
@@ -34,8 +34,7 @@
import org.hisp.dhis.dataelement.DataElementService;
import org.hisp.dhis.paging.ActionPagingSupport;
-import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
+import static org.apache.commons.lang.StringUtils.*;
/**
* @author Torgeir Lorange Ostby
@@ -68,7 +67,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroupset/ListDataElementGroupSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroupset/ListDataElementGroupSetAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroupset/ListDataElementGroupSetAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -77,7 +76,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -142,11 +141,11 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
- // Action implementation
+ // Action implemantation
// -------------------------------------------------------------------------
public String execute()
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/GetIndicatorGroupListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/GetIndicatorGroupListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/GetIndicatorGroupListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -77,7 +76,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/ListIndicatorGroupSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/ListIndicatorGroupSetAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroupset/ListIndicatorGroupSetAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -78,7 +77,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatortype/GetIndicatorTypeListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatortype/GetIndicatorTypeListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatortype/GetIndicatorTypeListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -77,7 +76,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java 2011-01-25 19:27:15 +0000
@@ -164,7 +164,6 @@
dataSet.setMobile( mobile );
dataSet.setVersion( 1 );
-
for ( String id : selectedList )
{
DataElement dataElement = dataElementService.getDataElement( Integer.parseInt( id ) );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataSetListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataSetListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/DataSetListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -96,7 +95,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroup/GetOrganisationUnitGroupListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroup/GetOrganisationUnitGroupListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroup/GetOrganisationUnitGroupListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -77,7 +76,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroupset/GetGroupSetListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroupset/GetGroupSetListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunitgroupset/GetGroupSetListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -77,7 +76,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.List;
@@ -70,7 +69,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
public String getKey()
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.List;
@@ -71,7 +70,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
// Action Implementation
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -86,36 +85,34 @@
private String key;
+ public void setKey( String key )
+ {
+ this.key = key;
+ }
+
public String getKey()
{
return key;
}
- public void setKey( String key )
- {
- this.key = getTrimmedValue( key );
- }
-
// -------------------------------------------------------------------------
// Action implemantation
// -------------------------------------------------------------------------
public String execute()
throws Exception
- {
+ {
if ( isNotBlank( key ) ) // Filter on key only if set
{
this.paging = createPaging( userService.getUserCountByName( key ) );
-
- userCredentialsList = new ArrayList<UserCredentials>( userService.getUsersBetweenByName( key, paging
- .getStartPos(), paging.getPageSize() ) );
+
+ userCredentialsList = new ArrayList<UserCredentials>( userService.getUsersBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
}
else
{
this.paging = createPaging( userService.getUserCount() );
-
- userCredentialsList = new ArrayList<UserCredentials>( userService.getUsersBetween( paging.getStartPos(),
- paging.getPageSize() ) );
+
+ userCredentialsList = new ArrayList<UserCredentials>( userService.getUsersBetween( paging.getStartPos(), paging.getPageSize() ) );
}
Collections.sort( userCredentialsList, new UsernameComparator() );
@@ -123,7 +120,7 @@
UserCredentials userCredentials = userService.getUserCredentials( currentUser );
currentUserName = userCredentials.getUsername();
-
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/GetAllChartsAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/GetAllChartsAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/GetAllChartsAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -70,7 +69,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
private List<Chart> charts;
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/document/action/GetAllDocumentsAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/document/action/GetAllDocumentsAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/document/action/GetAllDocumentsAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.List;
@@ -75,7 +74,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/GetAllReportsAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/GetAllReportsAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/GetAllReportsAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import static org.hisp.dhis.util.ContextUtils.getBaseUrl;
import java.util.ArrayList;
@@ -102,7 +101,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/GetValidationRuleListAction.java'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/GetValidationRuleListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/GetValidationRuleListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -77,7 +76,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/validationrulegroup/GetValidationRuleGroupListAction.java'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/validationrulegroup/GetValidationRuleGroupListAction.java 2011-01-25 17:47:57 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/validationrulegroup/GetValidationRuleGroupListAction.java 2011-01-25 19:27:15 +0000
@@ -28,7 +28,6 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.system.util.TextUtils.getTrimmedValue;
import java.util.ArrayList;
import java.util.Collections;
@@ -77,7 +76,7 @@
public void setKey( String key )
{
- this.key = getTrimmedValue( key );
+ this.key = key;
}
// -------------------------------------------------------------------------