Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed jetset dependency and repository.

Removed S3 handler (not really needed)
  • Loading branch information...
commit 72339f81ebd46b3162350fcb03387219780b3bd2 1 parent 9f696b1
Mark Collin authored
View
6 ebselen-core/pom.xml
@@ -61,9 +61,9 @@
</exclusions>
</dependency>
<dependency>
- <groupId>net.java.dev.jets3t</groupId>
- <artifactId>jets3t</artifactId>
- <version>0.8.0</version>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
View
112 ebselen-core/src/main/java/com/lazerycode/ebselen/customhandlers/S3Handler.java
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2010-2011 Ardesco Solutions - http://www.ardescosolutions.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 com.lazerycode.ebselen.customhandlers;
-
-import com.google.common.annotations.Beta;
-import com.lazerycode.ebselen.EbselenCore;
-import org.jets3t.service.*;
-import org.jets3t.service.impl.rest.httpclient.*;
-import org.jets3t.service.model.*;
-import org.jets3t.service.security.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@Beta
-public class S3Handler {
-
- private String awsAccessKey;// = get("s3keyid");
- private String awsSecretKey;// = get("s3secretkey");
- private String s3BucketName;// = get("s3bucket");
- private String currentS3Bucket = null;
- private AWSCredentials awsCredentials;
- private S3Service s3Service;
- private S3Bucket[] myBuckets;
- private static final Logger logger = LoggerFactory.getLogger(EbselenCore.class);
-
- /**
- * S3 Constructor - sets up a basic S3 so we can check the status of S3 uploads
- */
- public S3Handler() {
- awsCredentials = new AWSCredentials(awsAccessKey, awsSecretKey);
- try {
- s3Service = new RestS3Service(awsCredentials);
- } catch (S3ServiceException Ex) {
- logger.error("Unable to initialise S3 Service: " + Ex.getS3ErrorMessage());
- }
- try {
- myBuckets = s3Service.listAllBuckets();
- } catch (S3ServiceException Ex) {
- logger.error("Unable to list S3 Buckets: " + Ex.getS3ErrorMessage());
- }
- }
-
- public String getCurrentS3Bucket() throws S3ServiceException {
- return currentS3Bucket;
- }
-
- public void setCurrentS3Bucket(String bucketName) throws S3ServiceException {
- currentS3Bucket = bucketName;
- }
-
- /**
- * Checks to see if an object exists in the S3 bucket for the current environment
- *
- * @param item the name of the item we are looking for.
- * @return true if exists otherwise false.
- * @throws S3ServiceException
- */
- public boolean objectExists(String item) throws ServiceException {
- S3Object[] availableItems;
- try {
- availableItems = s3Service.listObjects(s3BucketName);
- } catch (S3ServiceException Ex) {
- logger.error("Unable to find " + item);
- return false;
- }
- // Workaround because the API cannot seem to access a bucket with a . in its name
- for (int i = 0; i < availableItems.length; i++) {
- if (availableItems[i].getKey().toString().equals(item)) {
- logger.debug("Found '" + item + "' on S3!");
- return true;
- }
- }
- return false;
- }
-
- /**
- * Deletes an object from S3
- *
- * @param item the name of the item we are trying to delete.
- * @throws S3ServiceException
- */
- public void deleteObject(String item) throws ServiceException {
- try {
- s3Service.deleteObject(s3BucketName, item);
- } catch (ServiceException Ex) {
- logger.error("Unable to delete object : " + Ex.getErrorMessage());
- }
- }
-
- /**
- * Close S3 Connection and clean up
- *
- * @throws S3ServiceException
- */
- public void end() throws ServiceException {
- s3Service.shutdown();
- }
-}
View
8 pom.xml
@@ -84,14 +84,6 @@
<outputDirectory>target/testResults/</outputDirectory>
</properties>
- <repositories>
- <repository>
- <name>jets3t</name>
- <id>jets3t</id>
- <url>http://jets3t.s3.amazonaws.com/maven2</url>
- </repository>
- </repositories>
-
<build>
<pluginManagement>
<plugins>
Please sign in to comment.
Something went wrong with that request. Please try again.