dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19870
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8847: Rendering OrganisationUnitGroupSet.organisationUnitGroups as BaseIdentifiableObject
------------------------------------------------------------
revno: 8847
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-11-03 23:36:08 +0300
message:
Rendering OrganisationUnitGroupSet.organisationUnitGroups as BaseIdentifiableObject
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.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/organisationunit/OrganisationUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2012-10-31 08:03:54 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2012-11-03 20:36:08 +0000
@@ -633,7 +633,6 @@
public void setAlternativeName( String alternativeName )
{
- // throw new UnsupportedOperationException( "Cannot set alternativeName on OrganisationUnit: " + alternativeName );
}
@JsonProperty
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java 2012-10-26 12:27:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitGroupSet.java 2012-11-03 20:36:08 +0000
@@ -45,6 +45,7 @@
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.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
@@ -190,18 +191,6 @@
return name.equals( other.getName() );
}
-/*
- @Override
- public String toString()
- {
- return "OrganisationUnitGroupSet{" +
- "organisationUnitGroups=" + organisationUnitGroups +
- ", description='" + description + '\'' +
- ", compulsory=" + compulsory +
- "} " + super.toString();
- }
-*/
-
// -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
@@ -233,6 +222,7 @@
}
@JsonProperty( value = "organisationUnitGroups" )
+ @JsonSerialize( contentAs = BaseIdentifiableObject.class )
@JsonView( {DetailedView.class, ExportView.class} )
@JacksonXmlElementWrapper( localName = "organisationUnitGroups", namespace = Dxf2Namespace.NAMESPACE )
@JacksonXmlProperty( localName = "organisationUnitGroup", namespace = Dxf2Namespace.NAMESPACE )