dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28663
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14332: extend Schema to support private/public/external authorities, and also a flag to enable/disable s...
------------------------------------------------------------
revno: 14332
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-03-21 09:43:32 +0100
message:
extend Schema to support private/public/external authorities, and also a flag to enable/disable sharing
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/Schema.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-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/Schema.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/Schema.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/Schema.java 2014-03-21 08:43:32 +0000
@@ -29,11 +29,15 @@
*/
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;
import com.google.common.collect.Lists;
+import org.hisp.dhis.common.BaseIdentifiableObject;
import org.hisp.dhis.common.DxfNamespaces;
+import org.hisp.dhis.common.view.DetailedView;
import java.util.List;
@@ -49,6 +53,14 @@
private String plural;
+ private boolean shareable;
+
+ private List<String> publicAuthorities = Lists.newArrayList();
+
+ private List<String> privateAuthorities = Lists.newArrayList();
+
+ private List<String> externalAuthorities = Lists.newArrayList();
+
private boolean importable;
private boolean exportable;
@@ -109,6 +121,57 @@
@JsonProperty
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+ public boolean isShareable()
+ {
+ return shareable;
+ }
+
+ public void setShareable( boolean shareable )
+ {
+ this.shareable = shareable;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "publicAuthorities", namespace = DxfNamespaces.DXF_2_0 )
+ @JacksonXmlProperty( localName = "publicAuthority", namespace = DxfNamespaces.DXF_2_0 )
+ public List<String> getPublicAuthorities()
+ {
+ return publicAuthorities;
+ }
+
+ public void setPublicAuthorities( List<String> publicAuthorities )
+ {
+ this.publicAuthorities = publicAuthorities;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "privateAuthorities", namespace = DxfNamespaces.DXF_2_0 )
+ @JacksonXmlProperty( localName = "privateAuthority", namespace = DxfNamespaces.DXF_2_0 )
+ public List<String> getPrivateAuthorities()
+ {
+ return privateAuthorities;
+ }
+
+ public void setPrivateAuthorities( List<String> privateAuthorities )
+ {
+ this.privateAuthorities = privateAuthorities;
+ }
+
+ @JsonProperty
+ @JacksonXmlElementWrapper( localName = "externalAuthorities", namespace = DxfNamespaces.DXF_2_0 )
+ @JacksonXmlProperty( localName = "externalAuthority", namespace = DxfNamespaces.DXF_2_0 )
+ public List<String> getExternalAuthorities()
+ {
+ return externalAuthorities;
+ }
+
+ public void setExternalAuthorities( List<String> externalAuthorities )
+ {
+ this.externalAuthorities = externalAuthorities;
+ }
+
+ @JsonProperty
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public boolean isImportable()
{
return importable;