[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16922: Minor
revno: 16922 committer: Lars Helge Overland branch nick: dhis2 timestamp: Thu 2014-10-02 10:10:31 +0200 message: Minor modified: dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.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-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java 2014-10-01 15:41:30 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java 2014-10-02 08:10:31 + @@ -174,17 +174,17 @@ @Test public void getAllEqualToNameIgnoreCase() { -OrganisationUnit organisationUnitA1 = createOrganisationUnit( 'A' ); -organisationUnitA1.setCode( null ); -identifiableObjectManager.save( organisationUnitA1 ); - -OrganisationUnit organisationUnitA2 = createOrganisationUnit( 'B' ); -organisationUnitA2.setName( "OrganisationUnitA" ); -organisationUnitA2.setCode( null ); -identifiableObjectManager.save( organisationUnitA2 ); - -assertEquals( 2, identifiableObjectManager.getAllByNameIgnoreCase( OrganisationUnit.class, "OrganisationUnitA" ).size() ); -assertEquals( 2, identifiableObjectManager.getAllByNameIgnoreCase( OrganisationUnit.class, "organisationunita" ).size() ); +OrganisationUnit organisationUnitC1 = createOrganisationUnit( 'C' ); +organisationUnitC1.setCode( null ); +identifiableObjectManager.save( organisationUnitC1 ); + +OrganisationUnit organisationUnitC2 = createOrganisationUnit( 'D' ); +organisationUnitC2.setName( "OrganisationUnitC" ); +organisationUnitC2.setCode( null ); +identifiableObjectManager.save( organisationUnitC2 ); + +assertEquals( 2, identifiableObjectManager.getAllByNameIgnoreCase( OrganisationUnit.class, "OrganisationUnitC" ).size() ); +assertEquals( 2, identifiableObjectManager.getAllByNameIgnoreCase( OrganisationUnit.class, "organisationunitc" ).size() ); } @Test ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16923: support GET for idObject collections in web-api, use by /api/type/id/idCollection/id (fixed to pr...
revno: 16923 committer: Morten Olav Hansen branch nick: dhis2 timestamp: Thu 2014-10-02 15:22:56 +0700 message: support GET for idObject collections in web-api, use by /api/type/id/idCollection/id (fixed to preset :all) modified: dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/AbstractNode.java dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/Node.java dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/types/CollectionNode.java dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/types/SimpleNode.java dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.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/node/AbstractNode.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/AbstractNode.java 2014-06-10 16:59:51 + +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/AbstractNode.java 2014-10-02 08:22:56 + @@ -28,7 +28,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE */ -import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import org.hisp.dhis.node.exception.InvalidTypeException; @@ -38,6 +37,7 @@ import java.util.Collections; import java.util.List; +import java.util.Objects; /** * @author Morten Olav Hansen @@ -151,6 +151,15 @@ } @Override +public void removeChild( T child ) +{ +if ( children.contains( child ) ) +{ +children.remove( child ); +} +} + +@Override public void addChildren( Iterable children ) { for ( Node child : children ) @@ -192,28 +201,36 @@ } @Override -public boolean equals( Object o ) -{ -if ( this == o ) return true; -if ( o == null || getClass() != o.getClass() ) return false; - -AbstractNode that = (AbstractNode) o; - -if ( name != null ? !name.equals( that.name ) : that.name != null ) return false; - -return true; -} - -@Override public int hashCode() { -return name != null ? name.hashCode() : 0; +return Objects.hash( name, nodeType, parent, namespace, comment, children ); +} + +@Override +public boolean equals( Object obj ) +{ +if ( this == obj ) +{ +return true; +} +if ( obj == null || getClass() != obj.getClass() ) +{ +return false; +} + +final AbstractNode other = (AbstractNode) obj; + +return Objects.equals( this.name, other.name ) && +Objects.equals( this.nodeType, other.nodeType ) && +Objects.equals( this.namespace, other.namespace ) && +Objects.equals( this.comment, other.comment ) && +Objects.equals( this.children, other.children ); } @Override public String toString() { -return Objects.toStringHelper( this ) +return com.google.common.base.Objects.toStringHelper( this ) .add( "name", name ) .add( "nodeType", nodeType ) .add( "parent", (parent != null ? parent.getName() : null) ) === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/Node.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/Node.java 2014-06-08 10:58:50 + +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/Node.java 2014-10-02 08:22:56 + @@ -54,6 +54,7 @@ /** * Get parent node, or null if this is a top-level node. + * * @return parent or null if node does not have parent */ Node getParent(); @@ -116,6 +117,13 @@ T addChild( T child ); /** + * Remove a child from this node. + * + * @param child Child node to add + */ + void removeChild( T child ); + +/** * Adds a collection of children to this node. * * @param children Child nodes to add === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/types/CollectionNode.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/types/CollectionNode.java 2014-06-09 12:27:37 + +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/types/CollectionNode.java 2014-10-02 08:22:56 + @@ -28,10 +28,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE */ -import com.google.common.base.Objects; import org.hisp.dhis.node.AbstractNode; import org.hisp.dhis.node.NodeType; +import java.util.Objects; + /** * @author Morten Olav Hansen */ @@ -60,7 +61,7 @@ @Override public int hashCode() { -return 31 * super.hashCode() + Objects.hashCode( wrapping ); +return 31 * super.hashCode() + Objects.hash(
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16924: add endpoint for TrackedEntityForm, wip
revno: 16924 committer: Morten Olav Hansen branch nick: dhis2 timestamp: Thu 2014-10-02 15:57:44 +0700 message: add endpoint for TrackedEntityForm, wip added: dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityFormSchemaDescriptor.java dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityFormController.java modified: dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityForm.java dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityFormStore.java dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityFormStore.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 === added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityFormSchemaDescriptor.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityFormSchemaDescriptor.java 1970-01-01 00:00:00 + +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityFormSchemaDescriptor.java 2014-10-02 08:57:44 + @@ -0,0 +1,65 @@ +package org.hisp.dhis.schema.descriptors; + +/* + * Copyright (c) 2004-2014, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import com.google.common.collect.Lists; +import org.hisp.dhis.schema.Authority; +import org.hisp.dhis.schema.AuthorityType; +import org.hisp.dhis.schema.Schema; +import org.hisp.dhis.schema.SchemaDescriptor; +import org.hisp.dhis.trackedentity.TrackedEntityForm; +import org.springframework.stereotype.Component; + +/** + * @author Morten Olav Hansen + */ +@Component +public class TrackedEntityFormSchemaDescriptor implements SchemaDescriptor +{ +public static final String SINGULAR = "trackedEntityForm"; + +public static final String PLURAL = "trackedEntityForms"; + +public static final String API_ENDPOINT = "/" + PLURAL; + +@Override +public Schema getSchema() +{ +Schema schema = new Schema( TrackedEntityForm.class, SINGULAR, PLURAL ); +schema.setApiEndpoint( API_ENDPOINT ); +schema.setOrder( 1490 ); +schema.setMetadata( false ); + +schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_ADD_TRACKED_ENTITY_FORM" ) ) ); +schema.getAuthorities().add( new Authority( AuthorityType.UPDATE, Lists.newArrayList( "F_ADD_TRACKED_ENTITY_FORM" ) ) ); +schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_ADD_TRACKED_ENTITY_FORM" ) ) ); + +return schema; +} +} === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityForm.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityForm.java 2014-03-18 08:10:10 + +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityForm.java 2014-10-02 08:57:44 + @@ -28,18 +28,29 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonView; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.dataformat.xml.a
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16925: Updated ad-hoc version
revno: 16925 committer: Lars Helge Overland branch nick: dhis2 timestamp: Thu 2014-10-02 11:36:06 +0200 message: Updated ad-hoc version modified: tools/dhis-adhoc/pom.xml -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'tools/dhis-adhoc/pom.xml' --- tools/dhis-adhoc/pom.xml 2014-05-22 11:28:15 + +++ tools/dhis-adhoc/pom.xml 2014-10-02 09:36:06 + @@ -6,7 +6,7 @@ org.hisp.dhis dhis-services -2.16-SNAPSHOT +2.17-SNAPSHOT dhis-adhoc ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16926: Minor
revno: 16926 committer: Lars Helge Overland branch nick: dhis2 timestamp: Thu 2014-10-02 11:36:33 +0200 message: Minor modified: dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.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-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java 2014-10-02 08:10:31 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/common/IdentifiableObjectManagerTest.java 2014-10-02 09:36:33 + @@ -28,7 +28,15 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import com.google.common.collect.Sets; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.GregorianCalendar; +import java.util.List; import org.hibernate.SessionFactory; import org.hisp.dhis.DhisSpringTest; @@ -43,15 +51,10 @@ import org.hisp.dhis.user.UserGroup; import org.hisp.dhis.user.UserGroupAccess; import org.hisp.dhis.user.UserService; -import org.junit.Ignore; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import java.util.ArrayList; -import java.util.GregorianCalendar; -import java.util.List; - -import static org.junit.Assert.*; +import com.google.common.collect.Sets; /** * @author Morten Olav Hansen @@ -278,7 +281,6 @@ assertEquals( user, dataElement.getUser() ); } -@Ignore // TODO @Test public void userCanCreatePublic() { @@ -305,7 +307,6 @@ assertFalse( AccessStringHelper.canWrite( dataElement.getPublicAccess() ) ); } -@Ignore // TODO @Test( expected = CreateAccessDeniedException.class ) public void userDeniedCreateObject() { @@ -313,7 +314,6 @@ identifiableObjectManager.save( createDataElement( 'A' ) ); } -@Ignore // TODO @Test( expected = DeleteAccessDeniedException.class ) public void userDeniedDeleteObject() { @@ -344,7 +344,6 @@ assertEquals( 4, identifiableObjectManager.getAll( DataElement.class ).size() ); } -@Ignore // TODO @Test public void readPrivateObjects() { @@ -374,7 +373,6 @@ assertEquals( 0, identifiableObjectManager.getAll( DataElement.class ).size() ); } -@Ignore // TODO @Test public void readUserGroupSharedObjects() { ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16927: Removed dependency on dhis-support-test from dhis-support-external, not necessary
revno: 16927 committer: Lars Helge Overland branch nick: dhis2 timestamp: Thu 2014-10-02 11:37:25 +0200 message: Removed dependency on dhis-support-test from dhis-support-external, not necessary modified: dhis-2/dhis-support/dhis-support-external/pom.xml -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-support/dhis-support-external/pom.xml' --- dhis-2/dhis-support/dhis-support-external/pom.xml 2014-07-23 14:53:00 + +++ dhis-2/dhis-support/dhis-support-external/pom.xml 2014-10-02 09:37:25 + @@ -21,10 +21,6 @@ org.hisp.dhis dhis-api - - org.hisp.dhis - dhis-support-test - ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16928: DhisSpringTest, clearing Hibernate cache before each test
revno: 16928 committer: Lars Helge Overland branch nick: dhis2 timestamp: Thu 2014-10-02 11:41:32 +0200 message: DhisSpringTest, clearing Hibernate cache before each test modified: 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/dataset/DataSetServiceTest.java dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorServiceTest.java dhis-2/dhis-support/dhis-support-test/pom.xml dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisSpringTest.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-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 2014-10-01 10:35:15 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java 2014-10-02 09:41:32 + @@ -139,10 +139,25 @@ assertNotNull( dataElementService.getDataElement( idD ) ); dataElementService.deleteDataElement( dataElementB ); + assertNotNull( dataElementService.getDataElement( idA ) ); assertNull( dataElementService.getDataElement( idB ) ); assertNotNull( dataElementService.getDataElement( idC ) ); assertNotNull( dataElementService.getDataElement( idD ) ); + +dataElementService.deleteDataElement( dataElementC ); + +assertNotNull( dataElementService.getDataElement( idA ) ); +assertNull( dataElementService.getDataElement( idB ) ); +assertNull( dataElementService.getDataElement( idC ) ); +assertNotNull( dataElementService.getDataElement( idD ) ); + +dataElementService.deleteDataElement( dataElementD ); + +assertNotNull( dataElementService.getDataElement( idA ) ); +assertNull( dataElementService.getDataElement( idB ) ); +assertNull( dataElementService.getDataElement( idC ) ); +assertNull( dataElementService.getDataElement( idD ) ); } @Test === modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataSetServiceTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataSetServiceTest.java 2014-10-01 10:35:15 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataSetServiceTest.java 2014-10-02 09:41:32 + @@ -168,6 +168,11 @@ assertNull( dataSetService.getDataSet( idA ) ); assertNotNull( dataSetService.getDataSet( idB ) ); + +dataSetService.deleteDataSet( dataSetService.getDataSet( idB ) ); + +assertNull( dataSetService.getDataSet( idA ) ); +assertNull( dataSetService.getDataSet( idB ) ); } @Test === 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 2014-10-01 08:54:50 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/indicator/IndicatorServiceTest.java 2014-10-02 09:41:32 + @@ -28,14 +28,17 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import org.hisp.dhis.DhisSpringTest; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import java.util.Collection; import java.util.HashSet; import java.util.Set; -import static org.junit.Assert.*; +import org.hisp.dhis.DhisSpringTest; +import org.junit.Test; /** * @author Lars Helge Overland @@ -385,9 +388,14 @@ assertNotNull( indicatorService.getIndicator( idA ) ); assertNotNull( indicatorService.getIndicator( idB ) ); +indicatorService.deleteIndicator( indicatorA ); + +assertNull( indicatorService.getIndicator( idA ) ); +assertNotNull( indicatorService.getIndicator( idB ) ); + indicatorService.deleteIndicator( indicatorB ); -assertNotNull( indicatorService.getIndicator( idA ) ); +assertNull( indicatorService.getIndicator( idA ) ); assertNull( indicatorService.getIndicator( idB ) ); } === modified file 'dhis-2/dhis-support/dhis-support-test/pom.xml' --- dhis-2/dhis-support/dhis-support-test/pom.xml 2014-07-23 14:53:00 + +++ dhis-2/dhis-support/dhis-support-test/pom.xml 2014-10-02 09:41:32 + @@ -20,6 +20,10 @@ org.hi
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16929: display apps on list of start page options, no effect on actual start page yet
revno: 16929 committer: Morten Olav Hansen branch nick: dhis2 timestamp: Thu 2014-10-02 16:50:33 +0700 message: display apps on list of start page options, no effect on actual start page yet modified: dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetAppearanceSettingsAction.java dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetAppearanceSettingsAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetAppearanceSettingsAction.java 2014-06-26 14:38:54 + +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetAppearanceSettingsAction.java 2014-10-02 09:50:33 + @@ -28,20 +28,23 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import java.util.List; -import java.util.Locale; -import java.util.SortedMap; - +import com.opensymphony.xwork2.Action; +import org.hisp.dhis.appmanager.App; +import org.hisp.dhis.appmanager.AppManager; import org.hisp.dhis.i18n.locale.LocaleManager; +import org.hisp.dhis.setting.StyleManager; import org.hisp.dhis.setting.SystemSettingManager; -import org.hisp.dhis.setting.StyleManager; import org.hisp.dhis.system.util.Filter; import org.hisp.dhis.system.util.FilterUtils; import org.hisp.dhis.webportal.module.Module; import org.hisp.dhis.webportal.module.ModuleManager; import org.hisp.dhis.webportal.module.StartableModuleFilter; +import org.springframework.beans.factory.annotation.Autowired; -import com.opensymphony.xwork2.Action; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.SortedMap; /** * @author Lars Helge Overland @@ -55,52 +58,46 @@ // Dependencies // - +@Autowired private SystemSettingManager systemSettingManager; -public void setSystemSettingManager( SystemSettingManager systemSettingManager ) -{ -this.systemSettingManager = systemSettingManager; -} - +@Autowired private ModuleManager moduleManager; -public void setModuleManager( ModuleManager moduleManager ) -{ -this.moduleManager = moduleManager; -} - +@Autowired private StyleManager styleManager; -public void setStyleManager( StyleManager styleManager ) -{ -this.styleManager = styleManager; -} - +@Autowired private LocaleManager localeManager; -public void setLocaleManager( LocaleManager localeManager ) -{ -this.localeManager = localeManager; -} - +@Autowired +private AppManager appManager; + // - // Output // - -private List flags; +private List flags = new ArrayList<>(); public List getFlags() { return flags; } -private List modules; +private List modules = new ArrayList<>(); public List getModules() { return modules; } +private List apps = new ArrayList<>(); + +public List getApps() +{ +return apps; +} + private SortedMap styles; public SortedMap getStyles() @@ -115,7 +112,7 @@ return currentStyle; } -private List availableLocales; +private List availableLocales = new ArrayList<>(); public List getAvailableLocales() { @@ -131,13 +128,15 @@ availableLocales = localeManager.getAvailableLocales(); styles = styleManager.getStyles(); - + currentStyle = styleManager.getSystemStyle(); - + flags = systemSettingManager.getFlags(); modules = moduleManager.getMenuModules(); +apps = appManager.getApps(); + FilterUtils.filter( modules, startableFilter ); return SUCCESS; === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml 2014-08-08 09:41:58 + +++ dhis-2/dhis-web/dhis-web
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16930: Test fix
revno: 16930 committer: Lars Helge Overland branch nick: dhis2 timestamp: Thu 2014-10-02 11:53:32 +0200 message: Test fix modified: dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.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-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.java 2014-10-01 10:35:15 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/organisationunit/OrganisationUnitServiceTest.java 2014-10-02 09:53:32 + @@ -444,12 +444,9 @@ organisationUnitService.addOrganisationUnit( unitN ); organisationUnitService.addOrganisationUnit( unitO ); -Collection nill = null; - assertTrue( equals( organisationUnitService.getOrganisationUnitsAtLevel( 2, unitB ), unitB ) ); assertTrue( equals( organisationUnitService.getOrganisationUnitsAtLevel( 3, unitB ), unitD, unitE ) ); assertTrue( equals( organisationUnitService.getOrganisationUnitsAtLevel( 4, unitB ), unitH, unitI, unitJ, unitK ) ); -assertTrue( equals( organisationUnitService.getOrganisationUnitsAtLevel( 2, nill ), unitB, unitC ) ); assertEquals( 2, unitB.getLevel() ); assertEquals( 3, unitD.getLevel() ); ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16931: namespace start page selection with app: if select page is an app, will be used to check for redi...
revno: 16931 committer: Morten Olav Hansen branch nick: dhis2 timestamp: Thu 2014-10-02 16:58:38 +0700 message: namespace start page selection with app: if select page is an app, will be used to check for redirects in RedirectAction modified: dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java 2014-03-18 08:10:10 + +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java 2014-10-02 09:58:38 + @@ -30,6 +30,7 @@ import static org.hisp.dhis.setting.SystemSettingManager.KEY_START_MODULE; +import org.hisp.dhis.appmanager.AppManager; import org.hisp.dhis.setting.SystemSettingManager; import org.springframework.beans.factory.annotation.Autowired; @@ -44,6 +45,9 @@ @Autowired private SystemSettingManager systemSettingManager; +@Autowired +private AppManager appManager; + private String redirectUrl; public String getRedirectUrl() === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm 2014-10-02 09:50:33 + +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm 2014-10-02 09:58:38 + @@ -71,7 +71,7 @@ #if( $apps.size() > 0 ) #foreach ( $app in $apps ) -$i18n.getString( "$app.name" ) +$i18n.getString( "$app.name" ) #end #end ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16932: SQL view, ui message fix
revno: 16932 committer: Lars Helge Overland branch nick: dhis2 timestamp: Thu 2014-10-02 12:20:51 +0200 message: SQL view, ui message fix modified: dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addSqlViewForm.vm dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/sqlView.js dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateSqlViewForm.vm -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addSqlViewForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addSqlViewForm.vm 2014-08-28 08:47:36 + +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addSqlViewForm.vm 2014-10-02 10:20:51 + @@ -32,4 +32,3 @@ - === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/sqlView.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/sqlView.js 2014-06-13 09:05:03 + +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/sqlView.js 2014-10-02 10:20:51 + @@ -20,7 +20,7 @@ byId("updateSqlViewForm").submit(); } else if( json.response == "input" ) { -setMessage(json.message); +setHeaderDelayMessage(json.message); } } ); @@ -56,7 +56,7 @@ if( json.response == "success" ) { setHeaderDelayMessage(json.message); } else { -setMessage(json.message); + setHeaderDelayMessage(json.message); } } ); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateSqlViewForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateSqlViewForm.vm 2014-08-28 08:47:36 + +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateSqlViewForm.vm 2014-10-02 10:20:51 + @@ -43,4 +43,3 @@ - ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16934: tracker capture - minor performance improvment; respecting program setting for radio type data entry
revno: 16934 committer: Abyot Asalefew Gizaw branch nick: dhis2 timestamp: Thu 2014-10-02 12:25:39 +0200 message: tracker capture - minor performance improvment; respecting program setting for radio type data entry modified: dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2014-09-23 10:48:24 + +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2014-10-02 10:25:39 + @@ -82,7 +82,7 @@ - + - +{{'legend' | translate}} + -{{eventColor.description | translate}} +{{eventColor.description | translate}} === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html 2014-10-01 15:19:59 + +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html 2014-10-02 10:25:39 + @@ -28,26 +28,51 @@ ng-blur="saveDatavalue(prStDe)" name="foo"/> {{'number_required'| translate}} - - - - - - - - + + + + + + + + + {{'no_value' | translate}} + + + + {{option.name}} + + + + + + + + -{{'required'| translate}} @@ -87,7 +111,8 @@ + ng-change="saveDatavalueLocation(prStDe)"/> + === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-10-01 15:19:59 + +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-10-02 10:25:39 + @@ -129,6 +129,7 @@ "overdue_events": "Overdue Events", "overdue_events_description": "Generate a report of overdue events for a selected program and organisation unit. The report displays list of tracked entity instances and their events that are not conducted on scheduled d
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16933: Autowiring dependencies int tests
revno: 16933 committer: Lars Helge Overland branch nick: dhis2 timestamp: Thu 2014-10-02 12:21:06 +0200 message: Autowiring dependencies int tests modified: 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/dataset/DataSetServiceTest.java dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataSetStoreTest.java dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/SectionStoreTest.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 -- 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-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 2014-10-02 09:41:32 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java 2014-10-02 10:21:06 + @@ -39,6 +39,7 @@ import org.hisp.dhis.DhisSpringTest; import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; /** * @author Kristian Nordal @@ -46,20 +47,10 @@ public class DataElementServiceTest extends DhisSpringTest { +@Autowired private DataElementService dataElementService; // - -// Fixture -// - - -@Override -public void setUpTest() -throws Exception -{ -dataElementService = (DataElementService) getBean( DataElementService.ID ); -} - -// - // Tests // - === 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 2014-09-23 07:43:22 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementStoreTest.java 2014-10-02 10:21:06 + @@ -43,6 +43,7 @@ import org.hisp.dhis.dataset.DataSetService; import org.hisp.dhis.period.MonthlyPeriodType; import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; /** * @author Torgeir Lorange Ostby @@ -51,25 +52,12 @@ public class DataElementStoreTest extends DhisSpringTest { +@Autowired private DataElementStore dataElementStore; +@Autowired private DataSetService dataSetService; - -// - -// Fixture -// - - -@Override -public void setUpTest() -throws Exception -{ -dataElementStore = (DataElementStore) getBean( DataElementStore.ID ); - -dataElementService = (DataElementService) getBean( DataElementService.ID ); - -dataSetService = (DataSetService) getBean( DataSetService.ID ); -} - + // - // Tests // - === modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataSetServiceTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataSetServiceTest.java 2014-10-02 09:41:32 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/DataSetServiceTest.java 2014-10-02 10:21:06 + @@ -39,6 +39,7 @@ import org.hisp.dhis.period.PeriodType; import org.junit.Ignore; import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; import java.util.Collection; import java.util.HashSet; @@ -62,6 +63,18 @@ private OrganisationUnit unitE; private OrganisationUnit unitF; +@Autowired +private DataSetService dataSetService; + +@Autowired +private DataElementService dataElementService; + +@Autowired +private OrganisationUnitService organisationUnitService; + +@Autowired
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16935: Test fix
revno: 16935 committer: Lars Helge Overland branch nick: dhis2 timestamp: Thu 2014-10-02 12:35:54 +0200 message: Test fix modified: dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementCategoryServiceTest.java dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementGroupStoreTest.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-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementCategoryServiceTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementCategoryServiceTest.java 2014-08-15 07:40:20 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementCategoryServiceTest.java 2014-10-02 10:35:54 + @@ -30,6 +30,7 @@ import org.hisp.dhis.DhisSpringTest; import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; import java.util.ArrayList; import java.util.Collection; @@ -53,6 +54,9 @@ private List categoryOptions; +@Autowired +private DataElementCategoryService categoryService; + // - // Fixture // - @@ -60,8 +64,6 @@ @Override public void setUpTest() { -categoryService = (DataElementCategoryService) getBean( DataElementCategoryService.ID ); - categoryOptionA = createCategoryOption( 'A' ); categoryOptionB = createCategoryOption( 'B' ); categoryOptionC = createCategoryOption( 'C' ); === modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementGroupStoreTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementGroupStoreTest.java 2014-03-24 22:27:13 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementGroupStoreTest.java 2014-10-02 10:35:54 + @@ -35,6 +35,8 @@ import java.util.Collection; +import javax.annotation.Resource; + import org.hisp.dhis.DhisSpringTest; import org.hisp.dhis.common.GenericIdentifiableObjectStore; import org.junit.Test; @@ -43,18 +45,12 @@ * @author Lars Helge Overland * @version $Id$ */ -@SuppressWarnings( "unchecked" ) public class DataElementGroupStoreTest extends DhisSpringTest { +@Resource(name="org.hisp.dhis.dataelement.DataElementGroupStore") private GenericIdentifiableObjectStore dataElementGroupStore; -@Override -public void setUpTest() -{ -dataElementGroupStore = (GenericIdentifiableObjectStore) getBean( "org.hisp.dhis.dataelement.DataElementGroupStore" ); -} - @Test public void testAddDataElementGroup() { ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16936: Minor
revno: 16936 committer: Lars Helge Overland branch nick: dhis2 timestamp: Thu 2014-10-02 12:36:25 +0200 message: Minor modified: dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.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-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java 2014-10-02 08:22:56 + +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java 2014-10-02 10:36:25 + @@ -481,7 +481,6 @@ //-- @RequestMapping( value = "/{uid}/{property}/{itemId}", method = RequestMethod.GET ) -@SuppressWarnings( "unchecked" ) public @ResponseBody RootNode getCollectionItem( @PathVariable( "uid" ) String pvUid, @PathVariable( "property" ) String pvProperty, ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16937: add support for apps start page, finished
revno: 16937 committer: Morten Olav Hansen branch nick: dhis2 timestamp: Thu 2014-10-02 18:00:17 +0700 message: add support for apps start page, finished modified: dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.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-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java 2014-10-02 09:58:38 + +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/RedirectAction.java 2014-10-02 11:00:17 + @@ -28,13 +28,15 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import static org.hisp.dhis.setting.SystemSettingManager.KEY_START_MODULE; - +import com.opensymphony.xwork2.Action; +import org.hisp.dhis.appmanager.App; import org.hisp.dhis.appmanager.AppManager; import org.hisp.dhis.setting.SystemSettingManager; import org.springframework.beans.factory.annotation.Autowired; -import com.opensymphony.xwork2.Action; +import java.util.List; + +import static org.hisp.dhis.setting.SystemSettingManager.KEY_START_MODULE; /** * @author Lars Helge Overland @@ -49,7 +51,7 @@ private AppManager appManager; private String redirectUrl; - + public String getRedirectUrl() { return redirectUrl; @@ -60,16 +62,31 @@ throws Exception { String startModule = (String) systemSettingManager.getSystemSetting( KEY_START_MODULE ); - + if ( startModule != null ) { -redirectUrl = "../" + startModule + "/index.action"; -} -else -{ -redirectUrl = "../dhis-web-dashboard-integration/index.action"; -} - +if ( startModule.startsWith( "app:" ) ) +{ +List apps = appManager.getApps(); + +for ( App app : apps ) +{ +if ( app.getName().equals( startModule.substring( "app:".length() ) ) ) +{ +redirectUrl = app.getLaunchUrl(); +return SUCCESS; +} +} +} +else +{ +redirectUrl = "../" + startModule + "/index.action"; +return SUCCESS; +} +} + +redirectUrl = "../dhis-web-dashboard-integration/index.action"; + return SUCCESS; -} +} } ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16938: Fixed bug where dropdown menu position wouldn't update relative to sidebar
revno: 16938 committer: Halvdan Hoem Grelland branch nick: dhis2 timestamp: Thu 2014-10-02 16:41:11 +0200 message: Fixed bug where dropdown menu position wouldn't update relative to sidebar modified: dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisCheckboxMenu.js -- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisCheckboxMenu.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisCheckboxMenu.js 2014-09-22 15:24:24 + +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisCheckboxMenu.js 2014-10-02 14:41:11 + @@ -102,12 +102,7 @@ var $menu = $( this ).find( "ul" ); $menu.addClass( options.menuClass ); -$menu.css( "visibility", "hidden" ); -$menu.position({ -my: "left top", -at: "left bottom", -of: $button -}); +$menu.css( { "visibility" : "hidden", "margin-top" : "6px" } ); $button.click( function ( event ) { $( document ).one( "click", function() { ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16939: Web API. Added new resource representation html+css for sql view and analytics
revno: 16939 committer: Lars Helge Overland branch nick: dhis2 timestamp: Thu 2014-10-02 19:01:16 +0200 message: Web API. Added new resource representation html+css for sql view and analytics added: dhis-2/dhis-support/dhis-support-system/src/main/resources/grid-html-css.vm modified: dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/GridUtils.java dhis-2/dhis-support/dhis-support-system/src/main/resources/grid-html.vm dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AnalyticsController.java dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ReportTableController.java dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SqlViewController.java dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/showDataSqlViewForm.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-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java' --- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java 2014-09-08 13:02:43 + +++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java 2014-10-02 17:01:16 + @@ -159,11 +159,12 @@ @Override public Grid getSqlViewGrid( SqlView sqlView, Map criteria ) { -Grid sqlViewGrid = new ListGrid(); - -sqlViewExpandStore.setUpDataSqlViewTable( sqlViewGrid, sqlView.getViewName(), criteria ); - -return sqlViewGrid; +Grid grid = new ListGrid(); +grid.setTitle( sqlView.getName() ); + +sqlViewExpandStore.setUpDataSqlViewTable( grid, sqlView.getViewName(), criteria ); + +return grid; } @Override === modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/GridUtils.java' --- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/GridUtils.java 2014-09-25 10:17:34 + +++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/GridUtils.java 2014-10-02 17:01:16 + @@ -124,6 +124,7 @@ private static final String KEY_PARAMS = "params"; private static final String JASPER_TEMPLATE = "grid.vm"; private static final String HTML_TEMPLATE = "grid-html.vm"; +private static final String HTML_CSS_TEMPLATE = "grid-html-css.vm"; private static final String ATTR_GRID = "grid"; private static final String ATTR_TITLE = "title"; @@ -395,13 +396,22 @@ } /** - * Writes a JRXML (Jasper Reports XML) representation of the given Grid to the given Writer. + * Writes a HTML representation of the given Grid to the given Writer. */ public static void toHtml( Grid grid, Writer writer ) throws Exception { render( grid, null, writer, HTML_TEMPLATE ); } + +/** + * Writes a HTML representation of the given Grid to the given Writer. + */ +public static void toHtmlCss( Grid grid, Writer writer ) +throws Exception +{ +render( grid, null, writer, HTML_CSS_TEMPLATE ); +} /** * Writes an XML representation of the given Grid to the given OutputStream. === added file 'dhis-2/dhis-support/dhis-support-system/src/main/resources/grid-html-css.vm' --- dhis-2/dhis-support/dhis-support-system/src/main/resources/grid-html-css.vm 1970-01-01 00:00:00 + +++ dhis-2/dhis-support/dhis-support-system/src/main/resources/grid-html-css.vm 2014-10-02 17:01:16 + @@ -0,0 +1,22 @@ + +.gridDiv { + font-family: sans-serif, arial; +} + +table.gridTable { + border-collapse: collapse; + font-size: 11pt; +} + +.gridTable th, td { + padding: 8px 4px 7px 4px; + border: 1px solid #e7e7e7; +} + +.gridTable th { + background-color: #f3f3f3; + font-weight: bold; +} + + +#parse( "grid-html.vm" ) \ No newline at end of file === modified file 'dhis-2/dhis-support/dhis-support-system/src/main/resources/grid-html.vm' --- dhis-2/dhis-support/dhis-support-system/src/main/resources/grid-html.vm 2013-08-07 10:03:12 + +++ dhis-2/dhis-support/dhis-support-system/src/main/resources/grid-html.vm 2014-10-02 17:01:16 + @@ -1,10 +1,11 @@ + $!encoder.htmlEncode( $grid.title ) $!encoder.htmlEncode( $grid.subtitle ) #foreach( $header in $grid.getVisibleHeaders() ) -$!encoder.htmlEncode( $header.name ) +$!encoder.htmlEncode( $header.name ) #end @@ -22,4 +23,5 @@ #end - \ No newline at end of fil
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16940: Logging
revno: 16940 committer: Lars Helge Overland branch nick: dhis2 timestamp: Fri 2014-10-03 00:13:15 +0200 message: Logging modified: dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.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-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java' --- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java 2014-09-29 17:13:01 + +++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java 2014-10-02 22:13:15 + @@ -578,6 +578,8 @@ Map valueMap = getAggregatedDataValueMapping( grid ); +log.info( "Got aggregated values for table layout" ); + return reportTable.getGrid( new ListGrid( grid.getMetaData() ), valueMap, false ); } ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] Should has arrange order in attribute group
Hi DHIS2 dev, i has one suggestion, in attribute group in program/attribute. should has function arrange order of attribute group. because when we create more then 2 group, we can’t arrange order. thank you CHANNARA___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16941: Made CompleteDataSetRegistrationServiceTest extend DhisSpringTest
revno: 16941 committer: Lars Helge Overland branch nick: dhis2 timestamp: Fri 2014-10-03 08:23:56 +0200 message: Made CompleteDataSetRegistrationServiceTest extend DhisSpringTest modified: dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/CompleteDataSetRegistrationServiceTest.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-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/CompleteDataSetRegistrationServiceTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/CompleteDataSetRegistrationServiceTest.java 2014-10-01 12:31:39 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataset/CompleteDataSetRegistrationServiceTest.java 2014-10-03 06:23:56 + @@ -37,7 +37,7 @@ import java.util.Collection; import java.util.Date; -import org.hisp.dhis.DhisTest; +import org.hisp.dhis.DhisSpringTest; import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo; import org.hisp.dhis.dataelement.DataElementCategoryService; import org.hisp.dhis.organisationunit.OrganisationUnit; @@ -51,7 +51,7 @@ * @author Lars Helge Overland */ public class CompleteDataSetRegistrationServiceTest -extends DhisTest +extends DhisSpringTest { private CompleteDataSetRegistration registrationA; private CompleteDataSetRegistration registrationB; @@ -127,12 +127,6 @@ onTimeA = getDate( 2000, 1, 10 ); } - -@Override -public boolean emptyDatabaseAfterTest() -{ -return true; -} // - // Tests ___ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp
[Dhis2-devs] [Branch ~dhis2-devs-core/dhis2/trunk] Rev 16942: Made tests extend DhisSpringTest
revno: 16942 committer: Lars Helge Overland branch nick: dhis2 timestamp: Fri 2014-10-03 08:28:50 +0200 message: Made tests extend DhisSpringTest modified: dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueAuditServiceTest.java dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueDimensionTest.java dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/i18n/I18nServiceTest.java dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/option/OptionServiceTest.java dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleServiceTest.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-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueAuditServiceTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueAuditServiceTest.java 2014-07-18 11:51:12 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueAuditServiceTest.java 2014-10-03 06:28:50 + @@ -28,7 +28,15 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import org.hisp.dhis.DhisTest; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.Collection; +import java.util.Date; + +import org.hisp.dhis.DhisSpringTest; import org.hisp.dhis.common.AuditType; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo; @@ -40,19 +48,11 @@ import org.hisp.dhis.period.PeriodService; import org.junit.Test; -import java.util.Collection; -import java.util.Date; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; - /** * Created by Halvdan Hoem Grelland */ public class DataValueAuditServiceTest -extends DhisTest +extends DhisSpringTest { // - // Supporting data @@ -160,12 +160,6 @@ dataValueService.addDataValue( dataValueD ); } -@Override -public boolean emptyDatabaseAfterTest() -{ -return true; -} - // - // Basic DataValueAudit // - === modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueDimensionTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueDimensionTest.java 2014-08-15 07:40:20 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/datavalue/DataValueDimensionTest.java 2014-10-03 06:28:50 + @@ -37,7 +37,7 @@ import java.util.Collection; import org.apache.commons.collections.CollectionUtils; -import org.hisp.dhis.DhisTest; +import org.hisp.dhis.DhisSpringTest; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementCategory; import org.hisp.dhis.dataelement.DataElementCategoryCombo; @@ -55,7 +55,7 @@ * @author Lars Helge Overland */ public class DataValueDimensionTest -extends DhisTest +extends DhisSpringTest { private DataElementCategoryOption male; private DataElementCategoryOption female; @@ -133,13 +133,7 @@ dataValueService.addDataValue( createDataValue( dataElementA, periodA, sourceA, "10", categoryOptionCombo, defaultOptionCombo ) ); } } - -@Override -public boolean emptyDatabaseAfterTest() -{ -return true; -} - + @Test public void testGetDimensions() { === modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/i18n/I18nServiceTest.java' --- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/i18n/I18nServiceTest.java 2014-08-15 07:40:20 + +++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/i18n/I18nServiceTest.java 2014-10-03 06:28:50 + @@ -39,7 +39,7 @@ import java.util.Locale; import java.util.Map; -import org.hisp.dhis.DhisTest; +import org.hisp.dhis.DhisSpringTest; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementService; import org.junit.Before; @@ -49,7 +49,7 @@ * @author Lars Helge Overland */ public class I18nServiceTest -extends DhisTest +extends DhisSpringTest {