mirror of https://github.com/apache/jclouds.git
Merge branch 'master' of github.com:mattiasholmqvist/jclouds into issue-669
This commit is contained in:
commit
51d7af9650
|
@ -2,6 +2,7 @@
|
||||||
syntax: glob
|
syntax: glob
|
||||||
target/
|
target/
|
||||||
test-output/
|
test-output/
|
||||||
|
bin/
|
||||||
.settings/
|
.settings/
|
||||||
.classpath
|
.classpath
|
||||||
.project
|
.project
|
||||||
|
|
88
README.txt
88
README.txt
|
@ -1,22 +1,3 @@
|
||||||
====
|
|
||||||
|
|
||||||
Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
|
||||||
|
|
||||||
====================================================================
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
====================================================================
|
|
||||||
====
|
|
||||||
|
|
||||||
Overview:
|
Overview:
|
||||||
|
|
||||||
jclouds is an open source library that helps you get started in the cloud
|
jclouds is an open source library that helps you get started in the cloud
|
||||||
|
@ -26,25 +7,28 @@ two abstractions at the moment: compute and blobstore. compute helps you
|
||||||
bootstrap machines in the cloud. blobstore helps you manage key-value
|
bootstrap machines in the cloud. blobstore helps you manage key-value
|
||||||
data.
|
data.
|
||||||
|
|
||||||
our current version is 1.0-beta-9c
|
our current version is 1.1.1
|
||||||
our dev version is 1.0-SNAPSHOT
|
our next maintenance version is 1.1.2-SNAPSHOT
|
||||||
|
our dev version is 1.2.0-SNAPSHOT
|
||||||
|
|
||||||
|
check out our examples site! https://github.com/jclouds/jclouds-examples
|
||||||
|
|
||||||
our compute api supports: aws-ec2, gogrid, cloudservers-us, stub (in-memory), deltacloud,
|
our compute api supports: aws-ec2, gogrid, cloudservers-us, stub (in-memory), deltacloud,
|
||||||
cloudservers-uk, vcloud (generic), ec2 (generic), byon, nova,
|
cloudservers-uk, vcloud (generic), ec2 (generic), byon, nova,
|
||||||
trmk-ecloud, trmk-vcloudexpress, eucalyptus (generic),
|
trmk-ecloud, trmk-vcloudexpress, eucalyptus (generic),
|
||||||
cloudsigma-zrh, elasticstack(generic), bluelock-vcloud-vcenterprise,
|
cloudsigma-zrh, elasticstack(generic), bluelock-vcloud-vcenterprise,
|
||||||
bluelock-vcloud-zone01, stratogen-vcloud-mycloud,
|
bluelock-vcloud-zone01, stratogen-vcloud-mycloud, rimuhosting,
|
||||||
slicehost, eucalyptus-partnercloud-ec2, elastichosts-lon-p (Peer 1),
|
slicehost, eucalyptus-partnercloud-ec2, elastichosts-lon-p (Peer 1),
|
||||||
elastichosts-sat-p (Peer 1), elastichosts-lon-b (BlueSquare),
|
elastichosts-sat-p (Peer 1), elastichosts-lon-b (BlueSquare),
|
||||||
openhosting-east1, serverlove-z1-man, skalicloud-sdg-my
|
openhosting-east1, serverlove-z1-man, skalicloud-sdg-my,
|
||||||
|
greenhousedata-element-vcloud
|
||||||
|
|
||||||
* note * the pom dependency org.jclouds/jclouds-allcompute gives you access to
|
* note * the pom dependency org.jclouds/jclouds-allcompute gives you access to
|
||||||
to all of these providers
|
to all of these providers
|
||||||
|
|
||||||
our blobstore api supports: aws-s3, cloudfiles-us, cloudfiles-uk, filesystem,
|
our blobstore api supports: aws-s3, cloudfiles-us, cloudfiles-uk, filesystem,
|
||||||
azureblob, atmos (generic), synaptic-storage, scaleup-storage,
|
azureblob, atmos (generic), synaptic-storage,
|
||||||
cloudonestorage, walrus(generic), googlestorage, ninefold-storage,
|
cloudonestorage, walrus(generic), ninefold-storage,
|
||||||
scality-rs2 (generic), hosteurope-storage, tiscali-storage,
|
|
||||||
eucalyptus-partnercloud-s3, swift (generic), transient (in-mem)
|
eucalyptus-partnercloud-s3, swift (generic), transient (in-mem)
|
||||||
|
|
||||||
* note * the pom dependency org.jclouds/jclouds-allblobstore gives you access to
|
* note * the pom dependency org.jclouds/jclouds-allblobstore gives you access to
|
||||||
|
@ -55,7 +39,8 @@ our loadbalancer api supports: cloudloadbalancers-us
|
||||||
* note * the pom dependency org.jclouds/jclouds-allloadbalancer gives you access to
|
* note * the pom dependency org.jclouds/jclouds-allloadbalancer gives you access to
|
||||||
to all of these providers
|
to all of these providers
|
||||||
|
|
||||||
we also have support for: ibmdev, mezeo, nirvanix, boxdotnet, rimuhosting, openstack nova,
|
we also have support for: ibmdev, mezeo, nirvanix, boxdotnet, openstack nova, scality ring,
|
||||||
|
hosteurope-storage, tiscali-storage, scaleup-storage, googlestorage,
|
||||||
azurequeue, simpledb, cloudstack as well as a async-http-client
|
azurequeue, simpledb, cloudstack as well as a async-http-client
|
||||||
driver in the sandbox
|
driver in the sandbox
|
||||||
|
|
||||||
|
@ -75,16 +60,15 @@ BlobStore Example (Java):
|
||||||
blobStore.createContainerInLocation(null, "mycontainer");
|
blobStore.createContainerInLocation(null, "mycontainer");
|
||||||
|
|
||||||
// add blob
|
// add blob
|
||||||
blob = blobStore.newBlob("test");
|
blob = blobStore.blobBuilder("test").payload("testdata").build();
|
||||||
blob.setPayload("testdata");
|
|
||||||
blobStore.putBlob("mycontainer", blob);
|
blobStore.putBlob("mycontainer", blob);
|
||||||
|
|
||||||
BlobStore Example (Clojure):
|
BlobStore Example (Clojure):
|
||||||
(use 'org.jclouds.blobstore)
|
(use 'org.jclouds.blobstore2)
|
||||||
|
|
||||||
(with-blobstore ["azureblob" account encodedkey]
|
(def *blobstore* (blobstore "azureblob" account encodedkey))
|
||||||
(create-container "mycontainer")
|
(create-container *blobstore* "mycontainer")
|
||||||
(upload-blob "mycontainer" "test" "testdata"))
|
(put-blob *blobstore* "mycontainer" (blob "test" :payload "testdata"))
|
||||||
|
|
||||||
Compute Example (Java):
|
Compute Example (Java):
|
||||||
// init
|
// init
|
||||||
|
@ -93,44 +77,56 @@ Compute Example (Java):
|
||||||
accesskeyid,
|
accesskeyid,
|
||||||
secretaccesskey,
|
secretaccesskey,
|
||||||
ImmutableSet.of(new Log4JLoggingModule(),
|
ImmutableSet.of(new Log4JLoggingModule(),
|
||||||
new JschSshClientModule()));
|
new SshjSshClientModule()));
|
||||||
client = context.getComputeService();
|
client = context.getComputeService();
|
||||||
|
|
||||||
// define the requirements of your node
|
// define the requirements of your node
|
||||||
template = client.templateBuilder().osFamily(UBUNTU).smallest().build();
|
template = client.templateBuilder().osFamily(UBUNTU).smallest().build();
|
||||||
|
|
||||||
|
// setup a boot user which is the same as your login
|
||||||
|
template.getOptions().runScript(AdminAccess.standard());
|
||||||
|
|
||||||
// these nodes will be accessible via ssh when the call returns
|
// these nodes will be accessible via ssh when the call returns
|
||||||
nodes = client.createNodesInGroup("mycluster", 2, template);
|
nodes = client.createNodesInGroup("mycluster", 2, template);
|
||||||
|
|
||||||
|
// you can now run ad-hoc commands on the nodes based on predicates
|
||||||
|
responses = client.runScriptOnNodesMatching(inGroup("mycluster"), "uptime",
|
||||||
|
wrapInInitScript(false));
|
||||||
|
|
||||||
Compute Example (Clojure):
|
Compute Example (Clojure):
|
||||||
(use 'org.jclouds.compute)
|
(use 'org.jclouds.compute2)
|
||||||
|
|
||||||
; create a compute service using ssh and log4j extensions
|
; create a compute service using sshj and log4j extensions
|
||||||
(def compute
|
(def compute
|
||||||
(compute-service "trmk`-ecloud" "user" "password" :ssh :log4j))
|
(*compute* "trmk`-ecloud" "user" "password" :sshj :log4j))
|
||||||
|
|
||||||
; use the default node template and launch a couple nodes
|
; launch a couple nodes with the default operating system, installing your user.
|
||||||
; these will have your ~/.ssh/id_rsa.pub authorized when complete
|
(create-nodes *compute* "mycluster" 2
|
||||||
(with-compute-service [compute]
|
(TemplateOptions$Builder/runScript (AdminAccess/standard)))
|
||||||
(create-nodes "mycluster" 2))
|
|
||||||
|
; run a command on that group
|
||||||
|
(run-script-on-nodes-matching *compute* (in-group? "mycluster") "uptime"
|
||||||
|
(RunScriptOptions$Builder/wrapInInitScript false))
|
||||||
|
|
||||||
Downloads:
|
Downloads:
|
||||||
* distribution zip: http://jclouds.googlecode.com/files/jclouds-1.0-beta-9c.zip
|
* release notes: http://code.google.com/p/jclouds/wiki/ReleaseNotes111
|
||||||
|
* installation guide: http://code.google.com/p/jclouds/wiki/Installation
|
||||||
* maven repo: http://repo2.maven.org/maven2 (maven central - the default repository)
|
* maven repo: http://repo2.maven.org/maven2 (maven central - the default repository)
|
||||||
* snapshot repo: https://oss.sonatype.org/content/repositories/snapshots
|
* snapshot repo: https://oss.sonatype.org/content/repositories/snapshots
|
||||||
|
|
||||||
Links:
|
Links:
|
||||||
* project page: http://code.google.com/p/jclouds/
|
* project page: http://jclouds.org/
|
||||||
* javadocs (1.0-beta-9c): http://jclouds.rimuhosting.com/apidocs/
|
* documentation: http://www.jclouds.org/documentation/index
|
||||||
|
* javadocs (1.1.0): http://jclouds.rimuhosting.com/apidocs/
|
||||||
* javadocs (1.0-SNAPSHOT): http://jclouds.rimuhosting.com/apidocs-SNAPSHOT/
|
* javadocs (1.0-SNAPSHOT): http://jclouds.rimuhosting.com/apidocs-SNAPSHOT/
|
||||||
* community: http://code.google.com/p/jclouds/wiki/AppsThatUseJClouds
|
* community: http://www.jclouds.org/documentation/reference/apps-that-use-jclouds
|
||||||
* user group: http://groups.google.com/group/jclouds
|
* user group: http://groups.google.com/group/jclouds
|
||||||
* dev group: http://groups.google.com/group/jclouds-dev
|
* dev group: http://groups.google.com/group/jclouds-dev
|
||||||
* twitter: http://twitter.com/jclouds
|
* twitter: http://twitter.com/jclouds
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
Copyright (C) 2009-2011 jclouds, Inc.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0
|
Licensed under the Apache License, Version 2.0
|
||||||
|
|
||||||
|
|
31
all/pom.xml
31
all/pom.xml
|
@ -1,29 +1,30 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
|
Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
====================================================================
|
regarding copyright ownership. jclouds licenses this file
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
to you under the Apache License, Version 2.0 (the
|
||||||
you may not use this file except in compliance with the License.
|
"License"); you may not use this file except in compliance
|
||||||
You may obtain a copy of the License at
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing,
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
software distributed under the License is distributed on an
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
See the License for the specific language governing permissions and
|
KIND, either express or implied. See the License for the
|
||||||
limitations under the License.
|
specific language governing permissions and limitations
|
||||||
====================================================================
|
under the License.
|
||||||
|
|
||||||
--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jclouds</groupId>
|
<groupId>org.jclouds</groupId>
|
||||||
<artifactId>jclouds-project</artifactId>
|
<artifactId>jclouds-project</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../project/pom.xml</relativePath>
|
<relativePath>../project/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>jclouds-all</artifactId>
|
<artifactId>jclouds-all</artifactId>
|
||||||
|
|
|
@ -1,29 +1,30 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
|
Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
====================================================================
|
regarding copyright ownership. jclouds licenses this file
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
to you under the Apache License, Version 2.0 (the
|
||||||
you may not use this file except in compliance with the License.
|
"License"); you may not use this file except in compliance
|
||||||
You may obtain a copy of the License at
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing,
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
software distributed under the License is distributed on an
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
See the License for the specific language governing permissions and
|
KIND, either express or implied. See the License for the
|
||||||
limitations under the License.
|
specific language governing permissions and limitations
|
||||||
====================================================================
|
under the License.
|
||||||
|
|
||||||
--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jclouds</groupId>
|
<groupId>org.jclouds</groupId>
|
||||||
<artifactId>jclouds-project</artifactId>
|
<artifactId>jclouds-project</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../project/pom.xml</relativePath>
|
<relativePath>../project/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>jclouds-allblobstore</artifactId>
|
<artifactId>jclouds-allblobstore</artifactId>
|
||||||
|
@ -39,36 +40,11 @@
|
||||||
<artifactId>aws-s3</artifactId>
|
<artifactId>aws-s3</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.jclouds.provider</groupId>
|
|
||||||
<artifactId>googlestorage</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jclouds.api</groupId>
|
|
||||||
<artifactId>scality-rs2</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jclouds.provider</groupId>
|
<groupId>org.jclouds.provider</groupId>
|
||||||
<artifactId>ninefold-storage</artifactId>
|
<artifactId>ninefold-storage</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.jclouds.provider</groupId>
|
|
||||||
<artifactId>scaleup-storage</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jclouds.provider</groupId>
|
|
||||||
<artifactId>tiscali-storage</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jclouds.provider</groupId>
|
|
||||||
<artifactId>hosteurope-storage</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jclouds.provider</groupId>
|
<groupId>org.jclouds.provider</groupId>
|
||||||
<artifactId>synaptic-storage</artifactId>
|
<artifactId>synaptic-storage</artifactId>
|
||||||
|
|
|
@ -1,34 +1,40 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
|
Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
====================================================================
|
regarding copyright ownership. jclouds licenses this file
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
to you under the Apache License, Version 2.0 (the
|
||||||
you may not use this file except in compliance with the License.
|
"License"); you may not use this file except in compliance
|
||||||
You may obtain a copy of the License at
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing,
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
software distributed under the License is distributed on an
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
See the License for the specific language governing permissions and
|
KIND, either express or implied. See the License for the
|
||||||
limitations under the License.
|
specific language governing permissions and limitations
|
||||||
====================================================================
|
under the License.
|
||||||
|
|
||||||
--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jclouds</groupId>
|
<groupId>org.jclouds</groupId>
|
||||||
<artifactId>jclouds-project</artifactId>
|
<artifactId>jclouds-project</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../project/pom.xml</relativePath>
|
<relativePath>../project/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>jclouds-allcompute</artifactId>
|
<artifactId>jclouds-allcompute</artifactId>
|
||||||
<name>allcompute</name>
|
<name>allcompute</name>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jclouds.provider</groupId>
|
||||||
|
<artifactId>greenhousedata-element-vcloud</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jclouds.provider</groupId>
|
<groupId>org.jclouds.provider</groupId>
|
||||||
<artifactId>savvis-symphonyvpdc</artifactId>
|
<artifactId>savvis-symphonyvpdc</artifactId>
|
||||||
|
@ -49,6 +55,11 @@
|
||||||
<artifactId>aws-ec2</artifactId>
|
<artifactId>aws-ec2</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jclouds.provider</groupId>
|
||||||
|
<artifactId>rimuhosting</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jclouds.api</groupId>
|
<groupId>org.jclouds.api</groupId>
|
||||||
<artifactId>nova</artifactId>
|
<artifactId>nova</artifactId>
|
||||||
|
@ -84,11 +95,6 @@
|
||||||
<artifactId>vcloud</artifactId>
|
<artifactId>vcloud</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.jclouds.api</groupId>
|
|
||||||
<artifactId>vcloudexpress</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jclouds.provider</groupId>
|
<groupId>org.jclouds.provider</groupId>
|
||||||
<artifactId>trmk-vcloudexpress</artifactId>
|
<artifactId>trmk-vcloudexpress</artifactId>
|
||||||
|
@ -99,11 +105,6 @@
|
||||||
<artifactId>trmk-ecloud</artifactId>
|
<artifactId>trmk-ecloud</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.jclouds.provider</groupId>
|
|
||||||
<artifactId>bluelock-vcdirector</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jclouds.provider</groupId>
|
<groupId>org.jclouds.provider</groupId>
|
||||||
<artifactId>bluelock-vcloud-vcenterprise</artifactId>
|
<artifactId>bluelock-vcloud-vcenterprise</artifactId>
|
||||||
|
|
|
@ -1,29 +1,30 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
|
Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
====================================================================
|
regarding copyright ownership. jclouds licenses this file
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
to you under the Apache License, Version 2.0 (the
|
||||||
you may not use this file except in compliance with the License.
|
"License"); you may not use this file except in compliance
|
||||||
You may obtain a copy of the License at
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing,
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
software distributed under the License is distributed on an
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
See the License for the specific language governing permissions and
|
KIND, either express or implied. See the License for the
|
||||||
limitations under the License.
|
specific language governing permissions and limitations
|
||||||
====================================================================
|
under the License.
|
||||||
|
|
||||||
--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jclouds</groupId>
|
<groupId>org.jclouds</groupId>
|
||||||
<artifactId>jclouds-project</artifactId>
|
<artifactId>jclouds-project</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../project/pom.xml</relativePath>
|
<relativePath>../project/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>jclouds-allloadbalancer</artifactId>
|
<artifactId>jclouds-allloadbalancer</artifactId>
|
||||||
|
|
|
@ -1,37 +1,36 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
|
Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. jclouds licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
Copyright (C) 2010 Cloud Conscious, LLC.
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
<info@cloudconscious.com>
|
|
||||||
|
|
||||||
====================================================================
|
Unless required by applicable law or agreed to in writing,
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
software distributed under the License is distributed on an
|
||||||
you may not use this file except in compliance with the License.
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
You may obtain a copy of the License at
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0 Unless required by
|
-->
|
||||||
applicable law or agreed to in writing, software distributed
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions
|
|
||||||
and limitations under the License.
|
|
||||||
====================================================================
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jclouds</groupId>
|
<groupId>org.jclouds</groupId>
|
||||||
<artifactId>jclouds-project</artifactId>
|
<artifactId>jclouds-project</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../project/pom.xml</relativePath>
|
<relativePath>../project/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>jclouds-antcontrib</artifactId>
|
<artifactId>jclouds-antcontrib</artifactId>
|
||||||
<name>Ant-Contrib extensions</name>
|
<name>Ant-Contrib extensions</name>
|
||||||
<properties>
|
<properties>
|
||||||
<jclouds.test.listener></jclouds.test.listener>
|
<jclouds.test.listener />
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
|
Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
====================================================================
|
regarding copyright ownership. jclouds licenses this file
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
to you under the Apache License, Version 2.0 (the
|
||||||
you may not use this file except in compliance with the License.
|
"License"); you may not use this file except in compliance
|
||||||
You may obtain a copy of the License at
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing,
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
software distributed under the License is distributed on an
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
See the License for the specific language governing permissions and
|
KIND, either express or implied. See the License for the
|
||||||
limitations under the License.
|
specific language governing permissions and limitations
|
||||||
====================================================================
|
under the License.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<project name="compute" default="dump" basedir="." xmlns:artifact="urn:maven-artifact-ant">
|
<project name="compute" default="dump" basedir="." xmlns:artifact="urn:maven-artifact-ant">
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
====
|
====
|
||||||
|
Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
====================================================================
|
regarding copyright ownership. jclouds licenses this file
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
to you under the Apache License, Version 2.0 (the
|
||||||
you may not use this file except in compliance with the License.
|
"License"); you may not use this file except in compliance
|
||||||
You may obtain a copy of the License at
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing,
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
software distributed under the License is distributed on an
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
See the License for the specific language governing permissions and
|
KIND, either express or implied. See the License for the
|
||||||
limitations under the License.
|
specific language governing permissions and limitations
|
||||||
====================================================================
|
under the License.
|
||||||
====
|
====
|
||||||
|
|
||||||
this is a simple ant script that executes a java command on a remote machine via ssh
|
this is a simple ant script that executes a java command on a remote machine via ssh
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
|
Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
====================================================================
|
regarding copyright ownership. jclouds licenses this file
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
to you under the Apache License, Version 2.0 (the
|
||||||
you may not use this file except in compliance with the License.
|
"License"); you may not use this file except in compliance
|
||||||
You may obtain a copy of the License at
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing,
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
software distributed under the License is distributed on an
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
See the License for the specific language governing permissions and
|
KIND, either express or implied. See the License for the
|
||||||
limitations under the License.
|
specific language governing permissions and limitations
|
||||||
====================================================================
|
under the License.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<project name="sshjava" default="sshjava" basedir=".">
|
<project name="sshjava" default="sshjava" basedir=".">
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tools.ant.logging;
|
package org.jclouds.tools.ant.logging;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tools.ant.logging.config;
|
package org.jclouds.tools.ant.logging.config;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tools.ant.taskdefs.compute;
|
package org.jclouds.tools.ant.taskdefs.compute;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tools.ant.taskdefs.compute;
|
package org.jclouds.tools.ant.taskdefs.compute;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tools.ant.taskdefs.compute;
|
package org.jclouds.tools.ant.taskdefs.compute;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tools.ant.taskdefs.sshjava;
|
package org.jclouds.tools.ant.taskdefs.sshjava;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tools.ant.util;
|
package org.jclouds.tools.ant.util;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tools.ant;
|
package org.jclouds.tools.ant;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tools.ant.taskdefs.sshjava;
|
package org.jclouds.tools.ant.taskdefs.sshjava;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
====
|
====
|
||||||
|
Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
====================================================================
|
regarding copyright ownership. jclouds licenses this file
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
to you under the Apache License, Version 2.0 (the
|
||||||
you may not use this file except in compliance with the License.
|
"License"); you may not use this file except in compliance
|
||||||
You may obtain a copy of the License at
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing,
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
software distributed under the License is distributed on an
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
See the License for the specific language governing permissions and
|
KIND, either express or implied. See the License for the
|
||||||
limitations under the License.
|
specific language governing permissions and limitations
|
||||||
====================================================================
|
under the License.
|
||||||
====
|
====
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,31 +1,30 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
|
Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
====================================================================
|
regarding copyright ownership. jclouds licenses this file
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
to you under the Apache License, Version 2.0 (the
|
||||||
you may not use this file except in compliance with the License.
|
"License"); you may not use this file except in compliance
|
||||||
You may obtain a copy of the License at
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing,
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
software distributed under the License is distributed on an
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
See the License for the specific language governing permissions and
|
KIND, either express or implied. See the License for the
|
||||||
limitations under the License.
|
specific language governing permissions and limitations
|
||||||
====================================================================
|
under the License.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jclouds</groupId>
|
<groupId>org.jclouds</groupId>
|
||||||
<artifactId>jclouds-project</artifactId>
|
<artifactId>jclouds-project</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../project/pom.xml</relativePath>
|
<relativePath>../../project/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos;
|
package org.jclouds.atmos;
|
||||||
|
|
||||||
|
@ -44,7 +44,9 @@ import org.jclouds.atmos.functions.ParseObjectFromHeadersAndHttpContent;
|
||||||
import org.jclouds.atmos.functions.ParseSystemMetadataFromHeaders;
|
import org.jclouds.atmos.functions.ParseSystemMetadataFromHeaders;
|
||||||
import org.jclouds.atmos.functions.ParseUserMetadataFromHeaders;
|
import org.jclouds.atmos.functions.ParseUserMetadataFromHeaders;
|
||||||
import org.jclouds.atmos.functions.ReturnEndpointIfAlreadyExists;
|
import org.jclouds.atmos.functions.ReturnEndpointIfAlreadyExists;
|
||||||
|
import org.jclouds.atmos.functions.ReturnTrueIfGroupACLIsOtherRead;
|
||||||
import org.jclouds.atmos.options.ListOptions;
|
import org.jclouds.atmos.options.ListOptions;
|
||||||
|
import org.jclouds.atmos.options.PutOptions;
|
||||||
import org.jclouds.blobstore.functions.ThrowContainerNotFoundOn404;
|
import org.jclouds.blobstore.functions.ThrowContainerNotFoundOn404;
|
||||||
import org.jclouds.blobstore.functions.ThrowKeyNotFoundOn404;
|
import org.jclouds.blobstore.functions.ThrowKeyNotFoundOn404;
|
||||||
import org.jclouds.http.options.GetOptions;
|
import org.jclouds.http.options.GetOptions;
|
||||||
|
@ -107,7 +109,7 @@ public interface AtmosAsyncClient {
|
||||||
@ExceptionParser(ReturnEndpointIfAlreadyExists.class)
|
@ExceptionParser(ReturnEndpointIfAlreadyExists.class)
|
||||||
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||||
@Consumes(MediaType.WILDCARD)
|
@Consumes(MediaType.WILDCARD)
|
||||||
ListenableFuture<URI> createDirectory(@PathParam("directoryName") String directoryName);
|
ListenableFuture<URI> createDirectory(@PathParam("directoryName") String directoryName, PutOptions... options);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see AtmosClient#createFile
|
* @see AtmosClient#createFile
|
||||||
|
@ -117,7 +119,8 @@ public interface AtmosAsyncClient {
|
||||||
@Consumes(MediaType.WILDCARD)
|
@Consumes(MediaType.WILDCARD)
|
||||||
ListenableFuture<URI> createFile(
|
ListenableFuture<URI> createFile(
|
||||||
@PathParam("parent") String parent,
|
@PathParam("parent") String parent,
|
||||||
@PathParam("name") @ParamParser(AtmosObjectName.class) @BinderParam(BindMetadataToHeaders.class) AtmosObject object);
|
@PathParam("name") @ParamParser(AtmosObjectName.class) @BinderParam(BindMetadataToHeaders.class) AtmosObject object,
|
||||||
|
PutOptions... options);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see AtmosClient#updateFile
|
* @see AtmosClient#updateFile
|
||||||
|
@ -128,7 +131,8 @@ public interface AtmosAsyncClient {
|
||||||
@Consumes(MediaType.WILDCARD)
|
@Consumes(MediaType.WILDCARD)
|
||||||
ListenableFuture<Void> updateFile(
|
ListenableFuture<Void> updateFile(
|
||||||
@PathParam("parent") String parent,
|
@PathParam("parent") String parent,
|
||||||
@PathParam("name") @ParamParser(AtmosObjectName.class) @BinderParam(BindMetadataToHeaders.class) AtmosObject object);
|
@PathParam("name") @ParamParser(AtmosObjectName.class) @BinderParam(BindMetadataToHeaders.class) AtmosObject object,
|
||||||
|
PutOptions... options);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see AtmosClient#readFile
|
* @see AtmosClient#readFile
|
||||||
|
@ -190,12 +194,14 @@ public interface AtmosAsyncClient {
|
||||||
@Consumes(MediaType.WILDCARD)
|
@Consumes(MediaType.WILDCARD)
|
||||||
ListenableFuture<Boolean> pathExists(@PathParam("path") String path);
|
ListenableFuture<Boolean> pathExists(@PathParam("path") String path);
|
||||||
|
|
||||||
// signature currently doesn't work
|
/**
|
||||||
// @POST
|
* @see AtmosClient#isPublic
|
||||||
// @QueryParams(keys = "acl")
|
*/
|
||||||
// @Headers(keys = { "x-emc-useracl", "x-emc-groupacl" }, values = { "root=FULL_CONTROL",
|
@HEAD
|
||||||
// "other=READ" })
|
@ResponseParser(ReturnTrueIfGroupACLIsOtherRead.class)
|
||||||
// @Consumes(MediaType.WILDCARD)
|
@Path("/{path}")
|
||||||
// void makePublic(@Endpoint URI url);
|
@Consumes(MediaType.WILDCARD)
|
||||||
|
@ExceptionParser(ReturnFalseOnNotFoundOr404.class)
|
||||||
|
ListenableFuture<Boolean> isPublic(@PathParam("path") String path);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos;
|
package org.jclouds.atmos;
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ import org.jclouds.atmos.domain.DirectoryEntry;
|
||||||
import org.jclouds.atmos.domain.SystemMetadata;
|
import org.jclouds.atmos.domain.SystemMetadata;
|
||||||
import org.jclouds.atmos.domain.UserMetadata;
|
import org.jclouds.atmos.domain.UserMetadata;
|
||||||
import org.jclouds.atmos.options.ListOptions;
|
import org.jclouds.atmos.options.ListOptions;
|
||||||
|
import org.jclouds.atmos.options.PutOptions;
|
||||||
import org.jclouds.concurrent.Timeout;
|
import org.jclouds.concurrent.Timeout;
|
||||||
import org.jclouds.http.options.GetOptions;
|
import org.jclouds.http.options.GetOptions;
|
||||||
|
|
||||||
|
@ -52,13 +53,13 @@ public interface AtmosClient {
|
||||||
|
|
||||||
BoundedSet<? extends DirectoryEntry> listDirectory(String directoryName, ListOptions... options);
|
BoundedSet<? extends DirectoryEntry> listDirectory(String directoryName, ListOptions... options);
|
||||||
|
|
||||||
URI createDirectory(String directoryName);
|
URI createDirectory(String directoryName, PutOptions... options);
|
||||||
|
|
||||||
@Timeout(duration = 10, timeUnit = TimeUnit.MINUTES)
|
@Timeout(duration = 10, timeUnit = TimeUnit.MINUTES)
|
||||||
URI createFile(String parent, AtmosObject object);
|
URI createFile(String parent, AtmosObject object, PutOptions... options);
|
||||||
|
|
||||||
@Timeout(duration = 10, timeUnit = TimeUnit.MINUTES)
|
@Timeout(duration = 10, timeUnit = TimeUnit.MINUTES)
|
||||||
void updateFile(String parent, AtmosObject object);
|
void updateFile(String parent, AtmosObject object, PutOptions... options);
|
||||||
|
|
||||||
@Timeout(duration = 10, timeUnit = TimeUnit.MINUTES)
|
@Timeout(duration = 10, timeUnit = TimeUnit.MINUTES)
|
||||||
AtmosObject readFile(String path, GetOptions... options);
|
AtmosObject readFile(String path, GetOptions... options);
|
||||||
|
@ -73,4 +74,6 @@ public interface AtmosClient {
|
||||||
|
|
||||||
boolean pathExists(String path);
|
boolean pathExists(String path);
|
||||||
|
|
||||||
|
boolean isPublic(String path);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos;
|
package org.jclouds.atmos;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos;
|
package org.jclouds.atmos;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.binders;
|
package org.jclouds.atmos.binders;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.binders;
|
package org.jclouds.atmos.binders;
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,28 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore;
|
package org.jclouds.atmos.blobstore;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
import static org.jclouds.atmos.options.PutOptions.Builder.publicRead;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
@ -79,6 +81,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
|
||||||
private final Crypto crypto;
|
private final Crypto crypto;
|
||||||
private final BlobToHttpGetOptions blob2ObjectGetOptions;
|
private final BlobToHttpGetOptions blob2ObjectGetOptions;
|
||||||
private final Provider<FetchBlobMetadata> fetchBlobMetadataProvider;
|
private final Provider<FetchBlobMetadata> fetchBlobMetadataProvider;
|
||||||
|
private final Map<String, Boolean> isPublic;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
AtmosAsyncBlobStore(BlobStoreContext context, BlobUtils blobUtils,
|
AtmosAsyncBlobStore(BlobStoreContext context, BlobUtils blobUtils,
|
||||||
|
@ -87,7 +90,8 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
|
||||||
ObjectToBlob object2Blob, ObjectToBlobMetadata object2BlobMd, BlobToObject blob2Object,
|
ObjectToBlob object2Blob, ObjectToBlobMetadata object2BlobMd, BlobToObject blob2Object,
|
||||||
BlobStoreListOptionsToListOptions container2ContainerListOptions,
|
BlobStoreListOptionsToListOptions container2ContainerListOptions,
|
||||||
DirectoryEntryListToResourceMetadataList container2ResourceList, Crypto crypto,
|
DirectoryEntryListToResourceMetadataList container2ResourceList, Crypto crypto,
|
||||||
BlobToHttpGetOptions blob2ObjectGetOptions, Provider<FetchBlobMetadata> fetchBlobMetadataProvider) {
|
BlobToHttpGetOptions blob2ObjectGetOptions, Provider<FetchBlobMetadata> fetchBlobMetadataProvider,
|
||||||
|
Map<String, Boolean> isPublic) {
|
||||||
super(context, blobUtils, service, defaultLocation, locations);
|
super(context, blobUtils, service, defaultLocation, locations);
|
||||||
this.blob2ObjectGetOptions = checkNotNull(blob2ObjectGetOptions, "blob2ObjectGetOptions");
|
this.blob2ObjectGetOptions = checkNotNull(blob2ObjectGetOptions, "blob2ObjectGetOptions");
|
||||||
this.sync = checkNotNull(sync, "sync");
|
this.sync = checkNotNull(sync, "sync");
|
||||||
|
@ -100,6 +104,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
|
||||||
this.object2BlobMd = checkNotNull(object2BlobMd, "object2BlobMd");
|
this.object2BlobMd = checkNotNull(object2BlobMd, "object2BlobMd");
|
||||||
this.crypto = checkNotNull(crypto, "crypto");
|
this.crypto = checkNotNull(crypto, "crypto");
|
||||||
this.fetchBlobMetadataProvider = checkNotNull(fetchBlobMetadataProvider, "fetchBlobMetadataProvider");
|
this.fetchBlobMetadataProvider = checkNotNull(fetchBlobMetadataProvider, "fetchBlobMetadataProvider");
|
||||||
|
this.isPublic = checkNotNull(isPublic, "isPublic");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -231,11 +236,18 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ListenableFuture<String> putBlob(final String container, final Blob blob) {
|
public ListenableFuture<String> putBlob(final String container, final Blob blob) {
|
||||||
|
final org.jclouds.atmos.options.PutOptions options = new org.jclouds.atmos.options.PutOptions();
|
||||||
|
try {
|
||||||
|
if (isPublic.get(container + "/"))
|
||||||
|
options.publicRead();
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
// MapMaker
|
||||||
|
}
|
||||||
return Futures.makeListenable(service.submit(new Callable<String>() {
|
return Futures.makeListenable(service.submit(new Callable<String>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String call() throws Exception {
|
public String call() throws Exception {
|
||||||
return AtmosUtils.putBlob(sync, crypto, blob2Object, container, blob);
|
return AtmosUtils.putBlob(sync, crypto, blob2Object, container, blob, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -264,7 +276,13 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
|
||||||
public ListenableFuture<Boolean> createContainerInLocation(Location location, String container,
|
public ListenableFuture<Boolean> createContainerInLocation(Location location, String container,
|
||||||
CreateContainerOptions options) {
|
CreateContainerOptions options) {
|
||||||
if (options.isPublicRead())
|
if (options.isPublicRead())
|
||||||
throw new UnsupportedOperationException("publicRead");
|
return Futures.compose(async.createDirectory(container, publicRead()), new Function<URI, Boolean>() {
|
||||||
|
|
||||||
|
public Boolean apply(URI from) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}, service);
|
||||||
return createContainerInLocation(location, container);
|
return createContainerInLocation(location, container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore;
|
package org.jclouds.atmos.blobstore;
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ import javax.inject.Singleton;
|
||||||
import org.jclouds.atmos.AtmosAsyncClient;
|
import org.jclouds.atmos.AtmosAsyncClient;
|
||||||
import org.jclouds.atmos.blobstore.functions.BlobToObject;
|
import org.jclouds.atmos.blobstore.functions.BlobToObject;
|
||||||
import org.jclouds.atmos.domain.AtmosObject;
|
import org.jclouds.atmos.domain.AtmosObject;
|
||||||
|
import org.jclouds.atmos.options.PutOptions;
|
||||||
import org.jclouds.blobstore.BlobRequestSigner;
|
import org.jclouds.blobstore.BlobRequestSigner;
|
||||||
import org.jclouds.blobstore.domain.Blob;
|
import org.jclouds.blobstore.domain.Blob;
|
||||||
import org.jclouds.blobstore.functions.BlobToHttpGetOptions;
|
import org.jclouds.blobstore.functions.BlobToHttpGetOptions;
|
||||||
|
@ -58,7 +59,7 @@ public class AtmosBlobRequestSigner implements BlobRequestSigner {
|
||||||
this.blob2ObjectGetOptions = checkNotNull(blob2ObjectGetOptions, "blob2ObjectGetOptions");
|
this.blob2ObjectGetOptions = checkNotNull(blob2ObjectGetOptions, "blob2ObjectGetOptions");
|
||||||
this.getMethod = AtmosAsyncClient.class.getMethod("readFile", String.class, GetOptions[].class);
|
this.getMethod = AtmosAsyncClient.class.getMethod("readFile", String.class, GetOptions[].class);
|
||||||
this.deleteMethod = AtmosAsyncClient.class.getMethod("deletePath", String.class);
|
this.deleteMethod = AtmosAsyncClient.class.getMethod("deletePath", String.class);
|
||||||
this.createMethod = AtmosAsyncClient.class.getMethod("createFile", String.class, AtmosObject.class);
|
this.createMethod = AtmosAsyncClient.class.getMethod("createFile", String.class, AtmosObject.class, PutOptions[].class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,25 +1,27 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore;
|
package org.jclouds.atmos.blobstore;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
import static org.jclouds.atmos.options.PutOptions.Builder.publicRead;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
@ -67,6 +69,7 @@ public class AtmosBlobStore extends BaseBlobStore {
|
||||||
private final Crypto crypto;
|
private final Crypto crypto;
|
||||||
private final BlobToHttpGetOptions blob2ObjectGetOptions;
|
private final BlobToHttpGetOptions blob2ObjectGetOptions;
|
||||||
private final Provider<FetchBlobMetadata> fetchBlobMetadataProvider;
|
private final Provider<FetchBlobMetadata> fetchBlobMetadataProvider;
|
||||||
|
private final Map<String, Boolean> isPublic;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
AtmosBlobStore(BlobStoreContext context, BlobUtils blobUtils, Supplier<Location> defaultLocation,
|
AtmosBlobStore(BlobStoreContext context, BlobUtils blobUtils, Supplier<Location> defaultLocation,
|
||||||
|
@ -74,7 +77,8 @@ public class AtmosBlobStore extends BaseBlobStore {
|
||||||
ObjectToBlobMetadata object2BlobMd, BlobToObject blob2Object,
|
ObjectToBlobMetadata object2BlobMd, BlobToObject blob2Object,
|
||||||
BlobStoreListOptionsToListOptions container2ContainerListOptions,
|
BlobStoreListOptionsToListOptions container2ContainerListOptions,
|
||||||
DirectoryEntryListToResourceMetadataList container2ResourceList, Crypto crypto,
|
DirectoryEntryListToResourceMetadataList container2ResourceList, Crypto crypto,
|
||||||
BlobToHttpGetOptions blob2ObjectGetOptions, Provider<FetchBlobMetadata> fetchBlobMetadataProvider) {
|
BlobToHttpGetOptions blob2ObjectGetOptions, Provider<FetchBlobMetadata> fetchBlobMetadataProvider,
|
||||||
|
Map<String, Boolean> isPublic) {
|
||||||
super(context, blobUtils, defaultLocation, locations);
|
super(context, blobUtils, defaultLocation, locations);
|
||||||
this.blob2ObjectGetOptions = checkNotNull(blob2ObjectGetOptions, "blob2ObjectGetOptions");
|
this.blob2ObjectGetOptions = checkNotNull(blob2ObjectGetOptions, "blob2ObjectGetOptions");
|
||||||
this.sync = checkNotNull(sync, "sync");
|
this.sync = checkNotNull(sync, "sync");
|
||||||
|
@ -86,6 +90,7 @@ public class AtmosBlobStore extends BaseBlobStore {
|
||||||
this.object2BlobMd = checkNotNull(object2BlobMd, "object2BlobMd");
|
this.object2BlobMd = checkNotNull(object2BlobMd, "object2BlobMd");
|
||||||
this.crypto = checkNotNull(crypto, "crypto");
|
this.crypto = checkNotNull(crypto, "crypto");
|
||||||
this.fetchBlobMetadataProvider = checkNotNull(fetchBlobMetadataProvider, "fetchBlobMetadataProvider");
|
this.fetchBlobMetadataProvider = checkNotNull(fetchBlobMetadataProvider, "fetchBlobMetadataProvider");
|
||||||
|
this.isPublic = checkNotNull(isPublic, "isPublic");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -205,7 +210,14 @@ public class AtmosBlobStore extends BaseBlobStore {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String putBlob(final String container, final Blob blob) {
|
public String putBlob(final String container, final Blob blob) {
|
||||||
return AtmosUtils.putBlob(sync, crypto, blob2Object, container, blob);
|
final org.jclouds.atmos.options.PutOptions options = new org.jclouds.atmos.options.PutOptions();
|
||||||
|
try {
|
||||||
|
if (isPublic.get(container + "/"))
|
||||||
|
options.publicRead();
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
// MapMaker
|
||||||
|
}
|
||||||
|
return AtmosUtils.putBlob(sync, crypto, blob2Object, container, blob, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -229,8 +241,10 @@ public class AtmosBlobStore extends BaseBlobStore {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean createContainerInLocation(Location location, String container, CreateContainerOptions options) {
|
public boolean createContainerInLocation(Location location, String container, CreateContainerOptions options) {
|
||||||
if (options.isPublicRead())
|
if (options.isPublicRead()) {
|
||||||
throw new UnsupportedOperationException("publicRead");
|
sync.createDirectory(container, publicRead());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return createContainerInLocation(location, container);
|
return createContainerInLocation(location, container);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,28 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.config;
|
package org.jclouds.atmos.blobstore.config;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.atmos.AtmosAsyncClient;
|
import org.jclouds.atmos.AtmosAsyncClient;
|
||||||
import org.jclouds.atmos.AtmosClient;
|
import org.jclouds.atmos.AtmosClient;
|
||||||
import org.jclouds.atmos.blobstore.AtmosAsyncBlobStore;
|
import org.jclouds.atmos.blobstore.AtmosAsyncBlobStore;
|
||||||
|
@ -34,7 +39,10 @@ import org.jclouds.blobstore.internal.BlobStoreContextImpl;
|
||||||
import org.jclouds.blobstore.strategy.ContainsValueInListStrategy;
|
import org.jclouds.blobstore.strategy.ContainsValueInListStrategy;
|
||||||
import org.jclouds.location.config.JustProviderLocationModule;
|
import org.jclouds.location.config.JustProviderLocationModule;
|
||||||
|
|
||||||
|
import com.google.common.base.Function;
|
||||||
|
import com.google.common.collect.MapMaker;
|
||||||
import com.google.inject.AbstractModule;
|
import com.google.inject.AbstractModule;
|
||||||
|
import com.google.inject.Provides;
|
||||||
import com.google.inject.Scopes;
|
import com.google.inject.Scopes;
|
||||||
import com.google.inject.TypeLiteral;
|
import com.google.inject.TypeLiteral;
|
||||||
|
|
||||||
|
@ -57,4 +65,19 @@ public class AtmosBlobStoreContextModule extends AbstractModule {
|
||||||
bind(BlobRequestSigner.class).to(AtmosBlobRequestSigner.class);
|
bind(BlobRequestSigner.class).to(AtmosBlobRequestSigner.class);
|
||||||
install(new JustProviderLocationModule());
|
install(new JustProviderLocationModule());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
protected Map<String, Boolean> isPublic(final AtmosClient client) {
|
||||||
|
return new MapMaker().expireAfterWrite(30, TimeUnit.SECONDS).makeComputingMap(new Function<String, Boolean>() {
|
||||||
|
public Boolean apply(String directory) {
|
||||||
|
return client.isPublic(directory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "isPublic()";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.functions;
|
package org.jclouds.atmos.blobstore.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.functions;
|
package org.jclouds.atmos.blobstore.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.functions;
|
package org.jclouds.atmos.blobstore.functions;
|
||||||
|
|
||||||
|
@ -36,7 +36,8 @@ public class BlobToContentMetadata implements Function<BlobMetadata, MutableCont
|
||||||
public MutableContentMetadata apply(BlobMetadata base) {
|
public MutableContentMetadata apply(BlobMetadata base) {
|
||||||
MutableBlobMetadataImpl to = new MutableBlobMetadataImpl();
|
MutableBlobMetadataImpl to = new MutableBlobMetadataImpl();
|
||||||
HttpUtils.copy(base.getContentMetadata(), to.getContentMetadata());
|
HttpUtils.copy(base.getContentMetadata(), to.getContentMetadata());
|
||||||
return new DelegatingMutableContentMetadata(base.getName(), to.getContentMetadata());
|
return new DelegatingMutableContentMetadata(base.getUri(), base.getName(), base.getUri() != null ? base.getUri()
|
||||||
|
.getPath() : null, to.getContentMetadata());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.functions;
|
package org.jclouds.atmos.blobstore.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.functions;
|
package org.jclouds.atmos.blobstore.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.functions;
|
package org.jclouds.atmos.blobstore.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.functions;
|
package org.jclouds.atmos.blobstore.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.functions;
|
package org.jclouds.atmos.blobstore.functions;
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.atmos.domain.AtmosObject;
|
import org.jclouds.atmos.domain.AtmosObject;
|
||||||
import org.jclouds.atmos.domain.FileType;
|
import org.jclouds.atmos.domain.FileType;
|
||||||
|
import org.jclouds.atmos.filters.ShareUrl;
|
||||||
import org.jclouds.atmos.functions.AtmosObjectName;
|
import org.jclouds.atmos.functions.AtmosObjectName;
|
||||||
import org.jclouds.blobstore.domain.MutableBlobMetadata;
|
import org.jclouds.blobstore.domain.MutableBlobMetadata;
|
||||||
import org.jclouds.blobstore.domain.StorageType;
|
import org.jclouds.blobstore.domain.StorageType;
|
||||||
|
@ -34,7 +35,9 @@ import org.jclouds.blobstore.domain.internal.MutableBlobMetadataImpl;
|
||||||
import org.jclouds.http.HttpUtils;
|
import org.jclouds.http.HttpUtils;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
|
import com.google.common.base.Splitter;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import com.google.common.collect.Iterables;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,13 +46,16 @@ import com.google.common.collect.Maps;
|
||||||
@Singleton
|
@Singleton
|
||||||
public class ObjectToBlobMetadata implements Function<AtmosObject, MutableBlobMetadata> {
|
public class ObjectToBlobMetadata implements Function<AtmosObject, MutableBlobMetadata> {
|
||||||
private final AtmosObjectName objectName;
|
private final AtmosObjectName objectName;
|
||||||
private static final Set<String> systemMetadata = ImmutableSet.of("atime", "mtime", "ctime",
|
private final ShareUrl shareUrl;
|
||||||
"itime", "type", "uid", "gid", "objectid", "objname", "size", "nlink", "policyname",
|
|
||||||
"content-md5");
|
private static final Set<String> systemMetadata = ImmutableSet.of("atime", "mtime", "ctime", "itime", "type", "uid",
|
||||||
|
"gid", "objectid", "objname", "size", "nlink", "policyname", "content-md5");
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
protected ObjectToBlobMetadata(AtmosObjectName objectName) {
|
protected ObjectToBlobMetadata(AtmosObjectName objectName, ShareUrl shareUrl)
|
||||||
|
throws SecurityException, NoSuchMethodException {
|
||||||
this.objectName = objectName;
|
this.objectName = objectName;
|
||||||
|
this.shareUrl = shareUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MutableBlobMetadata apply(AtmosObject from) {
|
public MutableBlobMetadata apply(AtmosObject from) {
|
||||||
|
@ -60,6 +66,10 @@ public class ObjectToBlobMetadata implements Function<AtmosObject, MutableBlobMe
|
||||||
to.setLastModified(from.getSystemMetadata().getLastUserDataModification());
|
to.setLastModified(from.getSystemMetadata().getLastUserDataModification());
|
||||||
HttpUtils.copy(from.getContentMetadata(), to.getContentMetadata());
|
HttpUtils.copy(from.getContentMetadata(), to.getContentMetadata());
|
||||||
to.setName(objectName.apply(from));
|
to.setName(objectName.apply(from));
|
||||||
|
to.setUri(from.getContentMetadata().getUri());
|
||||||
|
to.setContainer(Iterables.get(Splitter.on('/').split(from.getContentMetadata().getPath()),0));
|
||||||
|
if (from.getAllHeaders().containsEntry("x-emc-groupacl", "other=READ"))
|
||||||
|
to.setPublicUri(shareUrl.apply(from.getContentMetadata().getPath()));
|
||||||
if (from.getSystemMetadata().getType() == FileType.DIRECTORY) {
|
if (from.getSystemMetadata().getType() == FileType.DIRECTORY) {
|
||||||
to.setType(StorageType.FOLDER);
|
to.setType(StorageType.FOLDER);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.strategy;
|
package org.jclouds.atmos.blobstore.strategy;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.config;
|
package org.jclouds.atmos.config;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.config;
|
package org.jclouds.atmos.config;
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,24 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.config;
|
package org.jclouds.atmos.config;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
|
@ -43,8 +44,8 @@ import com.google.common.base.Suppliers;
|
||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configures the EMC Atmos Online Storage authentication service connection,
|
* Configures the EMC Atmos Online Storage authentication service connection, including logging and
|
||||||
* including logging and http transport.
|
* http transport.
|
||||||
*
|
*
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
|
@ -82,6 +83,12 @@ public class AtmosRestClientModule extends RestClientModule<AtmosClient, AtmosAs
|
||||||
}, seconds, TimeUnit.SECONDS);
|
}, seconds, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@TimeStamp
|
||||||
|
protected Long provideShareableUrlTimeout() {
|
||||||
|
return new Date().getTime() + TimeUnit.HOURS.toMillis(1);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void bindErrorHandlers() {
|
protected void bindErrorHandlers() {
|
||||||
bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(ParseAtmosErrorFromXmlContent.class);
|
bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(ParseAtmosErrorFromXmlContent.class);
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.domain;
|
package org.jclouds.atmos.domain;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.domain;
|
package org.jclouds.atmos.domain;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.domain;
|
package org.jclouds.atmos.domain;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.domain;
|
package org.jclouds.atmos.domain;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.domain;
|
package org.jclouds.atmos.domain;
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,25 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.domain;
|
package org.jclouds.atmos.domain;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
|
||||||
import org.jclouds.atmos.domain.internal.DelegatingMutableContentMetadata;
|
import org.jclouds.atmos.domain.internal.DelegatingMutableContentMetadata;
|
||||||
|
|
||||||
import com.google.inject.ImplementedBy;
|
import com.google.inject.ImplementedBy;
|
||||||
|
@ -34,4 +36,11 @@ public interface MutableContentMetadata extends org.jclouds.io.MutableContentMet
|
||||||
|
|
||||||
public void setName(String name);
|
public void setName(String name);
|
||||||
|
|
||||||
|
public URI getUri();
|
||||||
|
|
||||||
|
public void setUri(URI uri);
|
||||||
|
|
||||||
|
public String getPath();
|
||||||
|
|
||||||
|
public void setPath(String path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.domain;
|
package org.jclouds.atmos.domain;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.domain;
|
package org.jclouds.atmos.domain;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.domain;
|
package org.jclouds.atmos.domain;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.domain.internal;
|
package org.jclouds.atmos.domain.internal;
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ public class AtmosObjectImpl extends PayloadEnclosingImpl implements AtmosObject
|
||||||
@Override
|
@Override
|
||||||
public void setPayload(Payload data) {
|
public void setPayload(Payload data) {
|
||||||
this.payload = data;
|
this.payload = data;
|
||||||
this.contentMetadata = new DelegatingMutableContentMetadata(contentMetadata.getName(),
|
this.contentMetadata = new DelegatingMutableContentMetadata(contentMetadata.getUri(), contentMetadata.getName(),
|
||||||
payload.getContentMetadata());
|
contentMetadata.getPath(), payload.getContentMetadata());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.domain.internal;
|
package org.jclouds.atmos.domain.internal;
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,25 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.domain.internal;
|
package org.jclouds.atmos.domain.internal;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
|
||||||
import org.jclouds.atmos.domain.MutableContentMetadata;
|
import org.jclouds.atmos.domain.MutableContentMetadata;
|
||||||
import org.jclouds.io.ContentMetadataBuilder;
|
import org.jclouds.io.ContentMetadataBuilder;
|
||||||
import org.jclouds.io.payloads.BaseMutableContentMetadata;
|
import org.jclouds.io.payloads.BaseMutableContentMetadata;
|
||||||
|
@ -29,16 +31,21 @@ import com.google.common.collect.Multimap;
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class DelegatingMutableContentMetadata implements MutableContentMetadata {
|
public class DelegatingMutableContentMetadata implements MutableContentMetadata {
|
||||||
|
private URI uri;
|
||||||
private String name;
|
private String name;
|
||||||
|
private String path;
|
||||||
private final org.jclouds.io.MutableContentMetadata delegate;
|
private final org.jclouds.io.MutableContentMetadata delegate;
|
||||||
|
|
||||||
public DelegatingMutableContentMetadata() {
|
public DelegatingMutableContentMetadata() {
|
||||||
this(null, new BaseMutableContentMetadata());
|
this(null, null, null, new BaseMutableContentMetadata());
|
||||||
}
|
}
|
||||||
|
|
||||||
public DelegatingMutableContentMetadata(String name, org.jclouds.io.MutableContentMetadata delegate) {
|
public DelegatingMutableContentMetadata(URI uri, String name, String path,
|
||||||
|
org.jclouds.io.MutableContentMetadata delegate) {
|
||||||
|
this.uri = uri;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.delegate = delegate;
|
this.delegate = delegate;
|
||||||
|
this.path = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -90,15 +97,10 @@ public class DelegatingMutableContentMetadata implements MutableContentMetadata
|
||||||
if (getClass() != obj.getClass())
|
if (getClass() != obj.getClass())
|
||||||
return false;
|
return false;
|
||||||
DelegatingMutableContentMetadata other = (DelegatingMutableContentMetadata) obj;
|
DelegatingMutableContentMetadata other = (DelegatingMutableContentMetadata) obj;
|
||||||
if (delegate == null) {
|
if (uri == null) {
|
||||||
if (other.delegate != null)
|
if (other.uri != null)
|
||||||
return false;
|
return false;
|
||||||
} else if (!delegate.equals(other.delegate))
|
} else if (!uri.equals(other.uri))
|
||||||
return false;
|
|
||||||
if (name == null) {
|
|
||||||
if (other.name != null)
|
|
||||||
return false;
|
|
||||||
} else if (!name.equals(other.name))
|
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -107,14 +109,13 @@ public class DelegatingMutableContentMetadata implements MutableContentMetadata
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
final int prime = 31;
|
final int prime = 31;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
result = prime * result + ((delegate == null) ? 0 : delegate.hashCode());
|
result = prime * result + ((uri == null) ? 0 : uri.hashCode());
|
||||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "[name=" + name + ", delegate=" + delegate + "]";
|
return "[uri=" + uri + ", name=" + name + ", path=" + path + ", delegate=" + delegate + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
public org.jclouds.io.MutableContentMetadata getDelegate() {
|
public org.jclouds.io.MutableContentMetadata getDelegate() {
|
||||||
|
@ -162,4 +163,24 @@ public class DelegatingMutableContentMetadata implements MutableContentMetadata
|
||||||
return delegate.toBuilder();
|
return delegate.toBuilder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public URI getUri() {
|
||||||
|
return uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setUri(URI uri) {
|
||||||
|
this.uri = uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPath() {
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setPath(String path) {
|
||||||
|
this.path = path;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,107 @@
|
||||||
|
/**
|
||||||
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
package org.jclouds.atmos.filters;
|
||||||
|
|
||||||
|
import static org.jclouds.Constants.LOGGER_SIGNATURE;
|
||||||
|
import static org.jclouds.Constants.PROPERTY_CREDENTIAL;
|
||||||
|
import static org.jclouds.Constants.PROPERTY_IDENTITY;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
import javax.ws.rs.core.UriBuilder;
|
||||||
|
|
||||||
|
import org.jclouds.crypto.Crypto;
|
||||||
|
import org.jclouds.crypto.CryptoStreams;
|
||||||
|
import org.jclouds.date.TimeStamp;
|
||||||
|
import org.jclouds.http.HttpException;
|
||||||
|
import org.jclouds.io.InputSuppliers;
|
||||||
|
import org.jclouds.location.Provider;
|
||||||
|
import org.jclouds.logging.Logger;
|
||||||
|
|
||||||
|
import com.google.common.base.Function;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signs the EMC Atmos Online Storage request.
|
||||||
|
*
|
||||||
|
* @see <a href="https://community.emc.com/community/labs/atmos_online" />
|
||||||
|
* @author Adrian Cole
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Singleton
|
||||||
|
public class ShareUrl implements Function<String, URI> {
|
||||||
|
|
||||||
|
private final String uid;
|
||||||
|
private final byte[] key;
|
||||||
|
private final URI provider;
|
||||||
|
private final javax.inject.Provider<Long> timeStampProvider;
|
||||||
|
private final javax.inject.Provider<UriBuilder> uriBuilders;
|
||||||
|
private final Crypto crypto;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
Logger logger = Logger.NULL;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
@Named(LOGGER_SIGNATURE)
|
||||||
|
Logger signatureLog = Logger.NULL;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public ShareUrl(@Named(PROPERTY_IDENTITY) String uid, @Named(PROPERTY_CREDENTIAL) String encodedKey,
|
||||||
|
@Provider URI provider, @TimeStamp javax.inject.Provider<Long> timeStampProvider,
|
||||||
|
javax.inject.Provider<UriBuilder> uriBuilders, Crypto crypto) {
|
||||||
|
this.uid = uid;
|
||||||
|
this.key = CryptoStreams.base64(encodedKey);
|
||||||
|
this.provider = provider;
|
||||||
|
this.uriBuilders = uriBuilders;
|
||||||
|
this.timeStampProvider = timeStampProvider;
|
||||||
|
this.crypto = crypto;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public URI apply(String path) throws HttpException {
|
||||||
|
String requestedResource = new StringBuilder().append("/rest/namespace/").append(path).toString();
|
||||||
|
long expires = timeStampProvider.get();
|
||||||
|
String signature = signString(createStringToSign(requestedResource, expires));
|
||||||
|
return uriBuilders.get().uri(provider).path(requestedResource).queryParam("uid", uid).queryParam("expires",
|
||||||
|
expires).queryParam("signature", signature).build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String createStringToSign(String requestedResource, long expires) {
|
||||||
|
StringBuilder toSign = new StringBuilder();
|
||||||
|
toSign.append("GET\n");
|
||||||
|
toSign.append(requestedResource.toLowerCase()).append("\n");
|
||||||
|
toSign.append(uid).append("\n");
|
||||||
|
toSign.append(expires);
|
||||||
|
return toSign.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String signString(String toSign) {
|
||||||
|
String signature;
|
||||||
|
try {
|
||||||
|
signature = CryptoStreams.base64(CryptoStreams.mac(InputSuppliers.of(toSign), crypto.hmacSHA1(key)));
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new HttpException("error signing request", e);
|
||||||
|
}
|
||||||
|
return signature;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.filters;
|
package org.jclouds.atmos.filters;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.functions;
|
package org.jclouds.atmos.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.functions;
|
package org.jclouds.atmos.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,36 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.functions;
|
package org.jclouds.atmos.functions;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
import static org.jclouds.http.HttpUtils.attemptToParseSizeAndRangeFromHeaders;
|
import static org.jclouds.http.HttpUtils.attemptToParseSizeAndRangeFromHeaders;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
|
||||||
|
|
||||||
import org.jclouds.atmos.domain.AtmosObject;
|
import org.jclouds.atmos.domain.AtmosObject;
|
||||||
import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders;
|
import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders;
|
||||||
|
import org.jclouds.http.HttpRequest;
|
||||||
import org.jclouds.http.HttpResponse;
|
import org.jclouds.http.HttpResponse;
|
||||||
|
import org.jclouds.rest.InvocationContext;
|
||||||
|
import org.jclouds.rest.internal.GeneratedHttpRequest;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
|
|
||||||
|
@ -36,12 +40,14 @@ import com.google.common.base.Function;
|
||||||
* @see ParseMetadataFromHeaders
|
* @see ParseMetadataFromHeaders
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
@Singleton
|
public class ParseObjectFromHeadersAndHttpContent implements Function<HttpResponse, AtmosObject>,
|
||||||
public class ParseObjectFromHeadersAndHttpContent implements Function<HttpResponse, AtmosObject> {
|
InvocationContext<ParseObjectFromHeadersAndHttpContent> {
|
||||||
|
|
||||||
private final ParseSystemMetadataFromHeaders systemMetadataParser;
|
private final ParseSystemMetadataFromHeaders systemMetadataParser;
|
||||||
private final ParseUserMetadataFromHeaders userMetadataParser;
|
private final ParseUserMetadataFromHeaders userMetadataParser;
|
||||||
private final AtmosObject.Factory objectProvider;
|
private final AtmosObject.Factory objectProvider;
|
||||||
|
private URI uri;
|
||||||
|
private String path;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public ParseObjectFromHeadersAndHttpContent(ParseSystemMetadataFromHeaders systemMetadataParser,
|
public ParseObjectFromHeadersAndHttpContent(ParseSystemMetadataFromHeaders systemMetadataParser,
|
||||||
|
@ -63,9 +69,22 @@ public class ParseObjectFromHeadersAndHttpContent implements Function<HttpRespon
|
||||||
checkNotNull(from, "http response");
|
checkNotNull(from, "http response");
|
||||||
AtmosObject object = objectProvider.create(systemMetadataParser.apply(from), userMetadataParser.apply(from));
|
AtmosObject object = objectProvider.create(systemMetadataParser.apply(from), userMetadataParser.apply(from));
|
||||||
object.getContentMetadata().setName(object.getSystemMetadata().getObjectName());
|
object.getContentMetadata().setName(object.getSystemMetadata().getObjectName());
|
||||||
|
object.getContentMetadata().setPath(path);
|
||||||
|
object.getContentMetadata().setUri(uri);
|
||||||
object.getAllHeaders().putAll(from.getHeaders());
|
object.getAllHeaders().putAll(from.getHeaders());
|
||||||
object.setPayload(from.getPayload());
|
object.setPayload(from.getPayload());
|
||||||
object.getContentMetadata().setContentLength(attemptToParseSizeAndRangeFromHeaders(from));
|
object.getContentMetadata().setContentLength(attemptToParseSizeAndRangeFromHeaders(from));
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ParseObjectFromHeadersAndHttpContent setContext(HttpRequest request) {
|
||||||
|
this.uri = request.getEndpoint();
|
||||||
|
return setPath(GeneratedHttpRequest.class.cast(request).getArgs().get(0).toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
private ParseObjectFromHeadersAndHttpContent setPath(String path) {
|
||||||
|
this.path = path;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.functions;
|
package org.jclouds.atmos.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.functions;
|
package org.jclouds.atmos.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.functions;
|
package org.jclouds.atmos.functions;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
package org.jclouds.atmos.functions;
|
||||||
|
|
||||||
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import org.jclouds.http.HttpResponse;
|
||||||
|
|
||||||
|
import com.google.common.base.Function;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Adrian Cole
|
||||||
|
*/
|
||||||
|
@Singleton
|
||||||
|
public class ReturnTrueIfGroupACLIsOtherRead implements Function<HttpResponse, Boolean> {
|
||||||
|
|
||||||
|
public Boolean apply(HttpResponse from) {
|
||||||
|
checkNotNull(from, "http response");
|
||||||
|
return from.getHeaders().containsEntry("x-emc-groupacl", "other=READ");
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.handlers;
|
package org.jclouds.atmos.handlers;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.handlers;
|
package org.jclouds.atmos.handlers;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.options;
|
package org.jclouds.atmos.options;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
/**
|
||||||
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
package org.jclouds.atmos.options;
|
||||||
|
|
||||||
|
import org.jclouds.http.options.BaseHttpRequestOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains options supported in the REST API for the PUT operations.
|
||||||
|
* <p/>
|
||||||
|
* <h2>
|
||||||
|
* Usage</h2> The recommended way to instantiate a PutOptions object is to statically import
|
||||||
|
* PutOptions.Builder.* and invoke a static creation method followed by an instance mutator (if
|
||||||
|
* needed):
|
||||||
|
* <p/>
|
||||||
|
* <code>
|
||||||
|
* import org.jclouds.atmos.options.PutOptions.Builder.*
|
||||||
|
* import org.jclouds.atmos.AtmosClient;
|
||||||
|
*
|
||||||
|
* AtmosClient connection = // get connection
|
||||||
|
* connection.createDirectory("directory", publicRead());
|
||||||
|
* <code>
|
||||||
|
*
|
||||||
|
* @author Adrian Cole
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class PutOptions extends BaseHttpRequestOptions {
|
||||||
|
public static final PutOptions NONE = new PutOptions();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add public access to all users
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public PutOptions publicRead() {
|
||||||
|
this.replaceHeader("x-emc-useracl", "root=FULL_CONTROL");
|
||||||
|
this.replaceHeader("x-emc-groupacl", "other=READ");
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Builder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see PutOptions#publicRead
|
||||||
|
*/
|
||||||
|
public static PutOptions publicRead() {
|
||||||
|
PutOptions options = new PutOptions();
|
||||||
|
return options.publicRead();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.reference;
|
package org.jclouds.atmos.reference;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.util;
|
package org.jclouds.atmos.util;
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ import org.jclouds.atmos.AtmosClient;
|
||||||
import org.jclouds.atmos.blobstore.functions.BlobToObject;
|
import org.jclouds.atmos.blobstore.functions.BlobToObject;
|
||||||
import org.jclouds.atmos.domain.AtmosError;
|
import org.jclouds.atmos.domain.AtmosError;
|
||||||
import org.jclouds.atmos.filters.SignRequest;
|
import org.jclouds.atmos.filters.SignRequest;
|
||||||
|
import org.jclouds.atmos.options.PutOptions;
|
||||||
import org.jclouds.atmos.xml.ErrorHandler;
|
import org.jclouds.atmos.xml.ErrorHandler;
|
||||||
import org.jclouds.blobstore.domain.Blob;
|
import org.jclouds.blobstore.domain.Blob;
|
||||||
import org.jclouds.crypto.Crypto;
|
import org.jclouds.crypto.Crypto;
|
||||||
|
@ -56,8 +57,8 @@ public class AtmosUtils {
|
||||||
@Inject
|
@Inject
|
||||||
Provider<ErrorHandler> errorHandlerProvider;
|
Provider<ErrorHandler> errorHandlerProvider;
|
||||||
|
|
||||||
public AtmosError parseAtmosErrorFromContent(HttpCommand command, HttpResponse response,
|
public AtmosError parseAtmosErrorFromContent(HttpCommand command, HttpResponse response, InputStream content)
|
||||||
InputStream content) throws HttpException {
|
throws HttpException {
|
||||||
AtmosError error = (AtmosError) factory.create(errorHandlerProvider.get()).parse(content);
|
AtmosError error = (AtmosError) factory.create(errorHandlerProvider.get()).parse(content);
|
||||||
if (error.getCode() == 1032) {
|
if (error.getCode() == 1032) {
|
||||||
error.setStringSigned(signer.createStringToSign(command.getCurrentRequest()));
|
error.setStringSigned(signer.createStringToSign(command.getCurrentRequest()));
|
||||||
|
@ -66,11 +67,11 @@ public class AtmosUtils {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String putBlob(final AtmosClient sync, Crypto crypto, BlobToObject blob2Object,
|
public static String putBlob(final AtmosClient sync, Crypto crypto, BlobToObject blob2Object, String container,
|
||||||
String container, Blob blob) {
|
Blob blob, PutOptions options) {
|
||||||
final String path = container + "/" + blob.getMetadata().getName();
|
final String path = container + "/" + blob.getMetadata().getName();
|
||||||
deleteAndEnsureGone(sync, path);
|
deleteAndEnsureGone(sync, path);
|
||||||
sync.createFile(container, blob2Object.apply(blob));
|
sync.createFile(container, blob2Object.apply(blob), options);
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.xml;
|
package org.jclouds.atmos.xml;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.xml;
|
package org.jclouds.atmos.xml;
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,26 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos;
|
package org.jclouds.atmos;
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Array;
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
@ -35,7 +34,9 @@ import org.jclouds.atmos.functions.ParseDirectoryListFromContentAndHeaders;
|
||||||
import org.jclouds.atmos.functions.ParseObjectFromHeadersAndHttpContent;
|
import org.jclouds.atmos.functions.ParseObjectFromHeadersAndHttpContent;
|
||||||
import org.jclouds.atmos.functions.ParseSystemMetadataFromHeaders;
|
import org.jclouds.atmos.functions.ParseSystemMetadataFromHeaders;
|
||||||
import org.jclouds.atmos.functions.ReturnEndpointIfAlreadyExists;
|
import org.jclouds.atmos.functions.ReturnEndpointIfAlreadyExists;
|
||||||
|
import org.jclouds.atmos.functions.ReturnTrueIfGroupACLIsOtherRead;
|
||||||
import org.jclouds.atmos.options.ListOptions;
|
import org.jclouds.atmos.options.ListOptions;
|
||||||
|
import org.jclouds.atmos.options.PutOptions;
|
||||||
import org.jclouds.blobstore.binders.BindBlobToMultipartFormTest;
|
import org.jclouds.blobstore.binders.BindBlobToMultipartFormTest;
|
||||||
import org.jclouds.blobstore.functions.ThrowContainerNotFoundOn404;
|
import org.jclouds.blobstore.functions.ThrowContainerNotFoundOn404;
|
||||||
import org.jclouds.blobstore.functions.ThrowKeyNotFoundOn404;
|
import org.jclouds.blobstore.functions.ThrowKeyNotFoundOn404;
|
||||||
|
@ -49,6 +50,7 @@ import org.jclouds.rest.ConfiguresRestClient;
|
||||||
import org.jclouds.rest.RestClientTest;
|
import org.jclouds.rest.RestClientTest;
|
||||||
import org.jclouds.rest.RestContextFactory;
|
import org.jclouds.rest.RestContextFactory;
|
||||||
import org.jclouds.rest.RestContextSpec;
|
import org.jclouds.rest.RestContextSpec;
|
||||||
|
import org.jclouds.rest.functions.ReturnFalseOnNotFoundOr404;
|
||||||
import org.jclouds.rest.functions.ReturnNullOnNotFoundOr404;
|
import org.jclouds.rest.functions.ReturnNullOnNotFoundOr404;
|
||||||
import org.jclouds.rest.functions.ReturnVoidOnNotFoundOr404;
|
import org.jclouds.rest.functions.ReturnVoidOnNotFoundOr404;
|
||||||
import org.jclouds.rest.internal.RestAnnotationProcessor;
|
import org.jclouds.rest.internal.RestAnnotationProcessor;
|
||||||
|
@ -71,8 +73,7 @@ public class AtmosAsyncClientTest extends RestClientTest<AtmosAsyncClient> {
|
||||||
private BlobToObject blobToObject;
|
private BlobToObject blobToObject;
|
||||||
|
|
||||||
public void testListDirectories() throws SecurityException, NoSuchMethodException, IOException {
|
public void testListDirectories() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = AtmosAsyncClient.class.getMethod("listDirectories", Array.newInstance(ListOptions.class, 0)
|
Method method = AtmosAsyncClient.class.getMethod("listDirectories", ListOptions[].class);
|
||||||
.getClass());
|
|
||||||
HttpRequest request = processor.createRequest(method);
|
HttpRequest request = processor.createRequest(method);
|
||||||
|
|
||||||
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace HTTP/1.1");
|
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace HTTP/1.1");
|
||||||
|
@ -87,8 +88,7 @@ public class AtmosAsyncClientTest extends RestClientTest<AtmosAsyncClient> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testListDirectory() throws SecurityException, NoSuchMethodException, IOException {
|
public void testListDirectory() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = AtmosAsyncClient.class.getMethod("listDirectory", String.class, Array.newInstance(
|
Method method = AtmosAsyncClient.class.getMethod("listDirectory", String.class, ListOptions[].class);
|
||||||
ListOptions.class, 0).getClass());
|
|
||||||
HttpRequest request = processor.createRequest(method, "directory");
|
HttpRequest request = processor.createRequest(method, "directory");
|
||||||
|
|
||||||
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace/directory/ HTTP/1.1");
|
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace/directory/ HTTP/1.1");
|
||||||
|
@ -103,8 +103,7 @@ public class AtmosAsyncClientTest extends RestClientTest<AtmosAsyncClient> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testListDirectoriesOptions() throws SecurityException, NoSuchMethodException, IOException {
|
public void testListDirectoriesOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = AtmosAsyncClient.class.getMethod("listDirectories", Array.newInstance(ListOptions.class, 0)
|
Method method = AtmosAsyncClient.class.getMethod("listDirectories", ListOptions[].class);
|
||||||
.getClass());
|
|
||||||
HttpRequest request = processor.createRequest(method, new ListOptions().limit(1).token("asda"));
|
HttpRequest request = processor.createRequest(method, new ListOptions().limit(1).token("asda"));
|
||||||
|
|
||||||
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace HTTP/1.1");
|
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace HTTP/1.1");
|
||||||
|
@ -119,8 +118,7 @@ public class AtmosAsyncClientTest extends RestClientTest<AtmosAsyncClient> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testListDirectoryOptions() throws SecurityException, NoSuchMethodException, IOException {
|
public void testListDirectoryOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = AtmosAsyncClient.class.getMethod("listDirectory", String.class, Array.newInstance(
|
Method method = AtmosAsyncClient.class.getMethod("listDirectory", String.class, ListOptions[].class);
|
||||||
ListOptions.class, 0).getClass());
|
|
||||||
HttpRequest request = processor.createRequest(method, "directory", new ListOptions().limit(1).token("asda"));
|
HttpRequest request = processor.createRequest(method, "directory", new ListOptions().limit(1).token("asda"));
|
||||||
|
|
||||||
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace/directory/ HTTP/1.1");
|
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace/directory/ HTTP/1.1");
|
||||||
|
@ -135,7 +133,7 @@ public class AtmosAsyncClientTest extends RestClientTest<AtmosAsyncClient> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCreateDirectory() throws SecurityException, NoSuchMethodException, IOException {
|
public void testCreateDirectory() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = AtmosAsyncClient.class.getMethod("createDirectory", String.class);
|
Method method = AtmosAsyncClient.class.getMethod("createDirectory", String.class, PutOptions[].class);
|
||||||
HttpRequest request = processor.createRequest(method, "dir");
|
HttpRequest request = processor.createRequest(method, "dir");
|
||||||
|
|
||||||
assertRequestLineEquals(request, "POST https://accesspoint.atmosonline.com/rest/namespace/dir/ HTTP/1.1");
|
assertRequestLineEquals(request, "POST https://accesspoint.atmosonline.com/rest/namespace/dir/ HTTP/1.1");
|
||||||
|
@ -149,8 +147,25 @@ public class AtmosAsyncClientTest extends RestClientTest<AtmosAsyncClient> {
|
||||||
checkFilters(request);
|
checkFilters(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testCreateDirectoryOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
|
Method method = AtmosAsyncClient.class.getMethod("createDirectory", String.class, PutOptions[].class);
|
||||||
|
HttpRequest request = processor.createRequest(method, "dir", PutOptions.Builder.publicRead());
|
||||||
|
|
||||||
|
assertRequestLineEquals(request, "POST https://accesspoint.atmosonline.com/rest/namespace/dir/ HTTP/1.1");
|
||||||
|
assertNonPayloadHeadersEqual(request, HttpHeaders.ACCEPT
|
||||||
|
+ ": */*\nx-emc-groupacl: other=READ\nx-emc-useracl: root=FULL_CONTROL\n");
|
||||||
|
assertPayloadEquals(request, "", "application/octet-stream", false);
|
||||||
|
|
||||||
|
assertResponseParserClassEquals(method, request, ParseURIFromListOrLocationHeaderIf20x.class);
|
||||||
|
assertSaxResponseParserClassEquals(method, null);
|
||||||
|
assertExceptionParserClassEquals(method, ReturnEndpointIfAlreadyExists.class);
|
||||||
|
|
||||||
|
checkFilters(request);
|
||||||
|
}
|
||||||
|
|
||||||
public void testCreateFile() throws SecurityException, NoSuchMethodException, IOException {
|
public void testCreateFile() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = AtmosAsyncClient.class.getMethod("createFile", String.class, AtmosObject.class);
|
Method method = AtmosAsyncClient.class.getMethod("createFile", String.class, AtmosObject.class,
|
||||||
|
PutOptions[].class);
|
||||||
HttpRequest request = processor.createRequest(method, "dir", blobToObject
|
HttpRequest request = processor.createRequest(method, "dir", blobToObject
|
||||||
.apply(BindBlobToMultipartFormTest.TEST_BLOB));
|
.apply(BindBlobToMultipartFormTest.TEST_BLOB));
|
||||||
|
|
||||||
|
@ -165,8 +180,27 @@ public class AtmosAsyncClientTest extends RestClientTest<AtmosAsyncClient> {
|
||||||
checkFilters(request);
|
checkFilters(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testCreateFileOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
|
Method method = AtmosAsyncClient.class.getMethod("createFile", String.class, AtmosObject.class,
|
||||||
|
PutOptions[].class);
|
||||||
|
HttpRequest request = processor.createRequest(method, "dir", blobToObject
|
||||||
|
.apply(BindBlobToMultipartFormTest.TEST_BLOB), PutOptions.Builder.publicRead());
|
||||||
|
|
||||||
|
assertRequestLineEquals(request, "POST https://accesspoint.atmosonline.com/rest/namespace/dir/hello HTTP/1.1");
|
||||||
|
assertNonPayloadHeadersEqual(request, HttpHeaders.ACCEPT
|
||||||
|
+ ": */*\nx-emc-groupacl: other=READ\nx-emc-useracl: root=FULL_CONTROL\n");
|
||||||
|
assertPayloadEquals(request, "hello", "text/plain", false);
|
||||||
|
|
||||||
|
assertResponseParserClassEquals(method, request, ParseURIFromListOrLocationHeaderIf20x.class);
|
||||||
|
assertSaxResponseParserClassEquals(method, null);
|
||||||
|
assertExceptionParserClassEquals(method, null);
|
||||||
|
|
||||||
|
checkFilters(request);
|
||||||
|
}
|
||||||
|
|
||||||
public void testUpdateFile() throws SecurityException, NoSuchMethodException, IOException {
|
public void testUpdateFile() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = AtmosAsyncClient.class.getMethod("updateFile", String.class, AtmosObject.class);
|
Method method = AtmosAsyncClient.class.getMethod("updateFile", String.class, AtmosObject.class,
|
||||||
|
PutOptions[].class);
|
||||||
HttpRequest request = processor.createRequest(method, "dir", blobToObject
|
HttpRequest request = processor.createRequest(method, "dir", blobToObject
|
||||||
.apply(BindBlobToMultipartFormTest.TEST_BLOB));
|
.apply(BindBlobToMultipartFormTest.TEST_BLOB));
|
||||||
|
|
||||||
|
@ -181,6 +215,24 @@ public class AtmosAsyncClientTest extends RestClientTest<AtmosAsyncClient> {
|
||||||
checkFilters(request);
|
checkFilters(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testUpdateFileOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
|
Method method = AtmosAsyncClient.class.getMethod("updateFile", String.class, AtmosObject.class,
|
||||||
|
PutOptions[].class);
|
||||||
|
HttpRequest request = processor.createRequest(method, "dir", blobToObject
|
||||||
|
.apply(BindBlobToMultipartFormTest.TEST_BLOB), PutOptions.Builder.publicRead());
|
||||||
|
|
||||||
|
assertRequestLineEquals(request, "PUT https://accesspoint.atmosonline.com/rest/namespace/dir/hello HTTP/1.1");
|
||||||
|
assertNonPayloadHeadersEqual(request, HttpHeaders.ACCEPT
|
||||||
|
+ ": */*\nx-emc-groupacl: other=READ\nx-emc-useracl: root=FULL_CONTROL\n");
|
||||||
|
assertPayloadEquals(request, "hello", "text/plain", false);
|
||||||
|
|
||||||
|
assertResponseParserClassEquals(method, request, ReleasePayloadAndReturn.class);
|
||||||
|
assertSaxResponseParserClassEquals(method, null);
|
||||||
|
assertExceptionParserClassEquals(method, ThrowKeyNotFoundOn404.class);
|
||||||
|
|
||||||
|
checkFilters(request);
|
||||||
|
}
|
||||||
|
|
||||||
public void testReadFile() throws SecurityException, NoSuchMethodException, IOException {
|
public void testReadFile() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = AtmosAsyncClient.class.getMethod("readFile", String.class, GetOptions[].class);
|
Method method = AtmosAsyncClient.class.getMethod("readFile", String.class, GetOptions[].class);
|
||||||
HttpRequest request = processor.createRequest(method, "dir/file");
|
HttpRequest request = processor.createRequest(method, "dir/file");
|
||||||
|
@ -226,6 +278,21 @@ public class AtmosAsyncClientTest extends RestClientTest<AtmosAsyncClient> {
|
||||||
checkFilters(request);
|
checkFilters(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testIsPublic() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
|
Method method = AtmosAsyncClient.class.getMethod("isPublic", String.class);
|
||||||
|
HttpRequest request = processor.createRequest(method, "dir/file");
|
||||||
|
|
||||||
|
assertRequestLineEquals(request, "HEAD https://accesspoint.atmosonline.com/rest/namespace/dir/file HTTP/1.1");
|
||||||
|
assertNonPayloadHeadersEqual(request, HttpHeaders.ACCEPT + ": */*\n");
|
||||||
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
|
assertResponseParserClassEquals(method, request, ReturnTrueIfGroupACLIsOtherRead.class);
|
||||||
|
assertSaxResponseParserClassEquals(method, null);
|
||||||
|
assertExceptionParserClassEquals(method, ReturnFalseOnNotFoundOr404.class);
|
||||||
|
|
||||||
|
checkFilters(request);
|
||||||
|
}
|
||||||
|
|
||||||
public void testNewObject() throws SecurityException, NoSuchMethodException, IOException {
|
public void testNewObject() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = AtmosAsyncClient.class.getMethod("newObject");
|
Method method = AtmosAsyncClient.class.getMethod("newObject");
|
||||||
assertEquals(method.getReturnType(), AtmosObject.class);
|
assertEquals(method.getReturnType(), AtmosObject.class);
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos;
|
package org.jclouds.atmos;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ import com.google.common.collect.Sets;
|
||||||
*
|
*
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
@Test(groups = "live", sequential = true)
|
@Test(groups = "live", singleThreaded = true)
|
||||||
public class AtmosClientLiveTest extends BaseBlobStoreIntegrationTest {
|
public class AtmosClientLiveTest extends BaseBlobStoreIntegrationTest {
|
||||||
|
|
||||||
public AtmosClient getApi() {
|
public AtmosClient getApi() {
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos;
|
package org.jclouds.atmos;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.binders;
|
package org.jclouds.atmos.binders;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.binders;
|
package org.jclouds.atmos.binders;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore;
|
package org.jclouds.atmos.blobstore;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.config;
|
package org.jclouds.atmos.blobstore.config;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.functions;
|
package org.jclouds.atmos.blobstore.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
|
||||||
*
|
|
||||||
* ====================================================================
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* ====================================================================
|
|
||||||
*/
|
|
||||||
package org.jclouds.atmos.blobstore.functions;
|
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
|
||||||
|
|
||||||
import org.testng.annotations.Test;
|
|
||||||
|
|
||||||
import com.google.inject.Guice;
|
|
||||||
import com.google.inject.Injector;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests behavior of {@code ObjectToBlobMetadata}
|
|
||||||
*
|
|
||||||
* @author Adrian Cole
|
|
||||||
*/
|
|
||||||
@Test(groups = "unit")
|
|
||||||
public class ObjectToBlobMetadataTest {
|
|
||||||
|
|
||||||
public void testFromWhenTypeIsDirectory() {
|
|
||||||
Injector injector = Guice.createInjector();
|
|
||||||
injector.getInstance(ObjectToBlobMetadata.class);
|
|
||||||
|
|
||||||
assertEquals("", "");
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.functions;
|
package org.jclouds.atmos.blobstore.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.integration;
|
package org.jclouds.atmos.blobstore.integration;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.integration;
|
package org.jclouds.atmos.blobstore.integration;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.integration;
|
package org.jclouds.atmos.blobstore.integration;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.integration;
|
package org.jclouds.atmos.blobstore.integration;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.integration;
|
package org.jclouds.atmos.blobstore.integration;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.integration;
|
package org.jclouds.atmos.blobstore.integration;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.integration;
|
package org.jclouds.atmos.blobstore.integration;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.integration;
|
package org.jclouds.atmos.blobstore.integration;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.blobstore.integration;
|
package org.jclouds.atmos.blobstore.integration;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.filters;
|
package org.jclouds.atmos.filters;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.functions;
|
package org.jclouds.atmos.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.functions;
|
package org.jclouds.atmos.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.functions;
|
package org.jclouds.atmos.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.functions;
|
package org.jclouds.atmos.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.functions;
|
package org.jclouds.atmos.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.functions;
|
package org.jclouds.atmos.functions;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/**
|
/**
|
||||||
*
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
|
* contributor license agreements. See the NOTICE file
|
||||||
*
|
* distributed with this work for additional information
|
||||||
* ====================================================================
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* you may not use this file except in compliance with the License.
|
* "License"); you may not use this file except in compliance
|
||||||
* You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* software distributed under the License is distributed on an
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* See the License for the specific language governing permissions and
|
* KIND, either express or implied. See the License for the
|
||||||
* limitations under the License.
|
* specific language governing permissions and limitations
|
||||||
* ====================================================================
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.atmos.internal;
|
package org.jclouds.atmos.internal;
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ import org.jclouds.atmos.domain.DirectoryEntry;
|
||||||
import org.jclouds.atmos.domain.SystemMetadata;
|
import org.jclouds.atmos.domain.SystemMetadata;
|
||||||
import org.jclouds.atmos.domain.UserMetadata;
|
import org.jclouds.atmos.domain.UserMetadata;
|
||||||
import org.jclouds.atmos.options.ListOptions;
|
import org.jclouds.atmos.options.ListOptions;
|
||||||
|
import org.jclouds.atmos.options.PutOptions;
|
||||||
import org.jclouds.blobstore.TransientAsyncBlobStore;
|
import org.jclouds.blobstore.TransientAsyncBlobStore;
|
||||||
import org.jclouds.blobstore.domain.Blob;
|
import org.jclouds.blobstore.domain.Blob;
|
||||||
import org.jclouds.blobstore.domain.BlobMetadata;
|
import org.jclouds.blobstore.domain.BlobMetadata;
|
||||||
|
@ -87,7 +88,8 @@ public class StubAtmosAsyncClient implements AtmosAsyncClient {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListenableFuture<URI> createDirectory(String directoryName) {
|
@Override
|
||||||
|
public ListenableFuture<URI> createDirectory(String directoryName, PutOptions... options) {
|
||||||
final String container;
|
final String container;
|
||||||
final String path;
|
final String path;
|
||||||
if (directoryName.indexOf('/') != -1) {
|
if (directoryName.indexOf('/') != -1) {
|
||||||
|
@ -112,7 +114,8 @@ public class StubAtmosAsyncClient implements AtmosAsyncClient {
|
||||||
}, service);
|
}, service);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListenableFuture<URI> createFile(String parent, AtmosObject object) {
|
@Override
|
||||||
|
public ListenableFuture<URI> createFile(String parent, AtmosObject object, PutOptions... options) {
|
||||||
final String uri = "http://stub/containers/" + parent + "/" + object.getContentMetadata().getName();
|
final String uri = "http://stub/containers/" + parent + "/" + object.getContentMetadata().getName();
|
||||||
String file = object.getContentMetadata().getName();
|
String file = object.getContentMetadata().getName();
|
||||||
String container = parent;
|
String container = parent;
|
||||||
|
@ -132,6 +135,7 @@ public class StubAtmosAsyncClient implements AtmosAsyncClient {
|
||||||
}, service);
|
}, service);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ListenableFuture<Void> deletePath(String path) {
|
public ListenableFuture<Void> deletePath(String path) {
|
||||||
if (path.indexOf('/') == path.length() - 1) {
|
if (path.indexOf('/') == path.length() - 1) {
|
||||||
// chop off the trailing slash
|
// chop off the trailing slash
|
||||||
|
@ -150,10 +154,12 @@ public class StubAtmosAsyncClient implements AtmosAsyncClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ListenableFuture<SystemMetadata> getSystemMetadata(String path) {
|
public ListenableFuture<SystemMetadata> getSystemMetadata(String path) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ListenableFuture<UserMetadata> getUserMetadata(String path) {
|
public ListenableFuture<UserMetadata> getUserMetadata(String path) {
|
||||||
if (path.indexOf('/') == -1)
|
if (path.indexOf('/') == -1)
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
|
@ -168,6 +174,7 @@ public class StubAtmosAsyncClient implements AtmosAsyncClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ListenableFuture<AtmosObject> headFile(String path) {
|
public ListenableFuture<AtmosObject> headFile(String path) {
|
||||||
String container = path.substring(0, path.indexOf('/'));
|
String container = path.substring(0, path.indexOf('/'));
|
||||||
path = path.substring(path.indexOf('/') + 1);
|
path = path.substring(path.indexOf('/') + 1);
|
||||||
|
@ -178,12 +185,14 @@ public class StubAtmosAsyncClient implements AtmosAsyncClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ListenableFuture<BoundedSet<? extends DirectoryEntry>> listDirectories(ListOptions... optionsList) {
|
public ListenableFuture<BoundedSet<? extends DirectoryEntry>> listDirectories(ListOptions... optionsList) {
|
||||||
// org.jclouds.blobstore.options.ListOptions options = container2ContainerListOptions
|
// org.jclouds.blobstore.options.ListOptions options = container2ContainerListOptions
|
||||||
// .apply(optionsList);
|
// .apply(optionsList);
|
||||||
return Futures.compose(blobStore.list(), resource2ObjectList, service);
|
return Futures.compose(blobStore.list(), resource2ObjectList, service);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ListenableFuture<BoundedSet<? extends DirectoryEntry>> listDirectory(String directoryName,
|
public ListenableFuture<BoundedSet<? extends DirectoryEntry>> listDirectory(String directoryName,
|
||||||
ListOptions... optionsList) {
|
ListOptions... optionsList) {
|
||||||
org.jclouds.blobstore.options.ListContainerOptions options = container2ContainerListOptions.apply(optionsList);
|
org.jclouds.blobstore.options.ListContainerOptions options = container2ContainerListOptions.apply(optionsList);
|
||||||
|
@ -197,10 +206,12 @@ public class StubAtmosAsyncClient implements AtmosAsyncClient {
|
||||||
return Futures.compose(blobStore.list(container, options), resource2ObjectList, service);
|
return Futures.compose(blobStore.list(container, options), resource2ObjectList, service);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public AtmosObject newObject() {
|
public AtmosObject newObject() {
|
||||||
return this.objectProvider.create(null);
|
return this.objectProvider.create(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ListenableFuture<Boolean> pathExists(final String path) {
|
public ListenableFuture<Boolean> pathExists(final String path) {
|
||||||
if (path.indexOf('/') == path.length() - 1) {
|
if (path.indexOf('/') == path.length() - 1) {
|
||||||
// chop off the trailing slash
|
// chop off the trailing slash
|
||||||
|
@ -218,6 +229,7 @@ public class StubAtmosAsyncClient implements AtmosAsyncClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ListenableFuture<AtmosObject> readFile(String path, GetOptions... options) {
|
public ListenableFuture<AtmosObject> readFile(String path, GetOptions... options) {
|
||||||
String container = path.substring(0, path.indexOf('/'));
|
String container = path.substring(0, path.indexOf('/'));
|
||||||
String blobName = path.substring(path.indexOf('/') + 1);
|
String blobName = path.substring(path.indexOf('/') + 1);
|
||||||
|
@ -225,7 +237,13 @@ public class StubAtmosAsyncClient implements AtmosAsyncClient {
|
||||||
return Futures.compose(blobStore.getBlob(container, blobName, getOptions), blob2Object, service);
|
return Futures.compose(blobStore.getBlob(container, blobName, getOptions), blob2Object, service);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ListenableFuture<Void> updateFile(String parent, AtmosObject object) {
|
@Override
|
||||||
|
public ListenableFuture<Void> updateFile(String parent, AtmosObject object, PutOptions... options) {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ListenableFuture<Boolean> isPublic(String path) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue