← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17620: minor fix, use jacksonXmlRootElement in AvailabilityStatus

 

------------------------------------------------------------
revno: 17620
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-11-30 14:44:25 +0700
message:
  minor fix, use jacksonXmlRootElement in AvailabilityStatus
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/synch/AvailabilityStatus.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/synch/AvailabilityStatus.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/synch/AvailabilityStatus.java	2014-07-07 10:06:36 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/synch/AvailabilityStatus.java	2014-11-30 07:44:25 +0000
@@ -28,42 +28,45 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import javax.xml.bind.annotation.XmlRootElement;
-
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import org.hisp.dhis.common.DxfNamespaces;
 
 /**
  * @author Lars Helge Overland
  */
-@XmlRootElement(name = "availabilityStatus")
+@JacksonXmlRootElement( localName = "availabilityStatus", namespace = DxfNamespaces.DXF_2_0 )
 public class AvailabilityStatus
 {
     private boolean available;
-    
+
     private String message;
-    
+
     protected AvailabilityStatus()
     {
     }
-    
+
     public AvailabilityStatus( boolean available, String message )
     {
         this.available = available;
         this.message = message;
     }
-    
+
     @JsonProperty
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public boolean isAvailable()
     {
         return available;
     }
 
     @JsonProperty
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public String getMessage()
     {
         return message;
     }
-    
+
     @Override
     public String toString()
     {