curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [1/2] initial commit for Curator REST
Date Sat, 15 Feb 2014 16:38:38 GMT
Repository: curator
Updated Branches:
  refs/heads/CURATOR-88 [created] 2b2e78582


http://git-wip-us.apache.org/repos/asf/curator/blob/2b2e7858/curator-x-rest/src/main/java/org/apache/curator/x/rest/entities/SetDataSpec.java
----------------------------------------------------------------------
diff --git a/curator-x-rest/src/main/java/org/apache/curator/x/rest/entities/SetDataSpec.java
b/curator-x-rest/src/main/java/org/apache/curator/x/rest/entities/SetDataSpec.java
new file mode 100644
index 0000000..faa83a9
--- /dev/null
+++ b/curator-x-rest/src/main/java/org/apache/curator/x/rest/entities/SetDataSpec.java
@@ -0,0 +1,113 @@
+package org.apache.curator.x.rest.entities;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class SetDataSpec
+{
+    private String path;
+    private boolean watched;
+    private String watchId;
+    private boolean async;
+    private String asyncId;
+    private boolean compressed;
+    private int version;
+    private String data;
+
+    public SetDataSpec()
+    {
+        this("/", false, "", false, "", false, -1, "");
+    }
+
+    public SetDataSpec(String path, boolean watched, String watchId, boolean async, String
asyncId, boolean compressed, int version, String data)
+    {
+        this.path = path;
+        this.watched = watched;
+        this.watchId = watchId;
+        this.async = async;
+        this.asyncId = asyncId;
+        this.compressed = compressed;
+        this.version = version;
+        this.data = data;
+    }
+
+    public String getData()
+    {
+        return data;
+    }
+
+    public void setData(String data)
+    {
+        this.data = data;
+    }
+
+    public int getVersion()
+    {
+        return version;
+    }
+
+    public void setVersion(int version)
+    {
+        this.version = version;
+    }
+
+    public String getWatchId()
+    {
+        return watchId;
+    }
+
+    public void setWatchId(String watchId)
+    {
+        this.watchId = watchId;
+    }
+
+    public String getPath()
+    {
+        return path;
+    }
+
+    public void setPath(String path)
+    {
+        this.path = path;
+    }
+
+    public boolean isWatched()
+    {
+        return watched;
+    }
+
+    public void setWatched(boolean watched)
+    {
+        this.watched = watched;
+    }
+
+    public boolean isAsync()
+    {
+        return async;
+    }
+
+    public void setAsync(boolean async)
+    {
+        this.async = async;
+    }
+
+    public String getAsyncId()
+    {
+        return asyncId;
+    }
+
+    public void setAsyncId(String asyncId)
+    {
+        this.asyncId = asyncId;
+    }
+
+    public boolean isCompressed()
+    {
+        return compressed;
+    }
+
+    public void setCompressed(boolean compressed)
+    {
+        this.compressed = compressed;
+    }
+}

http://git-wip-us.apache.org/repos/asf/curator/blob/2b2e7858/curator-x-rest/src/main/java/org/apache/curator/x/rest/entities/StatusMessage.java
----------------------------------------------------------------------
diff --git a/curator-x-rest/src/main/java/org/apache/curator/x/rest/entities/StatusMessage.java
b/curator-x-rest/src/main/java/org/apache/curator/x/rest/entities/StatusMessage.java
new file mode 100644
index 0000000..9171f94
--- /dev/null
+++ b/curator-x-rest/src/main/java/org/apache/curator/x/rest/entities/StatusMessage.java
@@ -0,0 +1,65 @@
+package org.apache.curator.x.rest.entities;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class StatusMessage
+{
+    private String type;
+    private String message;
+    private String details;
+    private String sourceId;
+
+    public StatusMessage()
+    {
+        this("", "", "", "");
+    }
+
+    public StatusMessage(String type, String sourceId, String message, String details)
+    {
+        this.type = type;
+        this.sourceId = sourceId;
+        this.message = message;
+        this.details = details;
+    }
+
+    public String getType()
+    {
+        return type;
+    }
+
+    public void setType(String type)
+    {
+        this.type = type;
+    }
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public void setMessage(String message)
+    {
+        this.message = message;
+    }
+
+    public String getDetails()
+    {
+        return details;
+    }
+
+    public void setDetails(String details)
+    {
+        this.details = details;
+    }
+
+    public String getSourceId()
+    {
+        return sourceId;
+    }
+
+    public void setSourceId(String sourceId)
+    {
+        this.sourceId = sourceId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/curator/blob/2b2e7858/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 981e405..e600d42 100644
--- a/pom.xml
+++ b/pom.xml
@@ -224,6 +224,7 @@
         <module>curator-examples</module>
         <module>curator-x-discovery</module>
         <module>curator-x-discovery-server</module>
+        <module>curator-x-rest</module>
     </modules>
 
     <dependencyManagement>
@@ -275,6 +276,18 @@
                 <artifactId>curator-x-discovery-server</artifactId>
                 <version>2.4.1-SNAPSHOT</version>
             </dependency>
+
+            <dependency>
+                <groupId>org.codehaus.jackson</groupId>
+                <artifactId>jackson-mapper-asl</artifactId>
+                <version>1.9.2</version>
+            </dependency>
+
+            <dependency>
+                <groupId>javax.ws.rs</groupId>
+                <artifactId>jsr311-api</artifactId>
+                <version>1.1.1</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 


Mime
View raw message