dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41348
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21060: Renamed method
------------------------------------------------------------
revno: 21060
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2015-11-15 21:41:26 +0100
message:
Renamed method
removed:
dhis-2/dhis-api/src/test/java/org/hisp/dhis/query/
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DimensionalObjectUtils.java
dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/DimensionalObjectUtilsTest.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultDataQueryService.java
dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/dimension/DefaultDimensionService.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/common/DimensionalObjectUtils.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DimensionalObjectUtils.java 2015-09-21 13:36:12 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DimensionalObjectUtils.java 2015-11-15 20:41:26 +0000
@@ -55,7 +55,7 @@
public class DimensionalObjectUtils
{
private static final Pattern INT_PATTERN = Pattern.compile( "^(0|-?[1-9]\\d*)$" );
- private static final Pattern DIMENSIONAL_OPERAND_PATTERN = Pattern.compile( "([a-zA-Z]\\w{10})\\.([a-zA-Z]\\w{10})" );
+ private static final Pattern COMPOSITE_DIMENSIONAL_OBJECT_PATTERN = Pattern.compile( "([a-zA-Z]\\w{10})\\.([a-zA-Z]\\w{10})" );
public static final String TITLE_ITEM_SEP = ", ";
@@ -332,14 +332,15 @@
}
/**
- * Indicates whether the given string is a valid full operand expression.
+ * Indicates whether the given string is a composite dimensional object
+ * expression.
*
* @param expression the expression.
- * @return true if valid full operand expression, false if not.
+ * @return true if composite dimensional object expression, false if not.
*/
- public static boolean isValidDimensionalOperand( String expression )
+ public static boolean isCompositeDimensionalObject( String expression )
{
- return expression != null && DIMENSIONAL_OPERAND_PATTERN.matcher( expression ).matches();
+ return expression != null && COMPOSITE_DIMENSIONAL_OBJECT_PATTERN.matcher( expression ).matches();
}
/**
=== modified file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/DimensionalObjectUtilsTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/DimensionalObjectUtilsTest.java 2015-07-15 17:51:39 +0000
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/common/DimensionalObjectUtilsTest.java 2015-11-15 20:41:26 +0000
@@ -48,11 +48,11 @@
}
@Test
- public void testValidFullOperand()
+ public void testIsCompositeDimensionObject()
{
- assertTrue( DimensionalObjectUtils.isValidDimensionalOperand( "d4HjsAHkj42.G142kJ2k3Gj" ) );
+ assertTrue( DimensionalObjectUtils.isCompositeDimensionalObject( "d4HjsAHkj42.G142kJ2k3Gj" ) );
- assertFalse( DimensionalObjectUtils.isValidDimensionalOperand( "d4HjsAHkj42" ) );
- assertFalse( DimensionalObjectUtils.isValidDimensionalOperand( "14HjsAHkj42-G142kJ2k3Gj" ) );
+ assertFalse( DimensionalObjectUtils.isCompositeDimensionalObject( "d4HjsAHkj42" ) );
+ assertFalse( DimensionalObjectUtils.isCompositeDimensionalObject( "14HjsAHkj42-G142kJ2k3Gj" ) );
}
}
=== removed directory 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/query'
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultDataQueryService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultDataQueryService.java 2015-11-15 20:30:50 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultDataQueryService.java 2015-11-15 20:41:26 +0000
@@ -267,7 +267,7 @@
dataDimensionItems.addAll( group.getMembers() );
}
}
- else if ( DimensionalObjectUtils.isValidDimensionalOperand( uid ) )
+ else if ( DimensionalObjectUtils.isCompositeDimensionalObject( uid ) )
{
DataElementOperand operand = operandService.getDataElementOperand(
splitSafe( uid, DataElementOperand.ESCAPED_SEPARATOR, 0 ), splitSafe( uid, DataElementOperand.ESCAPED_SEPARATOR, 1 ) );
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/dimension/DefaultDimensionService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/dimension/DefaultDimensionService.java 2015-10-11 20:24:39 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/dimension/DefaultDimensionService.java 2015-11-15 20:41:26 +0000
@@ -455,7 +455,7 @@
{
for ( String uid : uids )
{
- if ( DimensionalObjectUtils.isValidDimensionalOperand( uid ) )
+ if ( DimensionalObjectUtils.isCompositeDimensionalObject( uid ) )
{
DataElementOperand operand = operandService.getOrAddDataElementOperand(
splitSafe( uid, DataElementOperand.ESCAPED_SEPARATOR, 0 ), splitSafe( uid, DataElementOperand.ESCAPED_SEPARATOR, 1 ) );