Skip to content

Commit

Permalink
Added Rackspace CloudFiles support for ERAttachment
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Robert committed May 16, 2012
1 parent 386d19e commit 71f46ad
Show file tree
Hide file tree
Showing 34 changed files with 6,631 additions and 37 deletions.
5 changes: 5 additions & 0 deletions Frameworks/BusinessLogic/ERAttachment/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
<classpathentry kind="src" path="Sources"/>
<classpathentry kind="src" path="Tests"/>
<classpathentry exported="true" kind="lib" path="Libraries/metadata-extractor-2.3.1.jar"/>
<classpathentry kind="lib" path="Libraries/httpclient-4.1.3.jar"/>
<classpathentry kind="lib" path="Libraries/httpcore-4.1.4.jar"/>
<classpathentry kind="lib" path="Libraries/commons-cli-1.1.jar"/>
<classpathentry kind="lib" path="Libraries/commons-codec-1.3.jar"/>
<classpathentry kind="lib" path="Libraries/commons-io-1.4.jar"/>
<classpathentry exported="true" kind="con" path="WOFramework/ERExtensions"/>
<classpathentry exported="true" kind="con" path="WOFramework/ERJars"/>
<classpathentry exported="true" kind="con" path="WOFramework/ERPrototypes"/>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
{
attributes = (
{
allowsNull = N;
columnName = available;
name = available;
prototypeName = boolean;
},
{
allowsNull = Y;
columnName = cfPath;
name = cfPath;
prototypeName = varchar1000;
},
{
allowsNull = Y;
columnName = configurationName;
name = configurationName;
prototypeName = varchar100;
},
{
allowsNull = N;
columnName = creationDate;
name = creationDate;
prototypeName = dateTime;
},
{
allowsNull = Y;
columnName = height;
name = height;
prototypeName = intNumber;
},
{allowsNull = N; name = id; prototypeName = id; },
{
allowsNull = N;
columnName = mimeType;
name = mimeType;
prototypeName = varchar100;
},
{
allowsNull = N;
columnName = originalFileName;
name = originalFileName;
prototypeName = varchar255;
},
{
allowsNull = Y;
columnName = ownerID;
name = ownerID;
prototypeName = varchar16;
},
{allowsNull = Y; columnName = parentID; name = parentID; prototypeName = id; },
{
allowsNull = N;
columnName = proxied;
name = proxied;
prototypeName = boolean;
},
{allowsNull = N; columnName = size; name = size; prototypeName = intNumber; },
{
allowsNull = Y;
columnName = storageType;
name = storageType;
prototypeName = varchar10;
},
{
allowsNull = Y;
columnName = thumbnail;
name = thumbnail;
prototypeName = varchar10;
},
{
allowsNull = N;
columnName = webPath;
name = webPath;
prototypeName = varchar1000;
},
{allowsNull = Y; columnName = width; name = width; prototypeName = intNumber; }
);
attributesUsedForLocking = (
available,
cfPath,
configurationName,
height,
id,
mimeType,
originalFileName,
ownerID,
parentID,
proxied,
size,
storageType,
thumbnail,
webPath,
width
);
className = "er.attachment.model.ERCloudFilesAttachment";
classProperties = (
available,
cfPath,
childrenAttachments,
configurationName,
creationDate,
height,
mimeType,
originalFileName,
ownerID,
parentAttachment,
proxied,
size,
storageType,
thumbnail,
webPath,
width
);
externalName = ERAttachment;
fetchSpecificationDictionary = {};
name = ERCloudFilesAttachment;
parent = ERAttachment;
primaryKeyAttributes = (id);
relationships = (
{
deleteRule = EODeleteRuleCascade;
destination = ERAttachment;
isToMany = Y;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = parentID; sourceAttribute = id; });
name = childrenAttachments;
},
{
destination = ERAttachment;
joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = parentID; });
name = parentAttachment;
}
);
restrictingQualifier = "storageType = \"cf\"";
}
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@

{
EOModelVersion = 2.1;
adaptorName = JDBC;
entities =
(

{
className = er.attachment.model.ERAttachment;
name = ERAttachment;
},

{
className = er.attachment.model.ERAttachmentData;
name = ERAttachmentData;
},

{
className = er.attachment.model.ERDatabaseAttachment;
name = ERDatabaseAttachment;
parent = ERAttachment;
},

{
className = er.attachment.model.ERFileAttachment;
name = ERFileAttachment;
parent = ERAttachment;
},

{
className = er.attachment.model.ERS3Attachment;
name = ERS3Attachment;
parent = ERAttachment;
}
);
}
EOModelVersion = "2.1";
adaptorName = JDBC;
entities = (
{className = "er.attachment.model.ERAttachment"; name = ERAttachment; },
{className = "er.attachment.model.ERAttachmentData"; name = ERAttachmentData; },
{
className = "er.attachment.model.ERCloudFilesAttachment";
name = ERCloudFilesAttachment;
parent = ERAttachment;
},
{
className = "er.attachment.model.ERDatabaseAttachment";
name = ERDatabaseAttachment;
parent = ERAttachment;
},
{
className = "er.attachment.model.ERFileAttachment";
name = ERFileAttachment;
parent = ERAttachment;
},
{
className = "er.attachment.model.ERS3Attachment";
name = ERS3Attachment;
parent = ERAttachment;
}
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
*
*/
package com.rackspacecloud.client.cloudfiles;

/**
* @author lvaughn
*
*/
public class FilesAccountInfo {
private long bytesUsed;
private int containerCount;

public FilesAccountInfo(long bytes, int containers) {
bytesUsed = bytes;
containerCount = containers;
}
/**
* Returns the total number of bytes used by all objects in a given account.
*
* @return the bytesUsed
*/
public long getBytesUsed() {
return bytesUsed;
}
/**
* @param bytesUsed The number of bytes in the account
*/
public void setBytesUsed(long bytesUsed) {
this.bytesUsed = bytesUsed;
}
/**
* The number of containers in a given account.
*
* @return the containerCount
*/
public int getContainerCount() {
return containerCount;
}
/**
* @param containerCount the containerCount to set
*/
public void setContainerCount(int containerCount) {
this.containerCount = containerCount;
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* See COPYING for license information.
*/

package com.rackspacecloud.client.cloudfiles;

import org.apache.http.Header;
import org.apache.http.StatusLine;

public class FilesAuthorizationException extends FilesException
{
/**
*
*/
private static final long serialVersionUID = -3142674319839157198L;

/**
* An exception generated when a client tries to do something they aren't authorized to do.
*
* @param message The message
* @param httpHeaders The returned HTTP headers
* @param httpStatusLine The HTTP Status lined returned
*/
public FilesAuthorizationException(String message, Header [] httpHeaders, StatusLine httpStatusLine)
{
super (message, httpHeaders, httpStatusLine);
}

}
Loading

0 comments on commit 71f46ad

Please sign in to comment.