You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ab...@apache.org on 2013/05/10 23:53:23 UTC
[14/18] JCLOUDS-25. Remove oprhaned sandbox-* from repo
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/MutableResourceInfo.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/MutableResourceInfo.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/MutableResourceInfo.java
deleted file mode 100644
index ddd9899..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/MutableResourceInfo.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.mezeo.pcs.domain;
-
-import java.net.URI;
-import java.util.Date;
-
-import org.jclouds.blobstore.domain.StorageType;
-import org.jclouds.mezeo.pcs.domain.internal.MutableResourceInfoImpl;
-
-import com.google.inject.ImplementedBy;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-@ImplementedBy(MutableResourceInfoImpl.class)
-public interface MutableResourceInfo extends ResourceInfo {
- void setType(StorageType value);
-
- void setUrl(URI value);
-
- void setName(String value);
-
- void setCreated(Date value);
-
- void setInProject(Boolean value);
-
- void setModified(Date value);
-
- void setOwner(String value);
-
- void setVersion(Integer value);
-
- void setShared(Boolean value);
-
- void setAccessed(Date value);
-
- void setBytes(Long value);
-
- void setMetadata(URI value);
-
- void setParent(URI value);
-
- void setTags(URI value);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/PCSFile.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/PCSFile.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/PCSFile.java
deleted file mode 100644
index 2e37a4c..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/PCSFile.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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.mezeo.pcs.domain;
-
-import javax.annotation.Nullable;
-
-import org.jclouds.io.PayloadEnclosing;
-
-import com.google.common.collect.Multimap;
-
-/**
- *
- * @author Adrian Cole
- */
-public interface PCSFile extends PayloadEnclosing, Comparable<PCSFile> {
- public interface Factory {
- PCSFile create(@Nullable MutableFileInfo metadata);
- }
-
- /**
- * @return System and User metadata relevant to this object.
- */
- MutableFileInfo getMetadata();
-
- Multimap<String, String> getAllHeaders();
-
- void setAllHeaders(Multimap<String, String> allHeaders);
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/ResourceInfo.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/ResourceInfo.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/ResourceInfo.java
deleted file mode 100644
index a7ba781..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/ResourceInfo.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.mezeo.pcs.domain;
-
-import java.net.URI;
-import java.util.Date;
-
-import org.jclouds.blobstore.domain.StorageType;
-import org.jclouds.mezeo.pcs.domain.internal.ResourceInfoImpl;
-
-import com.google.inject.ImplementedBy;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-@ImplementedBy(ResourceInfoImpl.class)
-public interface ResourceInfo extends Comparable<ResourceInfo> {
- StorageType getType();
-
- URI getUrl();
-
- String getName();
-
- Date getCreated();
-
- Boolean isInProject();
-
- Date getModified();
-
- String getOwner();
-
- Integer getVersion();
-
- Boolean isShared();
-
- Date getAccessed();
-
- Long getBytes();
-
- URI getMetadata();
-
- URI getParent();
-
- URI getTags();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/ContainerInfoImpl.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/ContainerInfoImpl.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/ContainerInfoImpl.java
deleted file mode 100644
index 019e82a..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/ContainerInfoImpl.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.mezeo.pcs.domain.internal;
-
-import java.net.URI;
-import java.util.Date;
-
-import org.jclouds.blobstore.domain.StorageType;
-import org.jclouds.mezeo.pcs.domain.ContainerInfo;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-public class ContainerInfoImpl extends ResourceInfoImpl implements ContainerInfo {
- private final URI contents;
-
- public ContainerInfoImpl(URI url, String name, Date created, boolean inProject, Date modified,
- String owner, int version, boolean shared, Date accessed, long bytes, URI contents,
- URI tags, URI metadata, URI parent) {
- super(StorageType.FOLDER, url, name, created, inProject, modified, owner, version, shared,
- accessed, bytes, tags, metadata, parent);
- this.contents = contents;
- }
-
- public URI getContents() {
- return contents;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result + ((contents == null) ? 0 : contents.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (!super.equals(obj))
- return false;
- if (getClass() != obj.getClass())
- return false;
- ContainerInfoImpl other = (ContainerInfoImpl) obj;
- if (contents == null) {
- if (other.contents != null)
- return false;
- } else if (!contents.equals(other.contents))
- return false;
- return true;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/ContainerListImpl.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/ContainerListImpl.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/ContainerListImpl.java
deleted file mode 100644
index fa9ae65..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/ContainerListImpl.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * 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.mezeo.pcs.domain.internal;
-
-import java.net.URI;
-import java.util.Date;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.jclouds.blobstore.domain.StorageType;
-import org.jclouds.mezeo.pcs.domain.ContainerList;
-import org.jclouds.mezeo.pcs.domain.ResourceInfo;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-public class ContainerListImpl extends TreeSet<ResourceInfo> implements ContainerList {
-
- private final ResourceInfo info;
- private final Map<String, URI> metadataItems;
-
- public ContainerListImpl(URI url, String name, Date created, boolean inProject, Date modified,
- String owner, int version, boolean shared, Date accessed, long bytes,
- SortedSet<? extends ResourceInfo> contents, URI tags, URI metadata,
- Map<String, URI> metadataItems, URI parent) {
- this.info = new ResourceInfoImpl(StorageType.FOLDER, url, name, created, inProject,
- modified, owner, version, shared, accessed, bytes, tags, metadata, parent);
- addAll(contents);
- this.metadataItems = metadataItems;
- }
-
- public Map<String, URI> getMetadataItems() {
- return metadataItems;
- }
-
- public Date getAccessed() {
- return info.getAccessed();
- }
-
- public Long getBytes() {
- return info.getBytes();
- }
-
- public Date getCreated() {
- return info.getCreated();
- }
-
- public URI getMetadata() {
- return info.getMetadata();
- }
-
- public Date getModified() {
- return info.getModified();
- }
-
- public String getName() {
- return info.getName();
- }
-
- public String getOwner() {
- return info.getOwner();
- }
-
- public URI getParent() {
- return info.getParent();
- }
-
- public URI getTags() {
- return info.getTags();
- }
-
- public StorageType getType() {
- return info.getType();
- }
-
- public URI getUrl() {
- return info.getUrl();
- }
-
- public Integer getVersion() {
- return info.getVersion();
- }
-
- public Boolean isInProject() {
- return info.isInProject();
- }
-
- public Boolean isShared() {
- return info.isShared();
- }
-
- public int compareTo(ResourceInfo o) {
- return info.compareTo(o);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/FileInfoImpl.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/FileInfoImpl.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/FileInfoImpl.java
deleted file mode 100644
index 5018df1..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/FileInfoImpl.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * 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.mezeo.pcs.domain.internal;
-
-import java.net.URI;
-import java.util.Date;
-
-import org.jclouds.blobstore.domain.StorageType;
-import org.jclouds.mezeo.pcs.domain.FileInfo;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-public class FileInfoImpl extends ResourceInfoImpl implements FileInfo {
-
- private final Boolean isPublic;
- private final String mimeType;
- private final URI content;
- private final URI permissions;
- private final URI thumbnail;
-
- public FileInfoImpl(URI url, String name, Date created, boolean inProject,
- Date modified,
- String owner, int version, boolean shared, Date accessed,
- boolean isPublic, String mimeType, long bytes, URI content, URI parent,
- URI permissions, URI tags, URI metadata, URI thumbnail) {
- super(StorageType.BLOB, url, name, created, inProject, modified, owner, version, shared,
- accessed, bytes, tags, metadata, parent);
- this.isPublic = isPublic;
- this.mimeType = mimeType;
- this.content=content;
- this.permissions = permissions;
- this.thumbnail = thumbnail;
- }
-
- public Boolean isPublic() {
- return isPublic;
- }
-
- public String getMimeType() {
- return mimeType;
- }
-
- public URI getContent() {
- return content;
- }
-
- public URI getPermissions() {
- return permissions;
- }
-
- public URI getThumbnail() {
- return thumbnail;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result + ((content == null) ? 0 : content.hashCode());
- result = prime * result + (isPublic ? 1231 : 1237);
- result = prime * result + ((mimeType == null) ? 0 : mimeType.hashCode());
- result = prime * result + ((permissions == null) ? 0 : permissions.hashCode());
- result = prime * result + ((thumbnail == null) ? 0 : thumbnail.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (!super.equals(obj))
- return false;
- if (getClass() != obj.getClass())
- return false;
- FileInfoImpl other = (FileInfoImpl) obj;
- if (content == null) {
- if (other.content != null)
- return false;
- } else if (!content.equals(other.content))
- return false;
- if (isPublic != other.isPublic)
- return false;
- if (mimeType == null) {
- if (other.mimeType != null)
- return false;
- } else if (!mimeType.equals(other.mimeType))
- return false;
- if (permissions == null) {
- if (other.permissions != null)
- return false;
- } else if (!permissions.equals(other.permissions))
- return false;
- if (thumbnail == null) {
- if (other.thumbnail != null)
- return false;
- } else if (!thumbnail.equals(other.thumbnail))
- return false;
- return true;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/FileInfoWithMetadataImpl.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/FileInfoWithMetadataImpl.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/FileInfoWithMetadataImpl.java
deleted file mode 100644
index 50945a4..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/FileInfoWithMetadataImpl.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.mezeo.pcs.domain.internal;
-
-import java.net.URI;
-import java.util.Date;
-import java.util.Map;
-
-import org.jclouds.mezeo.pcs.domain.FileInfoWithMetadata;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-public class FileInfoWithMetadataImpl extends FileInfoImpl implements FileInfoWithMetadata {
- private final Map<String, URI> metadataItems;
-
- public FileInfoWithMetadataImpl(URI url, String name, Date created, boolean inProject,
- Date modified, String owner, int version, boolean shared, Date accessed,
- boolean isPublic, String mimeType, long bytes, URI content, URI parent,
- URI permissions, URI tags, URI metadata, Map<String, URI> metadataItems, URI thumbnail) {
- super(url, name, created, inProject, modified, owner, version, shared, accessed, isPublic,
- mimeType, bytes, content, parent, permissions, tags, metadata, thumbnail);
- this.metadataItems = metadataItems;
- }
-
- public Map<String, URI> getMetadataItems() {
- return metadataItems;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result + ((metadataItems == null) ? 0 : metadataItems.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (!super.equals(obj))
- return false;
- if (getClass() != obj.getClass())
- return false;
- FileInfoWithMetadataImpl other = (FileInfoWithMetadataImpl) obj;
- if (metadataItems == null) {
- if (other.metadataItems != null)
- return false;
- } else if (!metadataItems.equals(other.metadataItems))
- return false;
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/MutableFileInfoImpl.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/MutableFileInfoImpl.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/MutableFileInfoImpl.java
deleted file mode 100644
index bfc03a5..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/MutableFileInfoImpl.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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.mezeo.pcs.domain.internal;
-
-import java.net.URI;
-
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.blobstore.domain.StorageType;
-import org.jclouds.mezeo.pcs.domain.MutableFileInfo;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-public class MutableFileInfoImpl extends MutableResourceInfoImpl implements
- MutableFileInfo {
-
- private Boolean isPublic;
- private String mimeType;
- private URI content;
- private URI permissions;
- private URI thumbnail;
-
- public MutableFileInfoImpl() {
- setType(StorageType.BLOB);
- setMimeType(MediaType.APPLICATION_OCTET_STREAM);
- }
-
- public String getMimeType() {
- return mimeType;
- }
-
- public URI getContent() {
- return content;
- }
-
- public URI getPermissions() {
- return permissions;
- }
-
- public URI getThumbnail() {
- return thumbnail;
- }
-
- public void setPublic(Boolean isPublic) {
- this.isPublic = isPublic;
- }
-
- public Boolean isPublic() {
- return isPublic;
- }
-
- public void setMimeType(String mimeType) {
- this.mimeType = mimeType;
- }
-
- public void setContent(URI content) {
- this.content = content;
- }
-
- public void setPermissions(URI permissions) {
- this.permissions = permissions;
- }
-
- public void setThumbnail(URI thumbnail) {
- this.thumbnail = thumbnail;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result + ((content == null) ? 0 : content.hashCode());
- result = prime * result + ((isPublic == null) ? 0 : isPublic.hashCode());
- result = prime * result + ((mimeType == null) ? 0 : mimeType.hashCode());
- result = prime * result + ((permissions == null) ? 0 : permissions.hashCode());
- result = prime * result + ((thumbnail == null) ? 0 : thumbnail.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (!super.equals(obj))
- return false;
- if (getClass() != obj.getClass())
- return false;
- MutableFileInfoImpl other = (MutableFileInfoImpl) obj;
- if (content == null) {
- if (other.content != null)
- return false;
- } else if (!content.equals(other.content))
- return false;
- if (isPublic == null) {
- if (other.isPublic != null)
- return false;
- } else if (!isPublic.equals(other.isPublic))
- return false;
- if (mimeType == null) {
- if (other.mimeType != null)
- return false;
- } else if (!mimeType.equals(other.mimeType))
- return false;
- if (permissions == null) {
- if (other.permissions != null)
- return false;
- } else if (!permissions.equals(other.permissions))
- return false;
- if (thumbnail == null) {
- if (other.thumbnail != null)
- return false;
- } else if (!thumbnail.equals(other.thumbnail))
- return false;
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/MutableResourceInfoImpl.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/MutableResourceInfoImpl.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/MutableResourceInfoImpl.java
deleted file mode 100644
index 89887b3..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/MutableResourceInfoImpl.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/**
- * 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.mezeo.pcs.domain.internal;
-
-import java.net.URI;
-import java.util.Date;
-
-import org.jclouds.blobstore.domain.StorageType;
-import org.jclouds.mezeo.pcs.domain.MutableResourceInfo;
-import org.jclouds.mezeo.pcs.domain.ResourceInfo;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-public class MutableResourceInfoImpl implements MutableResourceInfo {
-
- private StorageType type;
- private URI url;
- private String name;
- private Date created;
- private Boolean inProject;
- private Date modified;
- private String owner;
- private Integer version;
- private Boolean shared;
- private Date accessed;
- private Long bytes;
- private URI tags;
- private URI metadata;
- private URI parent;
-
- public int compareTo(ResourceInfo o) {
- if (getName() == null)
- return -1;
- return (this == o) ? 0 : getName().compareTo(o.getName());
- }
-
- public StorageType getType() {
- return type;
- }
-
- public void setType(StorageType type) {
- this.type = type;
- }
-
- public URI getUrl() {
- return url;
- }
-
- public void setUrl(URI url) {
- this.url = url;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public Date getCreated() {
- return created;
- }
-
- public void setCreated(Date created) {
- this.created = created;
- }
-
- public Boolean isInProject() {
- return inProject;
- }
-
- public void setInProject(Boolean inProject) {
- this.inProject = inProject;
- }
-
- public Date getModified() {
- return modified;
- }
-
- public void setModified(Date modified) {
- this.modified = modified;
- }
-
- public String getOwner() {
- return owner;
- }
-
- public void setOwner(String owner) {
- this.owner = owner;
- }
-
- public Integer getVersion() {
- return version;
- }
-
- public void setVersion(Integer version) {
- this.version = version;
- }
-
- public Boolean isShared() {
- return shared;
- }
-
- public void setShared(Boolean shared) {
- this.shared = shared;
- }
-
- public Date getAccessed() {
- return accessed;
- }
-
- public void setAccessed(Date accessed) {
- this.accessed = accessed;
- }
-
- public Long getBytes() {
- return bytes;
- }
-
- public void setBytes(Long bytes) {
- this.bytes = bytes;
- }
-
- public URI getTags() {
- return tags;
- }
-
- public void setTags(URI tags) {
- this.tags = tags;
- }
-
- public URI getMetadata() {
- return metadata;
- }
-
- public void setMetadata(URI metadata) {
- this.metadata = metadata;
- }
-
- public URI getParent() {
- return parent;
- }
-
- public void setParent(URI parent) {
- this.parent = parent;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((accessed == null) ? 0 : accessed.hashCode());
- result = prime * result + ((bytes == null) ? 0 : bytes.hashCode());
- result = prime * result + ((created == null) ? 0 : created.hashCode());
- result = prime * result + ((inProject == null) ? 0 : inProject.hashCode());
- result = prime * result + ((metadata == null) ? 0 : metadata.hashCode());
- result = prime * result + ((modified == null) ? 0 : modified.hashCode());
- result = prime * result + ((name == null) ? 0 : name.hashCode());
- result = prime * result + ((owner == null) ? 0 : owner.hashCode());
- result = prime * result + ((parent == null) ? 0 : parent.hashCode());
- result = prime * result + ((shared == null) ? 0 : shared.hashCode());
- result = prime * result + ((tags == null) ? 0 : tags.hashCode());
- result = prime * result + ((type == null) ? 0 : type.hashCode());
- result = prime * result + ((url == null) ? 0 : url.hashCode());
- result = prime * result + ((version == null) ? 0 : version.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- MutableResourceInfoImpl other = (MutableResourceInfoImpl) obj;
- if (accessed == null) {
- if (other.accessed != null)
- return false;
- } else if (!accessed.equals(other.accessed))
- return false;
- if (bytes == null) {
- if (other.bytes != null)
- return false;
- } else if (!bytes.equals(other.bytes))
- return false;
- if (created == null) {
- if (other.created != null)
- return false;
- } else if (!created.equals(other.created))
- return false;
- if (inProject == null) {
- if (other.inProject != null)
- return false;
- } else if (!inProject.equals(other.inProject))
- return false;
- if (metadata == null) {
- if (other.metadata != null)
- return false;
- } else if (!metadata.equals(other.metadata))
- return false;
- if (modified == null) {
- if (other.modified != null)
- return false;
- } else if (!modified.equals(other.modified))
- return false;
- if (name == null) {
- if (other.name != null)
- return false;
- } else if (!name.equals(other.name))
- return false;
- if (owner == null) {
- if (other.owner != null)
- return false;
- } else if (!owner.equals(other.owner))
- return false;
- if (parent == null) {
- if (other.parent != null)
- return false;
- } else if (!parent.equals(other.parent))
- return false;
- if (shared == null) {
- if (other.shared != null)
- return false;
- } else if (!shared.equals(other.shared))
- return false;
- if (tags == null) {
- if (other.tags != null)
- return false;
- } else if (!tags.equals(other.tags))
- return false;
- if (type == null) {
- if (other.type != null)
- return false;
- } else if (!type.equals(other.type))
- return false;
- if (url == null) {
- if (other.url != null)
- return false;
- } else if (!url.equals(other.url))
- return false;
- if (version == null) {
- if (other.version != null)
- return false;
- } else if (!version.equals(other.version))
- return false;
- return true;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/PCSFileImpl.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/PCSFileImpl.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/PCSFileImpl.java
deleted file mode 100644
index 9152eef..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/PCSFileImpl.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.mezeo.pcs.domain.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-
-import org.jclouds.http.internal.PayloadEnclosingImpl;
-import org.jclouds.mezeo.pcs.domain.MutableFileInfo;
-import org.jclouds.mezeo.pcs.domain.PCSFile;
-
-import com.google.common.collect.LinkedHashMultimap;
-import com.google.common.collect.Multimap;
-
-/**
- * Default Implementation of {@link PCSFile}.
- *
- * @author Adrian Cole
- */
-public class PCSFileImpl extends PayloadEnclosingImpl implements PCSFile, Comparable<PCSFile> {
-
- private final MutableFileInfo metadata;
- private Multimap<String, String> allHeaders = LinkedHashMultimap.create();
-
- @Inject
- public PCSFileImpl(MutableFileInfo metadata) {
- super();// no MD5 support
- this.metadata = metadata;
- }
-
- /**
- * {@inheritDoc}
- */
- public MutableFileInfo getMetadata() {
- return metadata;
- }
-
- /**
- * {@inheritDoc}
- */
- public Multimap<String, String> getAllHeaders() {
- return allHeaders;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setAllHeaders(Multimap<String, String> allHeaders) {
- this.allHeaders = checkNotNull(allHeaders, "allHeaders");
- }
-
- /**
- * {@inheritDoc}
- */
- public int compareTo(PCSFile o) {
- if (getMetadata().getName() == null)
- return -1;
- return (this == o) ? 0 : getMetadata().getName().compareTo(o.getMetadata().getName());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/ResourceInfoImpl.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/ResourceInfoImpl.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/ResourceInfoImpl.java
deleted file mode 100644
index 52810ae..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/domain/internal/ResourceInfoImpl.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/**
- * 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.mezeo.pcs.domain.internal;
-
-import java.net.URI;
-import java.util.Date;
-
-import org.jclouds.blobstore.domain.StorageType;
-import org.jclouds.mezeo.pcs.domain.ResourceInfo;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-public class ResourceInfoImpl implements ResourceInfo {
-
- private final StorageType type;
- private final URI url;
- private final String name;
- private final Date created;
- private final boolean inProject;
- private final Date modified;
- private final String owner;
- private final int version;
- private final boolean shared;
- private final Date accessed;
- private final long bytes;
- private final URI tags;
- private final URI metadata;
- private final URI parent;
-
- protected ResourceInfoImpl(StorageType type, URI url, String name, Date created,
- boolean inProject, Date modified, String owner, int version, boolean shared,
- Date accessed, long bytes, URI tags, URI metadata, URI parent) {
- super();
- this.type = type;
- this.url = url;
- this.name = name;
- this.created = created;
- this.inProject = inProject;
- this.modified = modified;
- this.owner = owner;
- this.version = version;
- this.shared = shared;
- this.accessed = accessed;
- this.bytes = bytes;
- this.tags = tags;
- this.metadata = metadata;
- this.parent = parent;
- }
-
- public int compareTo(ResourceInfo o) {
- if (getName() == null)
- return -1;
- if (o.getName() == null)
- return 1;
- return (this == o) ? 0 : getName().compareTo(o.getName());
- }
-
- public StorageType getType() {
- return type;
- }
-
- public URI getUrl() {
- return url;
- }
-
- public String getName() {
- return name;
- }
-
- public Date getCreated() {
- return created;
- }
-
- public Boolean isInProject() {
- return inProject;
- }
-
- public Date getModified() {
- return modified;
- }
-
- public String getOwner() {
- return owner;
- }
-
- public Integer getVersion() {
- return version;
- }
-
- public Boolean isShared() {
- return shared;
- }
-
- public Date getAccessed() {
- return accessed;
- }
-
- public Long getBytes() {
- return bytes;
- }
-
- public URI getTags() {
- return tags;
- }
-
- public URI getMetadata() {
- return metadata;
- }
-
- public URI getParent() {
- return parent;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((accessed == null) ? 0 : accessed.hashCode());
- result = prime * result + (int) (bytes ^ (bytes >>> 32));
- result = prime * result + ((created == null) ? 0 : created.hashCode());
- result = prime * result + (inProject ? 1231 : 1237);
- result = prime * result + ((metadata == null) ? 0 : metadata.hashCode());
- result = prime * result + ((modified == null) ? 0 : modified.hashCode());
- result = prime * result + ((name == null) ? 0 : name.hashCode());
- result = prime * result + ((owner == null) ? 0 : owner.hashCode());
- result = prime * result + ((parent == null) ? 0 : parent.hashCode());
- result = prime * result + (shared ? 1231 : 1237);
- result = prime * result + ((tags == null) ? 0 : tags.hashCode());
- result = prime * result + ((type == null) ? 0 : type.hashCode());
- result = prime * result + ((url == null) ? 0 : url.hashCode());
- result = prime * result + version;
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- ResourceInfoImpl other = (ResourceInfoImpl) obj;
- if (accessed == null) {
- if (other.accessed != null)
- return false;
- } else if (!accessed.equals(other.accessed))
- return false;
- if (bytes != other.bytes)
- return false;
- if (created == null) {
- if (other.created != null)
- return false;
- } else if (!created.equals(other.created))
- return false;
- if (inProject != other.inProject)
- return false;
- if (metadata == null) {
- if (other.metadata != null)
- return false;
- } else if (!metadata.equals(other.metadata))
- return false;
- if (modified == null) {
- if (other.modified != null)
- return false;
- } else if (!modified.equals(other.modified))
- return false;
- if (name == null) {
- if (other.name != null)
- return false;
- } else if (!name.equals(other.name))
- return false;
- if (owner == null) {
- if (other.owner != null)
- return false;
- } else if (!owner.equals(other.owner))
- return false;
- if (parent == null) {
- if (other.parent != null)
- return false;
- } else if (!parent.equals(other.parent))
- return false;
- if (shared != other.shared)
- return false;
- if (tags == null) {
- if (other.tags != null)
- return false;
- } else if (!tags.equals(other.tags))
- return false;
- if (type == null) {
- if (other.type != null)
- return false;
- } else if (!type.equals(other.type))
- return false;
- if (url == null) {
- if (other.url != null)
- return false;
- } else if (!url.equals(other.url))
- return false;
- if (version != other.version)
- return false;
- return true;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Contacts.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Contacts.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Contacts.java
deleted file mode 100644
index f707949..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Contacts.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.mezeo.pcs.endpoints;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Related to a resource of type Contacts, which represents the user's contact list.
- *
- * @author Adrian Cole
- *
- */
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
-@Qualifier
-public @interface Contacts {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Metacontainers.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Metacontainers.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Metacontainers.java
deleted file mode 100644
index e1ab417..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Metacontainers.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.mezeo.pcs.endpoints;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Related to a resource of type MetaContainers, which lists the metacontainers available to the
- * user.
- *
- * @author Adrian Cole
- *
- */
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
-@Qualifier
-public @interface Metacontainers {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Projects.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Projects.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Projects.java
deleted file mode 100644
index dcd8270..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Projects.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.mezeo.pcs.endpoints;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Related to a resource of type Projects, which lists the projects available to the user.
- *
- * @author Adrian Cole
- *
- */
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
-@Qualifier
-public @interface Projects {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Recyclebin.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Recyclebin.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Recyclebin.java
deleted file mode 100644
index 5505337..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Recyclebin.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.mezeo.pcs.endpoints;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Related to a resource of type RecycleBin, which contains the user's deleted files.
- *
- * @author Adrian Cole
- *
- */
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
-@Qualifier
-public @interface Recyclebin {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/RootContainer.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/RootContainer.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/RootContainer.java
deleted file mode 100644
index 9da2fb7..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/RootContainer.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.mezeo.pcs.endpoints;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Related to a resource of type Container, which is the user's root Container
- *
- * @author Adrian Cole
- *
- */
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
-@Qualifier
-public @interface RootContainer {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Shares.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Shares.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Shares.java
deleted file mode 100644
index 735877a..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Shares.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.mezeo.pcs.endpoints;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Related to a resource of type Shares, which lists the items shared to and by the user.
- *
- * @author Adrian Cole
- *
- */
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
-@Qualifier
-public @interface Shares {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Tags.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Tags.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Tags.java
deleted file mode 100644
index e172734..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/Tags.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.mezeo.pcs.endpoints;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Related to a resource of type Tags, which lists all the tags applied to the user's files.
- *
- * @author Adrian Cole
- *
- */
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
-@Qualifier
-public @interface Tags {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/WebDAV.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/WebDAV.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/WebDAV.java
deleted file mode 100644
index 029edd5..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/endpoints/WebDAV.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.mezeo.pcs.endpoints;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Related to a resource of type WebDAV
- *
- * @author Adrian Cole
- *
- */
-@Retention(value = RetentionPolicy.RUNTIME)
-@Target(value = { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
-@Qualifier
-public @interface WebDAV {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/functions/AddMetadataItemIntoMap.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/functions/AddMetadataItemIntoMap.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/functions/AddMetadataItemIntoMap.java
deleted file mode 100644
index e6364a6..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/functions/AddMetadataItemIntoMap.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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.mezeo.pcs.functions;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkState;
-
-import java.util.Map;
-
-import javax.inject.Inject;
-
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.http.functions.ReturnStringIf2xx;
-import org.jclouds.rest.InvocationContext;
-import org.jclouds.rest.internal.GeneratedHttpRequest;
-
-import com.google.common.base.Function;
-
-/**
- *
- * @author Adrian Cole
- */
-public class AddMetadataItemIntoMap implements Function<HttpResponse, Void>, InvocationContext<AddMetadataItemIntoMap> {
- ReturnStringIf2xx returnIf200;
- private GeneratedHttpRequest<?> request;
-
- @Inject
- private AddMetadataItemIntoMap(ReturnStringIf2xx returnIf200) {
- this.returnIf200 = returnIf200;
- }
-
- @SuppressWarnings("unchecked")
- public Void apply(HttpResponse from) {
- checkState(request.getArgs() != null, "args should be initialized at this point");
- Map<String, String> map = null;
- String key = null;
- for (Object arg : request.getArgs()) {
- if (arg instanceof Map)
- map = (Map<String, String>) arg;
- else if (arg instanceof String)
- key = arg.toString();
- }
- checkState(map != null, "No Map found in args, improper method declarations");
- checkState(key != null, "No String found in args, improper method declarations");
-
- map.put(key, returnIf200.apply(from).trim());
- return null;
- }
-
- @Override
- public AddMetadataItemIntoMap setContext(HttpRequest request) {
- checkArgument(request instanceof GeneratedHttpRequest<?>, "note this handler requires a GeneratedHttpRequest");
- this.request = (GeneratedHttpRequest<?>) request;
- return this;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/functions/ReturnFalseIfContainerNotFound.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/functions/ReturnFalseIfContainerNotFound.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/functions/ReturnFalseIfContainerNotFound.java
deleted file mode 100644
index 7f8aca5..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/functions/ReturnFalseIfContainerNotFound.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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.mezeo.pcs.functions;
-
-import javax.inject.Singleton;
-
-import org.jclouds.blobstore.ContainerNotFoundException;
-
-import com.google.common.base.Function;
-import com.google.common.base.Throwables;
-
-/**
- *
- * @author Adrian Cole
- */
-@Singleton
-public class ReturnFalseIfContainerNotFound implements Function<Exception, Boolean> {
-
- @Override
- public Boolean apply(Exception from) {
- if (from instanceof ContainerNotFoundException) {
- return false;
- }
- throw Throwables.propagate(from);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/functions/ReturnTrueIfContainerAlreadyExists.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/functions/ReturnTrueIfContainerAlreadyExists.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/functions/ReturnTrueIfContainerAlreadyExists.java
deleted file mode 100644
index f1ce032..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/functions/ReturnTrueIfContainerAlreadyExists.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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.mezeo.pcs.functions;
-
-import javax.inject.Singleton;
-
-import org.jclouds.http.HttpResponseException;
-
-import com.google.common.base.Function;
-import com.google.common.base.Throwables;
-
-/**
- *
- * @author Adrian Cole
- */
-@Singleton
-public class ReturnTrueIfContainerAlreadyExists implements Function<Exception, Boolean> {
- @Override
- public Boolean apply(Exception from) {
- if (from instanceof HttpResponseException) {
- HttpResponseException responseException = (HttpResponseException) from;
- if ("The directory already exists.".equals(responseException.getContent())) {
- return true;
- }
- }
- throw Throwables.propagate(from);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/handlers/PCSClientErrorRetryHandler.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/handlers/PCSClientErrorRetryHandler.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/handlers/PCSClientErrorRetryHandler.java
deleted file mode 100644
index c103079..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/handlers/PCSClientErrorRetryHandler.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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.mezeo.pcs.handlers;
-
-import javax.annotation.Resource;
-import javax.inject.Inject;
-
-import org.jclouds.http.HttpCommand;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.http.HttpRetryHandler;
-import org.jclouds.http.handlers.BackoffLimitedRetryHandler;
-import org.jclouds.logging.Logger;
-
-/**
- * Handles Retryable responses with error codes in the 4xx range
- *
- * @author Adrian Cole
- */
-public class PCSClientErrorRetryHandler implements HttpRetryHandler {
-
- private final BackoffLimitedRetryHandler backoffHandler;
-
- @Inject
- public PCSClientErrorRetryHandler(BackoffLimitedRetryHandler backoffHandler) {
- this.backoffHandler = backoffHandler;
- }
-
- @Resource
- protected Logger logger = Logger.NULL;
-
- public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) {
- if (response.getStatusCode() == 400) {
- return backoffHandler.shouldRetryRequest(command, response);
- }
- return false;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/options/PutBlockOptions.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/options/PutBlockOptions.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/options/PutBlockOptions.java
deleted file mode 100644
index e4489f1..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/options/PutBlockOptions.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * 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.mezeo.pcs.options;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-import org.jclouds.http.options.BaseHttpRequestOptions;
-
-import com.google.common.collect.Multimap;
-
-/**
- * Contains options supported in the REST API for the PUT file operation. <h2>
- * Usage</h2> The recommended way to instantiate a PutFileOptions object is to statically import
- * PutFileOptions.Builder.* and invoke a static creation method followed by an instance mutator (if
- * needed):
- * <p/>
- * <code>
- * import static org.jclouds.mezeo.pcs2.options.PutFileOptions.Builder.*
- * import org.jclouds.mezeo.pcs2.PCSClient;
- * <p/>
- * PCSClient connection = // get connection
- * Future<Void> added = connection.appendFile("container",range(0,3));
- * <code>
- *
- * @author Adrian Cole
- */
-public class PutBlockOptions extends BaseHttpRequestOptions {
- public static final PutBlockOptions NONE = new PutBlockOptions();
- private String range;
-
- @Override
- public Multimap<String, String> buildRequestHeaders() {
- Multimap<String, String> headers = super.buildRequestHeaders();
- String range = getRange();
- if (range != null)
- headers.put("Content-Range", this.getRange());
- return headers;
- }
-
- /**
- * For use in the header Content-Range
- * <p />
- *
- * @see PutBlockOptions#range(long, long)
- */
- public String getRange() {
- return range;
- }
-
- /**
- * download the specified range of the object.
- */
- public PutBlockOptions range(long start, long end) {
- checkArgument(start >= 0, "start must be >= 0");
- checkArgument(end >= 0, "end must be >= 0");
- range = String.format("bytes %d-%d/*", start, end);
- return this;
- }
-
- public static class Builder {
- /**
- * @see PutBlockOptions#range(long, long)
- */
- public static PutBlockOptions range(long start, long end) {
- PutBlockOptions options = new PutBlockOptions();
- return options.range(start, end);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/xml/CloudXlinkHandler.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/xml/CloudXlinkHandler.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/xml/CloudXlinkHandler.java
deleted file mode 100644
index a8f0a75..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/xml/CloudXlinkHandler.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * 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.mezeo.pcs.xml;
-
-import java.net.URI;
-import java.util.Map;
-
-import org.jclouds.http.functions.ParseSax;
-import org.jclouds.mezeo.pcs.PCSCloudAsyncClient;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-import com.google.common.collect.Maps;
-
-/**
- * Parses the discovery response from xlink refs.
- *
- * @author Adrian Cole
- */
-public class CloudXlinkHandler extends ParseSax.HandlerWithResult<PCSCloudAsyncClient.Response> {
-
- private Map<String, URI> map = Maps.newHashMap();
-
- public static class PCSCloudResponseImpl implements PCSCloudAsyncClient.Response {
- private final Map<String, URI> map;
-
- public PCSCloudResponseImpl(Map<String, URI> map) {
- this.map = map;
- }
-
- public URI getContactsUrl() {
- return map.get("contacts");
- }
-
- public URI getMetacontainersUrl() {
- return map.get("metacontainers");
- }
-
- public URI getProjectsUrl() {
- return map.get("projects");
- }
-
- public URI getRecyclebinUrl() {
- return map.get("recyclebin");
- }
-
- public URI getRootContainerUrl() {
- return map.get("rootContainer");
- }
-
- public URI getSharesUrl() {
- return map.get("shares");
- }
-
- public URI getTagsUrl() {
- return map.get("tags");
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((map == null) ? 0 : map.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- PCSCloudResponseImpl other = (PCSCloudResponseImpl) obj;
- if (map == null) {
- if (other.map != null)
- return false;
- } else if (!map.equals(other.map))
- return false;
- return true;
- }
-
- @Override
- public String toString() {
- return "PCSDiscoveryResponseImpl [map=" + map + "]";
- }
-
- }
-
- public PCSCloudAsyncClient.Response getResult() {
- return new PCSCloudResponseImpl(map);
- }
-
- @Override
- public void startElement(String uri, String localName, String qName, Attributes attributes)
- throws SAXException {
- int index = attributes.getIndex("xlink:href");
- if (index != -1) {
- map.put(qName, URI.create(attributes.getValue(index)));
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/23d9d901/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/xml/ContainerHandler.java
----------------------------------------------------------------------
diff --git a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/xml/ContainerHandler.java b/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/xml/ContainerHandler.java
deleted file mode 100644
index 1d4fa40..0000000
--- a/sandbox-apis/pcs/src/main/java/org/jclouds/mezeo/pcs/xml/ContainerHandler.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/**
- * 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.mezeo.pcs.xml;
-
-import java.net.URI;
-import java.util.Date;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.regex.Pattern;
-
-import javax.annotation.Resource;
-import javax.inject.Inject;
-
-import org.jclouds.date.DateService;
-import org.jclouds.http.functions.ParseSax;
-import org.jclouds.logging.Logger;
-import org.jclouds.mezeo.pcs.domain.ContainerList;
-import org.jclouds.mezeo.pcs.domain.ResourceInfo;
-import org.jclouds.mezeo.pcs.domain.internal.ContainerInfoImpl;
-import org.jclouds.mezeo.pcs.domain.internal.ContainerListImpl;
-import org.jclouds.mezeo.pcs.domain.internal.FileInfoImpl;
-import org.jclouds.util.Strings2;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
-
-/**
- * @author Adrian Cole
- */
-public class ContainerHandler extends ParseSax.HandlerWithResult<ContainerList> {
-
- @Resource
- protected Logger logger = Logger.NULL;
-
- private SortedSet<ResourceInfo> containerMetadata = Sets.newTreeSet();
- protected Map<String, URI> metadataItems = Maps.newHashMap();
-
- private URI rootUrl;
- private String rootName;
- private Date rootCreated;
- private boolean rootInproject;
- private Date rootModified;
- private String rootOwner;
- private int rootVersion;
- private boolean rootShared;
- private Date rootAccessed;
- private long rootBytes;
- private URI rootParent;
- private URI rootTags;
- private URI rootMetadata;
-
- private URI currentUrl;
- private String currentName;
- private Date currentCreated;
- private boolean currentInproject;
- private Date currentModified;
- private String currentOwner;
- private int currentVersion;
- private boolean currentShared;
- private Date currentAccessed;
- private long currentBytes;
- private URI currentParent;
- private URI currentTags;
- private URI currentMetadata;
- private URI currentContents;
-
- private boolean currentPublic;
- private String currentMimeType;
- private URI currentContent;
- private URI currentPermissions;
-
- private URI currentThumbnail;
-
- private StringBuilder currentText = new StringBuilder();
-
- private final DateService dateParser;
-
- boolean inContainer = false;
- boolean inContents = false;
-
- private ContainerListImpl rootContainer;
-
- @Inject
- public ContainerHandler(DateService dateParser) {
- this.dateParser = dateParser;
- }
-
- public ContainerList getResult() {
- return rootContainer;
- }
-
- @Override
- public void startElement(String uri, String localName, String qName, Attributes attributes)
- throws SAXException {
- if (qName.equals("contents") && attributes.getIndex("count") != -1) {
- int index = attributes.getIndex("xlink:href");
- if (index != -1) {
- rootUrl = URI.create(attributes.getValue(index).replace("/contents", ""));
- }
- inContents = true;
- return;
- } else if (qName.equals("container")) {
- if (inContents)
- inContainer = true;
- int index = attributes.getIndex("xlink:href");
- if (index != -1) {
- currentUrl = URI.create(attributes.getValue(index));
- }
- } else if (qName.equals("parent")) {
- int index = attributes.getIndex("xlink:href");
- if (index != -1) {
- currentParent = URI.create(attributes.getValue(index));
- if (!inContents)
- rootParent = currentParent;
- }
- } else if (qName.equals("file")) {
- int index = attributes.getIndex("xlink:href");
- if (index != -1) {
- currentUrl = URI.create(attributes.getValue(index));
- }
- } else if (qName.equals("content")) {
- int index = attributes.getIndex("xlink:href");
- if (index != -1) {
- currentContent = URI.create(attributes.getValue(index));
- }
- } else if (qName.equals("contents")) {
- int index = attributes.getIndex("xlink:href");
- if (index != -1) {
- currentContents = URI.create(attributes.getValue(index));
- }
- } else if (qName.equals("permissions")) {
- int index = attributes.getIndex("xlink:href");
- if (index != -1) {
- currentPermissions = URI.create(attributes.getValue(index));
- }
- } else if (qName.equals("tags")) {
- int index = attributes.getIndex("xlink:href");
- if (index != -1) {
- currentTags = URI.create(attributes.getValue(index));
- if (!inContents)
- rootTags = currentTags;
- }
- } else if (qName.equals("thumbnail")) {
- int index = attributes.getIndex("xlink:href");
- if (index != -1) {
- currentThumbnail = URI.create(attributes.getValue(index));
- }
- } else if (qName.equals("metadata")) {
- int index = attributes.getIndex("xlink:href");
- if (index != -1) {
- currentMetadata = URI.create(attributes.getValue(index));
- if (!inContents)
- rootMetadata = currentMetadata;
- }
- } else if (qName.equals("metadata-item")) {
- int index = attributes.getIndex("xlink:href");
- if (index != -1) {
- String key = Strings2.replaceAll(attributes.getValue(index), METADATA_PATTERN, "");
- metadataItems.put(key.toLowerCase(), URI.create(attributes.getValue(index)));
- }
- }
- }
-
- public final Pattern METADATA_PATTERN = Pattern.compile(".*/metadata/");
-
- @Override
- public void endElement(String uri, String name, String qName) {
- if (qName.equals("contents")) {
- if (!inContainer)
- inContents = false;
- currentText = new StringBuilder();
- return;
- }
- if (qName.equals("container") && !inContents) {
- rootContainer = new ContainerListImpl(rootUrl, rootName, rootCreated, rootInproject,
- rootModified, rootOwner, rootVersion, rootShared, rootAccessed, rootBytes,
- containerMetadata, rootTags, rootMetadata, metadataItems, rootParent);
- } else if (qName.equals("container") || qName.equals("file")) {
- if (qName.equals("container")) {
- inContainer = false;
- containerMetadata.add(new ContainerInfoImpl(currentUrl, currentName, currentCreated,
- currentInproject, currentModified, currentOwner, currentVersion,
- currentShared, currentAccessed, currentBytes, currentContents, currentTags,
- currentMetadata, currentParent));
- } else {
- containerMetadata.add(new FileInfoImpl(currentUrl, currentName, currentCreated,
- currentInproject, currentModified, currentOwner, currentVersion,
- currentShared, currentAccessed, currentPublic, currentMimeType, currentBytes,
- currentContent, currentParent, currentPermissions, currentTags,
- currentMetadata, currentThumbnail));
- }
- currentUrl = null;
- currentName = null;
- currentCreated = null;
- currentInproject = false;
- currentModified = null;
- currentOwner = null;
- currentVersion = 0;
- currentShared = false;
- currentAccessed = null;
- currentBytes = 0;
- currentPublic = false;
- currentMimeType = null;
- currentParent = null;
- currentContents = null;
- currentContent = null;
- currentPermissions = null;
- currentTags = null;
- currentMetadata = null;
- currentThumbnail = null;
-
- } else if (qName.equals("name")) {
- currentName = currentText.toString().trim();
- if (!inContents)
- rootName = currentName;
- } else if (qName.equals("created")) {
- currentCreated = dateParser.fromSeconds(Long.parseLong(currentText.toString().trim()));
- if (!inContents)
- rootCreated = currentCreated;
- } else if (qName.equals("inproject")) {
- currentInproject = Boolean.parseBoolean(currentText.toString().trim());
- if (!inContents)
- rootInproject = currentInproject;
- } else if (qName.equals("modified")) {
- currentModified = dateParser.fromSeconds(Long.parseLong(currentText.toString().trim()));
- if (!inContents)
- rootModified = currentModified;
- } else if (qName.equals("owner")) {
- currentOwner = currentText.toString().trim();
- if (!inContents)
- rootOwner = currentOwner;
- } else if (qName.equals("version")) {
- currentVersion = Integer.parseInt(currentText.toString().trim());
- if (!inContents)
- rootVersion = currentVersion;
- } else if (qName.equals("shared")) {
- currentShared = Boolean.parseBoolean(currentText.toString().trim());
- if (!inContents)
- rootShared = currentShared;
- } else if (qName.equals("accessed")) {
- currentAccessed = dateParser.fromSeconds(Long.parseLong(currentText.toString().trim()));
- if (!inContents)
- rootAccessed = currentAccessed;
- } else if (qName.equals("bytes")) {
- currentBytes = Long.parseLong(currentText.toString().trim());
- if (!inContents)
- rootBytes = currentBytes;
- } else if (qName.equals("public")) {
- currentPublic = Boolean.parseBoolean(currentText.toString().trim());
- } else if (qName.equals("mime_type")) {
- currentMimeType = currentText.toString().trim();
- }
- currentText = new StringBuilder();
- }
-
- public void characters(char ch[], int start, int length) {
- currentText.append(ch, start, length);
- }
-}