summaryrefslogtreecommitdiffstats
path: root/swift-client/src/main/java/com/woorea/openstack/swift/api/ContainersResource.java
diff options
context:
space:
mode:
Diffstat (limited to 'swift-client/src/main/java/com/woorea/openstack/swift/api/ContainersResource.java')
-rw-r--r--swift-client/src/main/java/com/woorea/openstack/swift/api/ContainersResource.java74
1 files changed, 74 insertions, 0 deletions
diff --git a/swift-client/src/main/java/com/woorea/openstack/swift/api/ContainersResource.java b/swift-client/src/main/java/com/woorea/openstack/swift/api/ContainersResource.java
new file mode 100644
index 0000000..aedcc3f
--- /dev/null
+++ b/swift-client/src/main/java/com/woorea/openstack/swift/api/ContainersResource.java
@@ -0,0 +1,74 @@
+package com.woorea.openstack.swift.api;
+
+
+import com.woorea.openstack.base.client.OpenStackClient;
+import com.woorea.openstack.base.client.OpenStackRequest;
+import com.woorea.openstack.swift.model.Container;
+
+public class ContainersResource {
+
+ private final OpenStackClient CLIENT;
+
+ public ContainersResource(OpenStackClient client) {
+ CLIENT = client;
+ }
+
+ public List list() {
+ return new List();
+ }
+
+ public Create create(String name) {
+ return new Create(name);
+ }
+
+ public Show show(String name) {
+ return new Show(name);
+ }
+
+ public Delete delete(String name) {
+ return new Delete(name);
+ }
+
+ public ContainerResource container(String name) {
+ return new ContainerResource(CLIENT, name);
+ }
+
+ public class List extends OpenStackRequest<java.util.List<Container>> {
+
+ public List() {
+ //return target.request(MediaType.APPLICATION_JSON).get(new GenericType<List<Container>>(){});
+ }
+
+ }
+
+
+ public class Create extends OpenStackRequest<Container> {
+
+ public Create(String containerName) {
+ //return target.path(containerName).request().method("PUT",Entity.text("*"));
+ }
+
+ }
+
+ public class Show extends OpenStackRequest<Container> {
+
+ private String containerName;
+
+ public Show(String containerName) {
+// return target.path(containerName).request(MediaType.APPLICATION_JSON).head();
+ }
+
+ }
+
+ public class Delete extends OpenStackRequest<Void> {
+
+ private String containerName;
+
+ public Delete(String containerName) {
+ this.containerName = containerName;
+ //return target.path(containerName).request(MediaType.APPLICATION_JSON).delete();
+ }
+
+ }
+
+}