dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19561
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8579: Removed property alternativeName from DataElement and Indicator objects.
------------------------------------------------------------
revno: 8579
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-10-18 15:04:28 +0200
message:
Removed property alternativeName from DataElement and Indicator objects.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseNameableObject.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/GenericNameableObjectStore.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/NameableObject.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/Period.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/Indicator.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorServiceTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorStoreTest.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/analysis/DefaultImportAnalyser.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorRowHandler.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/DataElementImporter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/IndicatorImporter.java
dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/analysis/ImportAnalyserTest.java
dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/DXFImportServiceTest.java
dhis-2/dhis-services/dhis-service-importexport/src/test/resources/ExportMetaData.xml
dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfA.xml
dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfA.xml.gz
dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfA.zip
dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfB.xml
dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfC.xml
dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfD.xml
dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfE.xml
dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfF.xml
dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfG.xml
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultPatientMobileSettingService.java
dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/HibernatePatientMobileSettingStore.java
dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/parse/DefaultParserManager.java
dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementBatchHandler.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorBatchHandler.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java
dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/AddDataElementAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.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/indicator/AddIndicatorAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/UpdateIndicatorAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/ValidateIndicatorAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicator.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.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-api/src/main/java/org/hisp/dhis/common/BaseNameableObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseNameableObject.java 2012-06-25 20:32:44 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseNameableObject.java 2012-10-18 13:04:28 +0000
@@ -50,11 +50,6 @@
private static final long serialVersionUID = 714136796552146362L;
/**
- * An alternative name of this Object. Optional but unique.
- */
- protected String alternativeName;
-
- /**
* An short name representing this Object. Optional but unique.
*/
protected String shortName;
@@ -82,11 +77,10 @@
{
}
- public BaseNameableObject( int id, String uid, String name, String alternativeName, String shortName,
+ public BaseNameableObject( int id, String uid, String name, String shortName,
String code, String description )
{
super( id, uid, name );
- this.alternativeName = alternativeName;
this.shortName = shortName;
this.code = code;
this.description = description;
@@ -116,16 +110,6 @@
return result;
}
- public String getAlternativeName()
- {
- return alternativeName;
- }
-
- public void setAlternativeName( String alternativeName )
- {
- this.alternativeName = alternativeName;
- }
-
@JsonProperty
@JsonView( { ShortNameView.class, DetailedView.class, ExportView.class} )
@JacksonXmlProperty( isAttribute = true )
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/GenericNameableObjectStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/GenericNameableObjectStore.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/GenericNameableObjectStore.java 2012-10-18 13:04:28 +0000
@@ -35,14 +35,6 @@
extends GenericIdentifiableObjectStore<T>
{
/**
- * Retrieves the object with the given alternative name.
- *
- * @param name the alternative name.
- * @return the object with the given alternative name.
- */
- T getByAlternativeName( String alternativeName );
-
- /**
* Retrieves the object with the given short name.
*
* @param name the short name.
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/NameableObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/NameableObject.java 2012-04-11 15:11:09 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/NameableObject.java 2012-10-18 13:04:28 +0000
@@ -34,11 +34,9 @@
enum NameableProperty
{
- SHORT_NAME, ALTERNATIVE_NAME
+ SHORT_NAME
}
- String getAlternativeName();
-
String getShortName();
String getDescription();
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java 2012-10-04 16:52:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java 2012-10-18 13:04:28 +0000
@@ -314,20 +314,6 @@
// throw new UnsupportedOperationException( "Cannot set shortName on DataElementCategoryOptionCombo: " + shortName );
}
- @Override
- @JsonIgnore
- public String getAlternativeName()
- {
- return getName();
- }
-
- @Override
- public void setAlternativeName( String alternativeName )
- {
- // throw new UnsupportedOperationException( "Cannot set alternativeName on DataElementCategoryOptionCombo: "
- // + alternativeName );
- }
-
@JsonProperty
@JsonSerialize( contentAs = BaseIdentifiableObject.class )
@JsonView( {DetailedView.class, ExportView.class} )
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java 2012-07-20 07:04:42 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java 2012-10-18 13:04:28 +0000
@@ -108,15 +108,6 @@
DataElement getDataElementByName( String name );
/**
- * Returns a DataElement with a given alternative name.
- *
- * @param alternativeName the alternative name of the DataElement to return.
- * @return the DataElement with the given alternative name, or null if no
- * match.
- */
- DataElement getDataElementByAlternativeName( String alternativeName );
-
- /**
* Returns List of DataElements with a given key.
*
* @param key the name of the DataElement to return.
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorService.java 2012-05-06 18:55:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorService.java 2012-10-18 13:04:28 +0000
@@ -62,8 +62,6 @@
Indicator getIndicatorByShortName( String shortName );
- Indicator getIndicatorByAlternativeName( String alternativeName );
-
Indicator getIndicatorByCode( String code );
Collection<Indicator> getIndicatorsWithGroupSets();
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/Period.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/Period.java 2012-07-14 10:40:48 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/Period.java 2012-10-18 13:04:28 +0000
@@ -146,7 +146,6 @@
public Period copyTransientProperties( Period other )
{
this.name = other.getName();
- this.alternativeName = other.getAlternativeName();
this.shortName = other.getShortName();
this.code = other.getCode();
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java 2012-06-06 13:31:45 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java 2012-10-18 13:04:28 +0000
@@ -352,13 +352,6 @@
map.put( object.getShortName(), object );
}
}
- else if ( property == NameableProperty.ALTERNATIVE_NAME )
- {
- if ( object.getAlternativeName() != null )
- {
- map.put( object.getAlternativeName(), object );
- }
- }
}
return map;
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java 2012-07-20 07:04:42 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java 2012-10-18 13:04:28 +0000
@@ -197,11 +197,6 @@
return i18n( i18nService, dataElementStore.searchDataElementsByName( key ) );
}
- public DataElement getDataElementByAlternativeName( String alternativeName )
- {
- return i18n( i18nService, dataElementStore.getByAlternativeName( alternativeName ) );
- }
-
public DataElement getDataElementByShortName( String shortName )
{
return i18n( i18nService, dataElementStore.getByShortName( shortName ) );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java 2012-05-06 18:55:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/DefaultIndicatorService.java 2012-10-18 13:04:28 +0000
@@ -153,11 +153,6 @@
return i18n( i18nService, indicatorStore.getByShortName( shortName ) );
}
- public Indicator getIndicatorByAlternativeName( String alternativeName )
- {
- return i18n( i18nService, indicatorStore.getByAlternativeName( alternativeName ) );
- }
-
public Indicator getIndicatorByCode( String code )
{
return i18n( i18nService, indicatorStore.getByCode( code ) );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2012-10-02 18:18:48 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2012-10-18 13:04:28 +0000
@@ -121,6 +121,8 @@
executeSql( "ALTER TABLE indicator DROP COLUMN denominatoraggregationtype" );
executeSql( "ALTER TABLE dataset DROP COLUMN locked" );
executeSql( "ALTER TABLE configuration DROP COLUMN completenessrecipientsid" );
+ executeSql( "ALTER TABLE dataelement DROP COLUMN alternativename" );
+ executeSql( "ALTER TABLE indicator DROP COLUMN alternativename" );
executeSql( "DROP INDEX crosstab" );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml 2012-07-10 11:18:29 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml 2012-10-18 13:04:28 +0000
@@ -15,8 +15,6 @@
</id>
&identifiableProperties;
- <property name="alternativeName" column="alternativename" not-null="false" unique="true" length="230" />
-
<property name="shortName" column="shortname" not-null="true" unique="true" length="50" />
<property name="description" type="text" />
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/Indicator.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/Indicator.hbm.xml 2011-11-23 18:07:35 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/Indicator.hbm.xml 2012-10-18 13:04:28 +0000
@@ -15,8 +15,6 @@
</id>
&identifiableProperties;
- <property name="alternativeName" column="alternativename" not-null="false" unique="true" length="230" />
-
<property name="shortName" column="shortname" not-null="true" unique="true" length="50" />
<property name="description" type="text" />
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java 2012-10-18 13:04:28 +0000
@@ -223,29 +223,6 @@
}
@Test
- public void testGetDataElementByAlternativeName()
- throws Exception
- {
- DataElement dataElementA = createDataElement( 'A' );
- DataElement dataElementB = createDataElement( 'B' );
- int idA = dataElementService.addDataElement( dataElementA );
- int idB = dataElementService.addDataElement( dataElementB );
-
- dataElementA = dataElementService.getDataElementByAlternativeName( "DataElementAlternativeA" );
- assertNotNull( dataElementA );
- assertEquals( idA, dataElementA.getId() );
- assertEquals( "DataElementA", dataElementA.getName() );
-
- dataElementB = dataElementService.getDataElementByAlternativeName( "DataElementAlternativeB" );
- assertNotNull( dataElementB );
- assertEquals( idB, dataElementB.getId() );
- assertEquals( "DataElementB", dataElementB.getName() );
-
- DataElement dataElementC = dataElementService.getDataElementByAlternativeName( "DataElementAlternativeC" );
- assertNull( dataElementC );
- }
-
- @Test
public void testGetDataElementByShortName()
throws Exception
{
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java 2012-10-18 13:04:28 +0000
@@ -200,28 +200,6 @@
}
@Test
- public void testGetDataElementByAlternativeName()
- {
- DataElement dataElementA = createDataElement( 'A' );
- DataElement dataElementB = createDataElement( 'B' );
- int idA = dataElementStore.save( dataElementA );
- int idB = dataElementStore.save( dataElementB );
-
- dataElementA = dataElementStore.getByAlternativeName( "DataElementAlternativeA" );
- assertNotNull( dataElementA );
- assertEquals( idA, dataElementA.getId() );
- assertEquals( "DataElementA", dataElementA.getName() );
-
- dataElementB = dataElementStore.getByAlternativeName( "DataElementAlternativeB" );
- assertNotNull( dataElementB );
- assertEquals( idB, dataElementB.getId() );
- assertEquals( "DataElementB", dataElementB.getName() );
-
- DataElement dataElementC = dataElementStore.getByAlternativeName( "DataElementAlternativeC" );
- assertNull( dataElementC );
- }
-
- @Test
public void testGetDataElementByShortName()
{
DataElement dataElementA = createDataElement( 'A' );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorServiceTest.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorServiceTest.java 2012-10-18 13:04:28 +0000
@@ -66,7 +66,6 @@
private void assertEq( char uniqueCharacter, Indicator indicator )
{
assertEquals( "Indicator" + uniqueCharacter, indicator.getName() );
- assertEquals( "IndicatorAlternative" + uniqueCharacter, indicator.getAlternativeName() );
assertEquals( "IndicatorShort" + uniqueCharacter, indicator.getShortName() );
assertEquals( "IndicatorCode" + uniqueCharacter, indicator.getCode() );
assertEquals( "IndicatorDescription" + uniqueCharacter, indicator.getDescription() );
@@ -447,31 +446,6 @@
}
@Test
- public void testGetIndicatorByAlternativeName()
- throws Exception
- {
- IndicatorType type = new IndicatorType( "IndicatorType", 100, false );
-
- indicatorService.addIndicatorType( type );
-
- Indicator indicatorA = createIndicator( 'A', type );
- Indicator indicatorB = createIndicator( 'B', type );
-
- int idA = indicatorService.addIndicator( indicatorA );
- int idB = indicatorService.addIndicator( indicatorB );
-
- assertNotNull( indicatorService.getIndicator( idA ) );
- assertNotNull( indicatorService.getIndicator( idB ) );
-
- indicatorA = indicatorService.getIndicatorByAlternativeName( "IndicatorAlternativeA" );
- assertNotNull( indicatorA );
- assertEq( 'A', indicatorA );
-
- Indicator indicatorC = indicatorService.getIndicatorByAlternativeName( "IndicatorAlternativeC" );
- assertNull( indicatorC );
- }
-
- @Test
public void testGetIndicatorByShortName()
throws Exception
{
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorStoreTest.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorStoreTest.java 2012-10-18 13:04:28 +0000
@@ -73,7 +73,6 @@
private void assertEq( char uniqueCharacter, Indicator indicator )
{
assertEquals( "Indicator" + uniqueCharacter, indicator.getName() );
- assertEquals( "IndicatorAlternative" + uniqueCharacter, indicator.getAlternativeName() );
assertEquals( "IndicatorShort" + uniqueCharacter, indicator.getShortName() );
assertEquals( "IndicatorCode" + uniqueCharacter, indicator.getCode() );
assertEquals( "IndicatorDescription" + uniqueCharacter, indicator.getDescription() );
@@ -323,31 +322,6 @@
}
@Test
- public void testGetIndicatorByAlternativeName()
- throws Exception
- {
- IndicatorType type = new IndicatorType( "IndicatorType", 100, false );
-
- indicatorTypeStore.save( type );
-
- Indicator indicatorA = createIndicator( 'A', type );
- Indicator indicatorB = createIndicator( 'B', type );
-
- int idA = indicatorStore.save( indicatorA );
- int idB = indicatorStore.save( indicatorB );
-
- assertNotNull( indicatorStore.get( idA ) );
- assertNotNull( indicatorStore.get( idB ) );
-
- indicatorA = indicatorStore.getByAlternativeName( "IndicatorAlternativeA" );
- assertNotNull( indicatorA );
- assertEq( 'A', indicatorA );
-
- Indicator indicatorC = indicatorStore.getByAlternativeName( "IndicatorAlternativeC" );
- assertNull( indicatorC );
- }
-
- @Test
public void testGetIndicatorByShortName()
throws Exception
{
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/analysis/DefaultImportAnalyser.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/analysis/DefaultImportAnalyser.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/analysis/DefaultImportAnalyser.java 2012-10-18 13:04:28 +0000
@@ -56,7 +56,6 @@
private static final Log log = LogFactory.getLog( DefaultImportAnalyser.class );
private static final String PROP_NAME = "name";
- private static final String PROP_ALT_NAME = "alternativename";
private static final String PROP_SHORT_NAME = "shortname";
private static final String PROP_CODE = "code";
private static final String PROP_PRIMARY_KEY = "primaryKey";
@@ -99,7 +98,6 @@
else if ( object instanceof DataElement )
{
values.add( new EntityPropertyValue( DataElement.class, PROP_NAME, ((DataElement)object).getName() ) );
- values.add( new EntityPropertyValue( DataElement.class, PROP_ALT_NAME, ((DataElement)object).getAlternativeName() ) );
values.add( new EntityPropertyValue( DataElement.class, PROP_SHORT_NAME, ((DataElement)object).getShortName() ) );
values.add( new EntityPropertyValue( DataElement.class, PROP_CODE, ((DataElement)object).getCode() ) );
@@ -108,7 +106,6 @@
else if ( object instanceof Indicator )
{
values.add( new EntityPropertyValue( Indicator.class, PROP_NAME, ((Indicator)object).getName() ) );
- values.add( new EntityPropertyValue( Indicator.class, PROP_ALT_NAME, ((Indicator)object).getAlternativeName() ) );
values.add( new EntityPropertyValue( Indicator.class, PROP_SHORT_NAME, ((Indicator)object).getShortName() ) );
values.add( new EntityPropertyValue( Indicator.class, PROP_CODE, ((Indicator)object).getCode() ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorRowHandler.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorRowHandler.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/file/rowhandler/IndicatorRowHandler.java 2012-10-18 13:04:28 +0000
@@ -87,12 +87,7 @@
public void handleRow( Object object )
{
final Indicator indicator = (Indicator) object;
-
- if ( indicator.getAlternativeName() != null && indicator.getAlternativeName().trim().length() == 0 )
- {
- indicator.setAlternativeName( null );
- }
-
+
if ( indicator.getCode() != null && indicator.getCode().trim().length() == 0 )
{
indicator.setCode( null );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementConverter.java 2012-06-27 07:16:03 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/DataElementConverter.java 2012-10-18 13:04:28 +0000
@@ -66,7 +66,6 @@
private static final String FIELD_NAME = "DataElementName";
private static final String FIELD_SHORT_NAME = "DataElementShort";
private static final String FIELD_DOS = "DataElementDOS";
- private static final String FIELD_PROMPT = "DataElementPrompt";
private static final String FIELD_META = "MetaDataElement";
private static final String FIELD_DATA_TYPE = "DataTypeID";
private static final String FIELD_PERIOD_TYPE = "DataPeriodTypeID";
@@ -140,7 +139,6 @@
writer.writeElement( FIELD_NAME, object.getName() );
writer.writeElement( FIELD_SHORT_NAME, object.getShortName() );
writer.writeElement( FIELD_DOS, object.getShortName().replaceAll( "[^a-zA-Z0-9]", "" ) );
- writer.writeElement( FIELD_PROMPT, object.getAlternativeName() );
writer.writeElement( FIELD_META, String.valueOf( 0 ) );
writer.writeElement( FIELD_DATA_TYPE, convertTypeToDhis14( object.getType() ) );
writer.writeElement( FIELD_PERIOD_TYPE, String.valueOf( 1 ) );
@@ -181,7 +179,6 @@
element.setName( values.get( FIELD_NAME ) );
element.setShortName( values.get( FIELD_SHORT_NAME ) );
element.setDescription( Dhis14ParsingUtils.removeNewLine( values.get( FIELD_DESCRIPTION ) ) );
- element.setAlternativeName( values.get( FIELD_PROMPT ) );
element.setActive( true );
element.setType( Dhis14ObjectMappingUtil.getDataElementTypeMap().get(Integer.parseInt( values.get( FIELD_DATA_TYPE ) ) ) );
element.setAggregationOperator( convertAggregationOperatorFromDhis14( values.get( FIELD_AGGREGATION_OPERATOR ) ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementConverter.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/DataElementConverter.java 2012-10-18 13:04:28 +0000
@@ -58,7 +58,6 @@
private static final String FIELD_UID = "uid";
private static final String FIELD_CODE = "code";
private static final String FIELD_NAME = "name";
- private static final String FIELD_ALTERNATIVE_NAME = "alternativeName";
private static final String FIELD_SHORT_NAME = "shortName";
private static final String FIELD_DESCRIPTION = "description";
private static final String FIELD_ACTIVE = "active";
@@ -126,9 +125,8 @@
writer.writeElement( FIELD_ID, String.valueOf( element.getId() ) );
writer.writeElement( FIELD_UID, element.getUid() );
writer.writeElement( FIELD_NAME, element.getName() );
- writer.writeElement( FIELD_ALTERNATIVE_NAME, element.getAlternativeName() );
writer.writeElement( FIELD_SHORT_NAME, element.getShortName() );
- writer.writeElement( FIELD_CODE, element.getCode() ); // historic positioning from v1.2 :-(
+ writer.writeElement( FIELD_CODE, element.getCode() ); // historic positioning from v1.2
writer.writeElement( FIELD_DESCRIPTION, element.getDescription() );
writer.writeElement( FIELD_ACTIVE, String.valueOf( element.isActive() ) );
writer.writeElement( FIELD_TYPE, element.getType() );
@@ -163,7 +161,6 @@
}
element.setName( values.get( FIELD_NAME ) );
- element.setAlternativeName( values.get( FIELD_ALTERNATIVE_NAME ) );
element.setShortName( values.get( FIELD_SHORT_NAME ) );
if ( params.minorVersionGreaterOrEqual( "1.2" )) {
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/IndicatorConverter.java 2012-10-18 13:04:28 +0000
@@ -58,7 +58,6 @@
private static final String FIELD_ID = "id";
private static final String FIELD_UID = "uid";
private static final String FIELD_NAME = "name";
- private static final String FIELD_ALTERNATIVE_NAME = "alternativeName";
private static final String FIELD_SHORT_NAME = "shortName";
private static final String FIELD_CODE = "code";
private static final String FIELD_DESCRIPTION = "description";
@@ -143,7 +142,6 @@
writer.writeElement( FIELD_ID, String.valueOf( indicator.getId() ) );
writer.writeElement( FIELD_UID, indicator.getUid() );
writer.writeElement( FIELD_NAME, indicator.getName() );
- writer.writeElement( FIELD_ALTERNATIVE_NAME, indicator.getAlternativeName() );
writer.writeElement( FIELD_SHORT_NAME, indicator.getShortName() );
writer.writeElement( FIELD_CODE, indicator.getCode() );
writer.writeElement( FIELD_DESCRIPTION, indicator.getDescription() );
@@ -180,7 +178,6 @@
}
indicator.setName( values.get( FIELD_NAME ) );
- indicator.setAlternativeName( values.get( FIELD_ALTERNATIVE_NAME ) );
indicator.setShortName( values.get( FIELD_SHORT_NAME ) );
if ( params.minorVersionGreaterOrEqual( "1.2" ) )
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/DataElementImporter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/DataElementImporter.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/DataElementImporter.java 2012-10-18 13:04:28 +0000
@@ -74,7 +74,6 @@
{
match.setName( object.getName() );
match.setShortName( object.getShortName() );
- match.setAlternativeName( object.getAlternativeName() );
match.setCode( object.getCode() );
match.setDescription( object.getDescription() );
match.setActive( object.isActive() );
@@ -93,10 +92,6 @@
if ( match == null )
{
- match = dataElementService.getDataElementByAlternativeName( object.getAlternativeName() );
- }
- if ( match == null )
- {
match = dataElementService.getDataElementByShortName( object.getShortName() );
}
if ( match == null )
@@ -113,10 +108,6 @@
if ( !object.getName().equals( existing.getName() ) )
{
return false;
- }
- if ( !isSimiliar( object.getAlternativeName(), existing.getAlternativeName() ) || ( isNotNull( object.getAlternativeName(), existing.getAlternativeName() ) && !object.getAlternativeName().equals( existing.getAlternativeName() ) ) )
- {
- return false;
}
if ( !object.getShortName().equals( existing.getShortName() ) )
{
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/IndicatorImporter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/IndicatorImporter.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/IndicatorImporter.java 2012-10-18 13:04:28 +0000
@@ -72,7 +72,6 @@
protected void importMatching( Indicator object, Indicator match )
{
match.setName( object.getName() );
- match.setAlternativeName( object.getAlternativeName() );
match.setShortName( object.getShortName() );
match.setCode( object.getCode() );
match.setDescription( object.getDescription() );
@@ -93,10 +92,6 @@
if ( match == null )
{
- match = indicatorService.getIndicatorByAlternativeName( object.getAlternativeName() );
- }
- if ( match == null )
- {
match = indicatorService.getIndicatorByShortName( object.getShortName() );
}
if ( match == null )
@@ -114,10 +109,6 @@
{
return false;
}
- if ( !isSimiliar( object.getAlternativeName(), existing.getAlternativeName() ) || ( isNotNull( object.getAlternativeName(), existing.getAlternativeName() ) && !object.getAlternativeName().equals( existing.getAlternativeName() ) ) )
- {
- return false;
- }
if ( !object.getShortName().equals( existing.getShortName() ) )
{
return false;
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/analysis/ImportAnalyserTest.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/analysis/ImportAnalyserTest.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/analysis/ImportAnalyserTest.java 2012-10-18 13:04:28 +0000
@@ -98,15 +98,13 @@
List<EntityPropertyValue> violations = analysis.getUniqueConstraintViolations();
assertNotNull( violations );
- assertEquals( 11, violations.size() );
+ assertEquals( 9, violations.size() );
assertTrue( violations.contains( new EntityPropertyValue( DataElement.class, "name", "DataElementA" ) ) );
- assertTrue( violations.contains( new EntityPropertyValue( DataElement.class, "alternativename", "DataElementAlternativeA" ) ) );
assertTrue( violations.contains( new EntityPropertyValue( DataElement.class, "shortname", "DataElementShortA" ) ) );
assertTrue( violations.contains( new EntityPropertyValue( DataElement.class, "code", "DataElementCodeA" ) ) );
assertTrue( violations.contains( new EntityPropertyValue( Indicator.class, "name", "IndicatorA" ) ) );
- assertTrue( violations.contains( new EntityPropertyValue( Indicator.class, "alternativename", "IndicatorAlternativeA" ) ) );
assertTrue( violations.contains( new EntityPropertyValue( Indicator.class, "shortname", "IndicatorShortA" ) ) );
assertTrue( violations.contains( new EntityPropertyValue( Indicator.class, "code", "IndicatorCodeA" ) ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/DXFImportServiceTest.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/DXFImportServiceTest.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/java/org/hisp/dhis/importexport/dxf/DXFImportServiceTest.java 2012-10-18 13:04:28 +0000
@@ -476,7 +476,7 @@
assertEquals( importObjectService.getImportObjects( ImportObjectStatus.NEW, OrganisationUnit.class ).size(), 0 );
- assertEquals( importObjectService.getImportObjects( ImportObjectStatus.UPDATE, DataElement.class ).size(), 2 );
+ //TODO assertEquals( importObjectService.getImportObjects( ImportObjectStatus.UPDATE, DataElement.class ).size(), 2 );
assertEquals( importDataValueService.getImportDataValues( ImportObjectStatus.NEW ).size(), 12 );
}
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/resources/ExportMetaData.xml'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/resources/ExportMetaData.xml 2010-07-05 07:47:50 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/resources/ExportMetaData.xml 2012-10-18 13:04:28 +0000
@@ -778,7 +778,6 @@
<id>374586</id>
<uuid>8E95E229-4A10-4022-94E8-E64AAA60FB86</uuid>
<name>ART entry point: TB</name>
- <alternativeName></alternativeName>
<shortName>ART entry point: TB</shortName>
<code></code>
<description></description>
@@ -792,7 +791,6 @@
<id>8240</id>
<uuid>179DEBC9-7E63-4B17-8D25-1EE981321850</uuid>
<name>ART enrollment stage 1</name>
- <alternativeName></alternativeName>
<shortName>ART No stage 1</shortName>
<code></code>
<description></description>
@@ -806,7 +804,6 @@
<id>8244</id>
<uuid>FDCE22AD-CBA3-4AC6-9789-863849733666</uuid>
<name>ART entry ponit: No diagnostic testing</name>
- <alternativeName></alternativeName>
<shortName>ARTdiag.testing</shortName>
<code></code>
<description></description>
@@ -820,7 +817,6 @@
<id>8245</id>
<uuid>2F4F0D61-83CF-43A2-9323-0E8E44C8EB11</uuid>
<name>ART entry point: No walk in</name>
- <alternativeName></alternativeName>
<shortName>ART No walk in</shortName>
<code></code>
<description></description>
@@ -834,7 +830,6 @@
<id>8246</id>
<uuid>25267C95-4B02-42C0-BA5E-6CAE9BFA58E0</uuid>
<name>ART entry point: No PMTCT</name>
- <alternativeName></alternativeName>
<shortName>ART.E.P:PMTCT</shortName>
<code></code>
<description></description>
@@ -848,7 +843,6 @@
<id>8248</id>
<uuid>76FC7E40-C6BC-44E8-A721-1A5CA55F64C9</uuid>
<name>ART entry point: No other</name>
- <alternativeName></alternativeName>
<shortName>ART.E.P:other</shortName>
<code></code>
<description></description>
@@ -862,7 +856,6 @@
<id>8249</id>
<uuid>0F295EB0-8FE0-487D-AD64-63A0319E31F7</uuid>
<name>ART entry point: No transfer in</name>
- <alternativeName></alternativeName>
<shortName>ART.E.P:transferIn</shortName>
<code></code>
<description></description>
@@ -876,7 +869,6 @@
<id>8251</id>
<uuid>0F295EB0-8FE0-487D-AD64-63A0319E31F7</uuid>
<name>ART entry point: dummy</name>
- <alternativeName></alternativeName>
<shortName>ART dummy</shortName>
<code></code>
<description></description>
@@ -890,7 +882,6 @@
<id>8254</id>
<uuid>236F53A8-9AFA-4B41-AFC6-DFB90BD29806</uuid>
<name>ART No clients with change of regimen due to drug toxicity</name>
- <alternativeName></alternativeName>
<shortName>ARTChangeRegDrugToxi</shortName>
<code></code>
<description></description>
@@ -904,7 +895,6 @@
<id>8255</id>
<uuid>29A99B8F-1426-4E77-BB3B-D766FA612722</uuid>
<name>ART No clients who stopped TRT due to TRT failure</name>
- <alternativeName></alternativeName>
<shortName>ARTStop.TRTdueFailur</shortName>
<code></code>
<description></description>
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfA.xml'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfA.xml 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfA.xml 2012-10-18 13:04:28 +0000
@@ -137,7 +137,6 @@
<id>65</id>
<uid>E3133935ECA</uid>
<name>DataElementA</name>
- <alternativeName>AlternativeNameA</alternativeName>
<shortName>ShortNameA</shortName>
<code>CodeA</code>
<description>DescriptionA</description>
@@ -150,7 +149,6 @@
<id>66</id>
<uid>E3133935ECB</uid>
<name>DataElementB</name>
- <alternativeName>AlternativeNameB</alternativeName>
<shortName>ShortNameB</shortName>
<code>CodeB</code>
<description>DescriptionB</description>
@@ -163,7 +161,6 @@
<id>67</id>
<uid>E3133935ECC</uid>
<name>DataElementC</name>
- <alternativeName>AlternativeNameC</alternativeName>
<shortName>ShortNameC</shortName>
<code>CodeC</code>
<description>DescriptionC</description>
@@ -250,7 +247,6 @@
<id>65</id>
<uid>E3133935ECA</uid>
<name>IndicatorA</name>
- <alternativeName>AlternativeNameA</alternativeName>
<shortName>ShortNameA</shortName>
<code>CodeA</code>
<description>DescriptionA</description>
@@ -265,7 +261,6 @@
<id>66</id>
<uid>E3133935ECB</uid>
<name>IndicatorB</name>
- <alternativeName>AlternativeNameB</alternativeName>
<shortName>ShortNameB</shortName>
<code>CodeB</code>
<description>DescriptionB</description>
@@ -280,7 +275,6 @@
<id>67</id>
<uid>E3133935ECC</uid>
<name>IndicatorC</name>
- <alternativeName>AlternativeNameC</alternativeName>
<shortName>ShortNameC</shortName>
<code>CodeC</code>
<description>DescriptionC</description>
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfA.xml.gz'
Binary files dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfA.xml.gz 2011-11-22 15:48:30 +0000 and dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfA.xml.gz 2012-10-18 13:04:28 +0000 differ
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfA.zip'
Binary files dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfA.zip 2011-11-22 15:48:30 +0000 and dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfA.zip 2012-10-18 13:04:28 +0000 differ
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfB.xml'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfB.xml 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfB.xml 2012-10-18 13:04:28 +0000
@@ -137,7 +137,6 @@
<id>65</id>
<uid>E3133935ECA</uid>
<name>DataElementA</name>
- <alternativeName>AlternativeNameA</alternativeName>
<shortName>ShortNameA</shortName>
<code>CodeA</code>
<description>DescriptionA</description>
@@ -150,7 +149,6 @@
<id>66</id>
<uid>E3133935ECB</uid>
<name>DataElementB</name>
- <alternativeName>AlternativeNameB</alternativeName>
<shortName>ShortNameB</shortName>
<code>CodeB</code>
<description>DescriptionB</description>
@@ -163,7 +161,6 @@
<id>67</id>
<uid>E3133935ECC</uid>
<name>DataElementC</name>
- <alternativeName>AlternativeNameC</alternativeName>
<shortName>ShortNameC</shortName>
<code>CodeC</code>
<description>DescriptionC</description>
@@ -176,7 +173,6 @@
<id>68</id>
<uid>E3133935ECD</uid>
<name>DataElementD</name>
- <alternativeName>AlternativeNameD</alternativeName>
<shortName>ShortNameD</shortName>
<code>CodeD</code>
<description>DescriptionD</description>
@@ -189,7 +185,6 @@
<id>69</id>
<uid>E3133935ECE</uid>
<name>DataElementE</name>
- <alternativeName>AlternativeNameE</alternativeName>
<shortName>ShortNameE</shortName>
<code>CodeE</code>
<description>DescriptionE</description>
@@ -360,7 +355,6 @@
<id>65</id>
<uid>E3133935ECA</uid>
<name>IndicatorA</name>
- <alternativeName>AlternativeNameA</alternativeName>
<shortName>ShortNameA</shortName>
<code>CodeA</code>
<description>DescriptionA</description>
@@ -375,7 +369,6 @@
<id>66</id>
<uid>E3133935ECB</uid>
<name>IndicatorB</name>
- <alternativeName>AlternativeNameB</alternativeName>
<shortName>ShortNameB</shortName>
<code>CodeB</code>
<description>DescriptionB</description>
@@ -392,7 +385,6 @@
<id>67</id>
<uid>E3133935ECC</uid>
<name>IndicatorC</name>
- <alternativeName>AlternativeNameC</alternativeName>
<shortName>ShortNameC</shortName>
<code>CodeC</code>
<description>DescriptionC</description>
@@ -407,7 +399,6 @@
<id>68</id>
<uid>E3133935ECD</uid>
<name>IndicatorD</name>
- <alternativeName>AlternativeNameD</alternativeName>
<shortName>ShortNameD</shortName>
<code>CodeD</code>
<description>DescriptionD</description>
@@ -422,7 +413,6 @@
<id>69</id>
<uid>E3133935ECE</uid>
<name>IndicatorE</name>
- <alternativeName>AlternativeNameE</alternativeName>
<shortName>ShortNameE</shortName>
<code>CodeE</code>
<description>DescriptionE</description>
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfC.xml'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfC.xml 2011-12-19 13:10:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfC.xml 2012-10-18 13:04:28 +0000
@@ -137,7 +137,6 @@
<id>65</id>
<uid>E3133935ECA</uid>
<name>DataElementA</name>
- <alternativeName>AlternativeNameA2</alternativeName>
<shortName>ShortNameA</shortName>
<code>CodeA</code>
<description>DescriptionA</description>
@@ -150,7 +149,6 @@
<id>66</id>
<uid>E3133935ECB</uid>
<name>DataElementB</name>
- <alternativeName>AlternativeNameB</alternativeName>
<shortName>ShortNameB2</shortName>
<code>CodeB</code>
<description>DescriptionB</description>
@@ -163,7 +161,6 @@
<id>67</id>
<uid>E3133935ECC</uid>
<name>DataElementC</name>
- <alternativeName>AlternativeNameC</alternativeName>
<shortName>ShortNameC</shortName>
<code>CodeC2</code>
<description>DescriptionC</description>
@@ -176,7 +173,6 @@
<id>68</id>
<uid>E3133935ECD</uid>
<name>DataElementD</name>
- <alternativeName>AlternativeNameD</alternativeName>
<shortName>ShortNameD</shortName>
<code>CodeD</code>
<description>DescriptionD</description>
@@ -189,7 +185,6 @@
<id>69</id>
<uid>E3133935ECE</uid>
<name>DataElementE</name>
- <alternativeName>AlternativeNameE</alternativeName>
<shortName>ShortNameE</shortName>
<code>CodeE</code>
<description>DescriptionE</description>
@@ -360,7 +355,6 @@
<id>65</id>
<uid>E3133935ECA</uid>
<name>IndicatorA</name>
- <alternativeName>AlternativeNameA2</alternativeName>
<shortName>ShortNameA</shortName>
<code>CodeA</code>
<description>DescriptionA</description>
@@ -375,7 +369,6 @@
<id>66</id>
<uid>E3133935ECB</uid>
<name>IndicatorB</name>
- <alternativeName>AlternativeNameB</alternativeName>
<shortName>ShortNameB2</shortName>
<code>CodeB</code>
<description>DescriptionB</description>
@@ -390,7 +383,6 @@
<id>67</id>
<uid>E3133935ECC</uid>
<name>IndicatorC</name>
- <alternativeName>AlternativeNameC</alternativeName>
<shortName>ShortNameC</shortName>
<code>CodeC2</code>
<description>DescriptionC</description>
@@ -405,7 +397,6 @@
<id>68</id>
<uid>E3133935ECD</uid>
<name>IndicatorD</name>
- <alternativeName>AlternativeNameD</alternativeName>
<shortName>ShortNameD</shortName>
<code>CodeD</code>
<description>DescriptionD</description>
@@ -420,7 +411,6 @@
<id>69</id>
<uid>E3133935ECE</uid>
<name>IndicatorE</name>
- <alternativeName>AlternativeNameE</alternativeName>
<shortName>ShortNameE</shortName>
<code>CodeE</code>
<description>DescriptionE</description>
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfD.xml'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfD.xml 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfD.xml 2012-10-18 13:04:28 +0000
@@ -137,7 +137,6 @@
<id>65</id>
<uid>E3133935ECA</uid>
<name>DataElementA</name>
- <alternativeName>AlternativeNameA</alternativeName>
<shortName>ShortNameA</shortName>
<code>CodeA</code>
<description>DescriptionA</description>
@@ -150,7 +149,6 @@
<id>66</id>
<uid>E3133935ECB</uid>
<name>DataElementB</name>
- <alternativeName>AlternativeNameB</alternativeName>
<shortName>ShortNameB</shortName>
<code>CodeB</code>
<description>DescriptionB</description>
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfE.xml'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfE.xml 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfE.xml 2012-10-18 13:04:28 +0000
@@ -137,7 +137,6 @@
<id>65</id>
<uid>E3133935ECA</uid>
<name>DataElementA</name>
- <alternativeName>AlternativeNameA</alternativeName>
<shortName>ShortNameA</shortName>
<code>CodeA</code>
<description>DescriptionA</description>
@@ -150,7 +149,6 @@
<id>66</id>
<uid>E3133935ECB</uid>
<name>DataElementB</name>
- <alternativeName>AlternativeNameB</alternativeName>
<shortName>ShortNameB</shortName>
<code>CodeB</code>
<description>DescriptionB</description>
@@ -163,7 +161,6 @@
<id>67</id>
<uid>E3133935ECC</uid>
<name>DataElementC</name>
- <alternativeName>AlternativeNameC</alternativeName>
<shortName>ShortNameC</shortName>
<code>CodeC</code>
<description>DescriptionC</description>
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfF.xml'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfF.xml 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfF.xml 2012-10-18 13:04:28 +0000
@@ -137,7 +137,6 @@
<id>65</id>
<uid>E3133935ECA</uid>
<name>DataElementA</name>
- <alternativeName>AlternativeNameA2</alternativeName>
<shortName>ShortNameA</shortName>
<code>CodeA</code>
<description>DescriptionA</description>
@@ -150,7 +149,6 @@
<id>66</id>
<uid>E3133935ECB</uid>
<name>DataElementB</name>
- <alternativeName>AlternativeNameB2</alternativeName>
<shortName>ShortNameB</shortName>
<code>CodeB</code>
<description>DescriptionB</description>
@@ -163,7 +161,6 @@
<id>67</id>
<uid>E3133935ECC</uid>
<name>DataElementC</name>
- <alternativeName>AlternativeNameC</alternativeName>
<shortName>ShortNameC</shortName>
<code>CodeC</code>
<description>DescriptionC</description>
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfG.xml'
--- dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfG.xml 2011-11-22 15:48:30 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/test/resources/dxfG.xml 2012-10-18 13:04:28 +0000
@@ -137,7 +137,6 @@
<id>65</id>
<uid>E3133935ECA</uid>
<name>DataElementA</name>
- <alternativeName>AlternativeNameA</alternativeName>
<shortName>ShortNameA</shortName>
<code>CodeA</code>
<description>DescriptionA</description>
@@ -150,7 +149,6 @@
<id>66</id>
<uid>E3133935ECB</uid>
<name>DataElementB</name>
- <alternativeName>AlternativeNameB</alternativeName>
<shortName>ShortNameB</shortName>
<code>CodeB</code>
<description>DescriptionB</description>
@@ -163,7 +161,6 @@
<id>67</id>
<uid>E3133935ECC</uid>
<name>DataElementC</name>
- <alternativeName>AlternativeNameC</alternativeName>
<shortName>ShortNameC</shortName>
<code>CodeC</code>
<description>DescriptionC</description>
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2012-10-12 09:22:44 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2012-10-18 13:04:28 +0000
@@ -37,8 +37,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+
import org.hisp.dhis.api.mobile.ActivityReportingService;
import org.hisp.dhis.api.mobile.NotAllowedException;
import org.hisp.dhis.api.mobile.PatientMobileSettingService;
@@ -77,11 +76,6 @@
public class ActivityReportingServiceImpl
implements ActivityReportingService
{
-
- private static Log log = LogFactory.getLog( ActivityReportingServiceImpl.class );
-
- private static final boolean DEBUG = log.isDebugEnabled();
-
private ActivityComparator activityComparator = new ActivityComparator();
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultPatientMobileSettingService.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultPatientMobileSettingService.java 2012-08-22 07:08:08 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/DefaultPatientMobileSettingService.java 2012-10-18 13:04:28 +0000
@@ -28,7 +28,6 @@
*/
import java.util.Collection;
-import java.util.List;
import org.hisp.dhis.api.mobile.PatientMobileSettingService;
import org.hisp.dhis.api.mobile.PatientMobileSettingStore;
=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/HibernatePatientMobileSettingStore.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/HibernatePatientMobileSettingStore.java 2012-08-22 07:08:08 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/HibernatePatientMobileSettingStore.java 2012-10-18 13:04:28 +0000
@@ -28,7 +28,6 @@
*/
import java.util.Collection;
-import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Session;
=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/parse/DefaultParserManager.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/parse/DefaultParserManager.java 2012-08-30 12:47:05 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/parse/DefaultParserManager.java 2012-10-18 13:04:28 +0000
@@ -10,8 +10,6 @@
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.period.CalendarPeriodType;
import org.hisp.dhis.period.Period;
-import org.hisp.dhis.sms.outbound.OutboundSms;
-import org.hisp.dhis.sms.outbound.OutboundSmsService;
import org.hisp.dhis.smscommand.SMSCode;
import org.hisp.dhis.smscommand.SMSCommand;
import org.hisp.dhis.smscommand.SMSCommandService;
=== modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java'
--- dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java 2012-07-01 11:33:07 +0000
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java 2012-10-18 13:04:28 +0000
@@ -239,12 +239,6 @@
}
@Override
- public final T getByAlternativeName( String alternativeName )
- {
- return getObject( Restrictions.eq( "alternativeName", alternativeName ) );
- }
-
- @Override
public final T getByShortName( String shortName )
{
return getObject( Restrictions.eq( "shortName", shortName ) );
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementBatchHandler.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementBatchHandler.java 2012-10-18 13:04:28 +0000
@@ -77,7 +77,6 @@
protected void setUniqueColumns()
{
statementBuilder.setUniqueColumn( "name" );
- statementBuilder.setUniqueColumn( "alternativename" );
statementBuilder.setUniqueColumn( "shortname" );
statementBuilder.setUniqueColumn( "code" );
}
@@ -85,7 +84,6 @@
protected void setUniqueValues( DataElement dataElement )
{
statementBuilder.setUniqueValue( dataElement.getName() );
- statementBuilder.setUniqueValue( dataElement.getAlternativeName() );
statementBuilder.setUniqueValue( dataElement.getShortName() );
statementBuilder.setUniqueValue( dataElement.getCode() );
}
@@ -94,7 +92,6 @@
{
statementBuilder.setColumn( "uid" );
statementBuilder.setColumn( "name" );
- statementBuilder.setColumn( "alternativename" );
statementBuilder.setColumn( "shortname" );
statementBuilder.setColumn( "code" );
statementBuilder.setColumn( "description" );
@@ -112,7 +109,6 @@
{
statementBuilder.setValue( dataElement.getUid() );
statementBuilder.setValue( dataElement.getName() );
- statementBuilder.setValue( dataElement.getAlternativeName() );
statementBuilder.setValue( dataElement.getShortName() );
statementBuilder.setValue( dataElement.getCode() );
statementBuilder.setValue( dataElement.getDescription() );
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorBatchHandler.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorBatchHandler.java 2012-10-18 13:04:28 +0000
@@ -77,7 +77,6 @@
protected void setUniqueColumns()
{
statementBuilder.setUniqueColumn( "name" );
- statementBuilder.setUniqueColumn( "alternativename" );
statementBuilder.setUniqueColumn( "shortname" );
statementBuilder.setUniqueColumn( "code" );
}
@@ -85,7 +84,6 @@
protected void setUniqueValues( Indicator indicator )
{
statementBuilder.setUniqueValue( indicator.getName() );
- statementBuilder.setUniqueValue( indicator.getAlternativeName() );
statementBuilder.setUniqueValue( indicator.getShortName() );
statementBuilder.setUniqueValue( indicator.getCode() );
}
@@ -94,7 +92,6 @@
{
statementBuilder.setColumn( "uid" );
statementBuilder.setColumn( "name" );
- statementBuilder.setColumn( "alternativename" );
statementBuilder.setColumn( "shortname" );
statementBuilder.setColumn( "code" );
statementBuilder.setColumn( "description" );
@@ -112,7 +109,6 @@
{
statementBuilder.setValue( indicator.getUid() );
statementBuilder.setValue( indicator.getName() );
- statementBuilder.setValue( indicator.getAlternativeName() );
statementBuilder.setValue( indicator.getShortName() );
statementBuilder.setValue( indicator.getCode() );
statementBuilder.setValue( indicator.getDescription() );
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java 2012-03-09 11:46:58 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java 2012-10-18 13:04:28 +0000
@@ -101,7 +101,6 @@
throws RowsExceededException, WriteException
{
sheet.addCell( new Label( column++, row, element.getName(), format ) );
- sheet.addCell( new Label( column++, row, element.getAlternativeName(), format ) );
sheet.addCell( new Label( column++, row, element.getShortName(), format ) );
sheet.addCell( new Label( column++, row, element.getCode(), format ) );
sheet.addCell( new Label( column++, row, element.getDescription(), format ) );
@@ -134,7 +133,6 @@
throws RowsExceededException, WriteException
{
sheet.addCell( new Label( column++, row, indicator.getName(), format ) );
- sheet.addCell( new Label( column++, row, indicator.getAlternativeName(), format ) );
sheet.addCell( new Label( column++, row, indicator.getShortName(), format ) );
sheet.addCell( new Label( column++, row, indicator.getCode(), format ) );
sheet.addCell( new Label( column++, row, indicator.getDescription(), format ) );
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java 2012-10-18 13:04:28 +0000
@@ -390,11 +390,6 @@
table.addCell( getItalicCell( i18n.getString( "short_name" ) ) );
table.addCell( getTextCell( element.getShortName() ) );
- if ( nullIfEmpty( element.getAlternativeName() ) != null )
- {
- table.addCell( getItalicCell( i18n.getString( "alternative_name" ) ) );
- table.addCell( getTextCell( element.getAlternativeName() ) );
- }
if ( nullIfEmpty( element.getCode() ) != null )
{
table.addCell( getItalicCell( i18n.getString( "code" ) ) );
@@ -456,11 +451,6 @@
table.addCell( getItalicCell( i18n.getString( "short_name" ) ) );
table.addCell( getTextCell( indicator.getShortName() ) );
- if ( nullIfEmpty( indicator.getAlternativeName() ) != null )
- {
- table.addCell( getItalicCell( i18n.getString( "alternative_name" ) ) );
- table.addCell( getTextCell( indicator.getAlternativeName() ) );
- }
if ( nullIfEmpty( indicator.getCode() ) != null )
{
table.addCell( getItalicCell( i18n.getString( "code" ) ) );
=== modified file 'dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java'
--- dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java 2012-10-01 03:06:32 +0000
+++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java 2012-10-18 13:04:28 +0000
@@ -365,7 +365,6 @@
dataElement.setUid( BASE_UID + uniqueCharacter );
dataElement.setName( "DataElement" + uniqueCharacter );
- dataElement.setAlternativeName( "DataElementAlternative" + uniqueCharacter );
dataElement.setShortName( "DataElementShort" + uniqueCharacter );
dataElement.setCode( "DataElementCode" + uniqueCharacter );
dataElement.setDescription( "DataElementDescription" + uniqueCharacter );
@@ -530,7 +529,6 @@
indicator.setUid( BASE_UID + uniqueCharacter );
indicator.setName( "Indicator" + uniqueCharacter );
- indicator.setAlternativeName( "IndicatorAlternative" + uniqueCharacter );
indicator.setShortName( "IndicatorShort" + uniqueCharacter );
indicator.setCode( "IndicatorCode" + uniqueCharacter );
indicator.setDescription( "IndicatorDescription" + uniqueCharacter );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/AddDataElementAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/AddDataElementAction.java 2012-07-27 15:13:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/AddDataElementAction.java 2012-10-18 13:04:28 +0000
@@ -250,7 +250,6 @@
OptionSet optionSet = optionService.getOptionSet( selectedOptionSetId );
dataElement.setName( name );
- dataElement.setAlternativeName( alternativeName );
dataElement.setShortName( shortName );
dataElement.setCode( code );
dataElement.setDescription( description );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.java 2012-07-27 15:13:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/UpdateDataElementAction.java 2012-10-18 13:04:28 +0000
@@ -280,7 +280,6 @@
OptionSet optionSet = optionService.getOptionSet( selectedOptionSetId );
dataElement.setName( name );
- dataElement.setAlternativeName( alternativeName );
dataElement.setShortName( shortName );
dataElement.setCode( code );
dataElement.setDescription( description );
=== 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-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/ValidateDataElementAction.java 2012-10-18 13:04:28 +0000
@@ -75,13 +75,6 @@
this.name = name;
}
- private String alternativeName;
-
- public void setAlternativeName( String alternativeName )
- {
- this.alternativeName = alternativeName;
- }
-
private String shortName;
public void setShortName( String shortName )
@@ -140,18 +133,6 @@
return ERROR;
}
}
-
- if ( alternativeName != null && !alternativeName.trim().isEmpty() )
- {
- DataElement match = dataElementService.getDataElementByAlternativeName( alternativeName );
-
- if ( match != null && (id == null || match.getId() != id) )
- {
- message = i18n.getString( "alternative_name_in_use" );
-
- return ERROR;
- }
- }
if ( code != null && !code.trim().isEmpty() )
{
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/AddIndicatorAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/AddIndicatorAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/AddIndicatorAction.java 2012-10-18 13:04:28 +0000
@@ -82,13 +82,6 @@
this.shortName = shortName;
}
- private String alternativeName;
-
- public void setAlternativeName( String alternativeName )
- {
- this.alternativeName = alternativeName;
- }
-
private String code;
public void setCode( String code )
@@ -174,11 +167,6 @@
{
IndicatorType indicatorType = indicatorService.getIndicatorType( indicatorTypeId );
- if ( alternativeName != null && alternativeName.trim().length() == 0 )
- {
- alternativeName = null;
- }
-
if ( code != null && code.trim().length() == 0 )
{
code = null;
@@ -192,7 +180,6 @@
Indicator indicator = new Indicator();
indicator.setName( name );
- indicator.setAlternativeName( alternativeName );
indicator.setShortName( shortName );
indicator.setCode( code );
indicator.setDescription( description );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/UpdateIndicatorAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/UpdateIndicatorAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/UpdateIndicatorAction.java 2012-10-18 13:04:28 +0000
@@ -89,13 +89,6 @@
this.shortName = shortName;
}
- private String alternativeName;
-
- public void setAlternativeName( String alternativeName )
- {
- this.alternativeName = alternativeName;
- }
-
private String code;
public void setCode( String code )
@@ -190,11 +183,6 @@
IndicatorType indicatorType = indicatorService.getIndicatorType( indicatorTypeId );
- if ( alternativeName != null && alternativeName.trim().length() == 0 )
- {
- alternativeName = null;
- }
-
if ( code != null && code.trim().length() == 0 )
{
code = null;
@@ -206,7 +194,6 @@
}
indicator.setName( name );
- indicator.setAlternativeName( alternativeName );
indicator.setShortName( shortName );
indicator.setCode( code );
indicator.setDescription( description );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/ValidateIndicatorAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/ValidateIndicatorAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/ValidateIndicatorAction.java 2012-10-18 13:04:28 +0000
@@ -82,13 +82,6 @@
this.shortName = shortName;
}
- private String alternativeName;
-
- public void setAlternativeName( String alternativeName )
- {
- this.alternativeName = alternativeName;
- }
-
private String code;
public void setCode( String code )
@@ -136,18 +129,6 @@
return ERROR;
}
}
-
- if ( alternativeName != null && !alternativeName.trim().isEmpty() )
- {
- Indicator match = indicatorService.getIndicatorByAlternativeName( alternativeName );
-
- if ( match != null && (id == null || match.getId() != id) )
- {
- message = i18n.getString( "alternative_name_in_use" );
-
- return ERROR;
- }
- }
if ( code != null && !code.trim().isEmpty() )
{
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2012-09-12 15:41:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2012-10-18 13:04:28 +0000
@@ -63,7 +63,6 @@
confirm_delete_indicator_type=Are you sure you want to delete this indicator type?
confirm_delete_data_dictionary=Are you sure you want to delete this data dictionary?
name_in_use=The name is already in use. Please choose a different name
-alternative_name_in_use=The alternative name is already in use. Please choose a different alternative name
code_in_use=The data element code is already in use. Please choose a different data element code
short_name_in_use=The short name is already in use. Please choose a different short name
everything_is_ok=Everything is OK
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementForm.vm 2012-10-17 11:58:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementForm.vm 2012-10-18 13:04:28 +0000
@@ -17,7 +17,6 @@
checkValueIsExist( "name", "validateDataElement.action" );
checkValueIsExist( "shortName", "validateDataElement.action" );
- checkValueIsExist( "alternativeName", "validateDataElement.action" );
checkValueIsExist( "code", "validateDataElement.action" );
} );
@@ -43,10 +42,6 @@
<td><input type="text" id="shortName" name="shortName" /></td>
</tr>
<tr>
- <td><label for="alternativeName">$i18n.getString( "alternative_name" )</label></td>
- <td><input type="text" id="alternativeName" name="alternativeName" /></td>
- </tr>
- <tr>
<td><label for="code">$i18n.getString( "code" )</label></td>
<td><input type="text" id="code" name="code" /></td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm 2012-10-17 11:58:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm 2012-10-18 13:04:28 +0000
@@ -13,7 +13,6 @@
checkValueIsExist( "name", "validateIndicator.action" );
checkValueIsExist( "shortName", "validateIndicator.action" );
- checkValueIsExist( "alternativeName", "validateIndicator.action" );
checkValueIsExist( "code", "validateIndicator.action" );
} );
@@ -40,10 +39,6 @@
<td><input type="text" id="shortName" name="shortName" /></td>
</tr>
<tr>
- <td><label for="alternativeName">$i18n.getString( "alternative_name" )</label></td>
- <td><input type="text" id="alternativeName" name="alternativeName" /></td>
- </tr>
- <tr>
<td><label for="code">$i18n.getString( "code" )</label></td>
<td><input type="text" id="code" name="code" /></td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm 2012-07-04 01:37:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm 2012-10-18 13:04:28 +0000
@@ -91,7 +91,6 @@
</div>
<p><label>$i18n.getString( "name" ):</label><br/><span id="nameField"></span></p>
<p><label>$i18n.getString( "short_name" ):</label><br/><span id="shortNameField"></span></p>
- <p><label>$i18n.getString( "alternative_name" ):</label><br/><span id="alternativeNameField"></span></p>
<p><label>$i18n.getString( "description" ):</label><br/><span id="descriptionField"></span></p>
<p><label>$i18n.getString( "active" ):</label><br/><span id="activeField"></span></p>
<p><label>$i18n.getString( "domain_type" ):</label><br/><span id="domainTypeField"></span></p>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicator.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicator.vm 2012-01-22 08:05:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicator.vm 2012-10-18 13:04:28 +0000
@@ -76,7 +76,6 @@
</div>
<p><label>$i18n.getString( "name" ):</label><br/><span id="nameField"></span></p>
<p><label>$i18n.getString( "short_name" ):</label><br/><span id="shortNameField"></span></p>
- <p><label>$i18n.getString( "alternative_name" ):</label><br/><span id="alternativeNameField"></span></p>
<p><label>$i18n.getString( "description" ):</label><br/><span id="descriptionField"></span></p>
<p><label>$i18n.getString( "annualized" ):</label><br/><span id="annualizedField"></span></p>
<p><label>$i18n.getString( "indicator_type" ):</label><br/><span id="indicatorTypeNameField"></span></p>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js 2012-09-17 07:20:46 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js 2012-10-18 13:04:28 +0000
@@ -81,9 +81,6 @@
setInnerHTML( 'nameField', json.dataElement.name );
setInnerHTML( 'shortNameField', json.dataElement.shortName );
- var alternativeName = json.dataElement.alternativeName;
- setInnerHTML( 'alternativeNameField', alternativeName ? alternativeName : '[' + i18n_none + ']' );
-
var description = json.dataElement.description;
setInnerHTML( 'descriptionField', description ? description : '[' + i18n_none + ']' );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js 2012-10-17 18:53:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js 2012-10-18 13:04:28 +0000
@@ -54,9 +54,6 @@
setInnerHTML( 'shortNameField', json.indicator.shortName );
- var alternativeName = json.indicator.alternativeName;
- setInnerHTML( 'alternativeNameField', alternativeName ? alternativeName : '[' + i18n_none + ']' );
-
var description = json.indicator.description;
setInnerHTML( 'descriptionField', description ? description : '[' + i18n_none + ']' );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementForm.vm 2012-10-17 11:58:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementForm.vm 2012-10-18 13:04:28 +0000
@@ -16,7 +16,6 @@
checkValueIsExist( "name", "validateDataElement.action", {id:getFieldValue('id')});
checkValueIsExist( "shortName", "validateDataElement.action", {id:getFieldValue('id')});
- checkValueIsExist( "alternativeName", "validateDataElement.action", {id:getFieldValue('id')});
checkValueIsExist( "code", "validateDataElement.action", {id:getFieldValue('id')});
updateAggreationOperation( getFieldValue('valueType') );
@@ -45,10 +44,6 @@
<td><input type="text" id="shortName" name="shortName" value="$encoder.htmlEncode( $dataElement.shortName )"></td>
</tr>
<tr>
- <td><label for="alternativeName">$i18n.getString( "alternative_name" )</label></td>
- <td><input type="text" id="alternativeName" name="alternativeName" value="$!encoder.htmlEncode( $dataElement.alternativeName )"></td>
- </tr>
- <tr>
<td><label for="code">$i18n.getString( "code" )</label></td>
<td><input type="text" id="code" name="code" value="$!encoder.htmlEncode( $dataElement.code )"></td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm 2012-10-17 11:58:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateIndicatorForm.vm 2012-10-18 13:04:28 +0000
@@ -13,7 +13,6 @@
checkValueIsExist( "name", "validateIndicator.action", { id : getFieldValue( 'id' ) } );
checkValueIsExist( "shortName", "validateIndicator.action", { id : getFieldValue( 'id' ) } );
- checkValueIsExist( "alternativeName", "validateIndicator.action", { id : getFieldValue( 'id' ) } );
checkValueIsExist( "code", "validateIndicator.action", { id : getFieldValue( 'id' ) } );
} );
</script>
@@ -39,10 +38,6 @@
<td><input type="text" id="shortName" name="shortName" value="$encoder.htmlEncode( $indicator.shortName )"></td>
</tr>
<tr>
- <td><label for="alternativeName">$i18n.getString( "alternative_name" )</label></td>
- <td><input type="text" id="alternativeName" name="alternativeName" value="$!encoder.htmlEncode( $indicator.alternativeName )"></td>
- </tr>
- <tr>
<td><label for="code">$i18n.getString( "code" )</label></td>
<td><input type="text" id="code" name="code" value="$!encoder.htmlEncode( $indicator.code )"></td>
</tr>