Skip to content

Commit 932de97

Browse files
author
Cristian Cotes
committed
Initial commit.
1 parent 59f58f9 commit 932de97

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+12691
-0
lines changed

pom.xml

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>java-cloudfiles</groupId>
6+
<artifactId>java-cloudfiles</artifactId>
7+
<version>1.3</version>
8+
<packaging>jar</packaging>
9+
10+
<name>desktop</name>
11+
<url>http://maven.apache.org</url>
12+
13+
<properties>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
</properties>
16+
17+
<repositories>
18+
<repository>
19+
<id>Sonatype repository</id>
20+
<name>Sonatype's Maven repository</name>
21+
<url>http://oss.sonatype.org/content/groups/public</url>
22+
</repository>
23+
<repository>
24+
<id>Sonatype RSO</id>
25+
<name>Sonatype's Forge repository</name>
26+
<url>https://repository.sonatype.org/content/groups/forge</url>
27+
</repository>
28+
29+
<repository>
30+
<id>mvn-public</id>
31+
<name>MVNRepository</name>
32+
<url>http://mvnrepository.com</url>
33+
</repository>
34+
<repository>
35+
<id>ast-server2</id>
36+
<name>ast-server2-releases</name>
37+
<url>http://ast2-deim.urv.cat/artifactory/ast-internal-repository</url>
38+
</repository>
39+
</repositories>
40+
41+
<dependencies>
42+
<dependency>
43+
<groupId>junit</groupId>
44+
<artifactId>junit</artifactId>
45+
<version>4.11</version>
46+
</dependency>
47+
48+
<!-- Apache log4j -->
49+
<dependency>
50+
<groupId>log4j</groupId>
51+
<artifactId>log4j</artifactId>
52+
<version>1.2.16</version>
53+
</dependency>
54+
<dependency>
55+
<groupId>log4j</groupId>
56+
<artifactId>apache-log4j-extras</artifactId>
57+
<version>1.1</version>
58+
</dependency>
59+
60+
<dependency>
61+
<groupId>com.google.code.gson</groupId>
62+
<artifactId>gson</artifactId>
63+
<version>2.2.4</version>
64+
</dependency>
65+
66+
<!-- Apache commons -->
67+
<dependency>
68+
<groupId>commons-cli</groupId>
69+
<artifactId>commons-cli</artifactId>
70+
<version>1.1</version>
71+
</dependency>
72+
<dependency>
73+
<groupId>commons-io</groupId>
74+
<artifactId>commons-io</artifactId>
75+
<version>2.2</version>
76+
</dependency>
77+
<dependency>
78+
<groupId>commons-codec</groupId>
79+
<artifactId>commons-codec</artifactId>
80+
<version>1.7</version>
81+
</dependency>
82+
<dependency>
83+
<groupId>commons-lang</groupId>
84+
<artifactId>commons-lang</artifactId>
85+
<version>2.6</version>
86+
</dependency>
87+
<dependency>
88+
<groupId>commons-logging</groupId>
89+
<artifactId>commons-logging</artifactId>
90+
<version>1.1.3</version>
91+
</dependency>
92+
93+
94+
<dependency>
95+
<groupId>org.apache.httpcomponents</groupId>
96+
<artifactId>httpclient</artifactId>
97+
<version>4.2.5</version>
98+
</dependency>
99+
<dependency>
100+
<groupId>org.apache.httpcomponents</groupId>
101+
<artifactId>httpcore</artifactId>
102+
<version>4.2.4</version>
103+
</dependency>
104+
105+
<!-- Others -->
106+
<dependency>
107+
<groupId>xerces</groupId>
108+
<artifactId>xercesImpl</artifactId>
109+
<version>2.8.1</version>
110+
</dependency>
111+
112+
</dependencies>
113+
114+
<build>
115+
<resources>
116+
<resource>
117+
<directory>src/main/resources</directory>
118+
<filtering>true</filtering>
119+
</resource>
120+
</resources>
121+
<plugins>
122+
<plugin>
123+
<groupId>org.apache.maven.plugins</groupId>
124+
<artifactId>maven-compiler-plugin</artifactId>
125+
<version>3.1</version>
126+
<configuration>
127+
<source>1.6</source>
128+
<target>1.6</target>
129+
</configuration>
130+
</plugin>
131+
<plugin>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
<artifactId>maven-assembly-plugin</artifactId>
134+
<executions>
135+
<execution>
136+
<phase>package</phase>
137+
<goals>
138+
<goal>attached</goal>
139+
</goals>
140+
</execution>
141+
</executions>
142+
<configuration>
143+
<descriptorRefs>
144+
<descriptorRef>jar-with-dependencies</descriptorRef>
145+
</descriptorRefs>
146+
<archive>
147+
<manifest>
148+
<addClasspath>true</addClasspath>
149+
</manifest>
150+
</archive>
151+
</configuration>
152+
</plugin>
153+
<plugin>
154+
<groupId>org.apache.maven.plugins</groupId>
155+
<artifactId>maven-surefire-plugin</artifactId>
156+
<version>2.14.1</version>
157+
<configuration>
158+
<skipTests>true</skipTests>
159+
</configuration>
160+
</plugin>
161+
</plugins>
162+
</build>
163+
</project>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
*
3+
*/
4+
package com.rackspacecloud.client.cloudfiles;
5+
6+
/**
7+
* @author lvaughn
8+
*
9+
*/
10+
public class FilesAccountInfo {
11+
private long bytesUsed;
12+
private int containerCount;
13+
14+
public FilesAccountInfo(long bytes, int containers) {
15+
bytesUsed = bytes;
16+
containerCount = containers;
17+
}
18+
/**
19+
* Returns the total number of bytes used by all objects in a given account.
20+
*
21+
* @return the bytesUsed
22+
*/
23+
public long getBytesUsed() {
24+
return bytesUsed;
25+
}
26+
/**
27+
* @param bytesUsed The number of bytes in the account
28+
*/
29+
public void setBytesUsed(long bytesUsed) {
30+
this.bytesUsed = bytesUsed;
31+
}
32+
/**
33+
* The number of containers in a given account.
34+
*
35+
* @return the containerCount
36+
*/
37+
public int getContainerCount() {
38+
return containerCount;
39+
}
40+
/**
41+
* @param containerCount the containerCount to set
42+
*/
43+
public void setContainerCount(int containerCount) {
44+
this.containerCount = containerCount;
45+
}
46+
47+
48+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* See COPYING for license information.
3+
*/
4+
5+
package com.rackspacecloud.client.cloudfiles;
6+
7+
import org.apache.http.Header;
8+
import org.apache.http.StatusLine;
9+
10+
import com.rackspacecloud.client.cloudfiles.expections.FilesException;
11+
12+
public class FilesAuthorizationException extends FilesException
13+
{
14+
/**
15+
*
16+
*/
17+
private static final long serialVersionUID = -3142674319839157198L;
18+
19+
/**
20+
* An exception generated when a client tries to do something they aren't authorized to do.
21+
*
22+
* @param message The message
23+
* @param httpHeaders The returned HTTP headers
24+
* @param httpStatusLine The HTTP Status lined returned
25+
*/
26+
public FilesAuthorizationException(String message, Header [] httpHeaders, StatusLine httpStatusLine)
27+
{
28+
super (message, httpHeaders, httpStatusLine);
29+
}
30+
31+
}

0 commit comments

Comments
 (0)