-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Rackspace CloudFiles support for ERAttachment
- Loading branch information
Pascal Robert
committed
May 16, 2012
1 parent
386d19e
commit 71f46ad
Showing
34 changed files
with
6,631 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file added
BIN
+45.6 KB
Frameworks/BusinessLogic/ERAttachment/Libraries/commons-codec-1.3.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
138 changes: 138 additions & 0 deletions
138
...s/BusinessLogic/ERAttachment/Resources/ERAttachment.eomodeld/ERCloudFilesAttachment.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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\""; | ||
} |
62 changes: 27 additions & 35 deletions
62
Frameworks/BusinessLogic/ERAttachment/Resources/ERAttachment.eomodeld/index.eomodeld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
); | ||
} |
48 changes: 48 additions & 0 deletions
48
...nessLogic/ERAttachment/Sources/com/rackspacecloud/client/cloudfiles/FilesAccountInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
|
||
} |
29 changes: 29 additions & 0 deletions
29
...RAttachment/Sources/com/rackspacecloud/client/cloudfiles/FilesAuthorizationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
|
||
} |
Oops, something went wrong.