org.openanzo.atom.binary
Class SimpleFileSystemStore
java.lang.Object
org.openanzo.atom.binary.SimpleFileSystemStore
- All Implemented Interfaces:
- AtomConstants, AtomBinaryStore
public class SimpleFileSystemStore
- extends java.lang.Object
- implements AtomBinaryStore, AtomConstants
| Fields inherited from interface org.openanzo.atom.AtomConstants |
ANCHOR, ATOM_SERVER_NAME, ATOM_SERVER_VERSION, BINARY_CONTENT_SRC, BINARY_CONTENT_TYPE, BINARY_CONTENT_VERSION, CLIENT_DOJO, COLLECTION_PAGE_SIZE, CONTENT_ATOM_XML, CONTENT_ATOM_XML_UTF8, CONTENT_ATOMSERV_XML, CONTENT_ATOMSERV_XML_UTF8, CONTENT_HTML, CONTENT_JSON, CONTENT_MULTIPART_FORM_DATA, CONTENT_RDF_XML, CONTENT_TEXT, CONTENT_XHTML, CONTENT_XHTML_SHORT, CONTENT_XML, DELIM, EDIT, ENTRY, HEADER_ACCEPT, HEADER_ALLOW, HEADER_CONTENT_LOCATION, HEADER_CONTENT_TYPE, HEADER_ETAG, HEADER_LOCATION, HEADER_TITLE, HISTORY, HTTP_BAD_REQUEST, HTTP_CONFLICT, HTTP_CREATED, HTTP_FORBIDDEN, HTTP_GONE, HTTP_INTERNAL_SERVER_ERROR, HTTP_METHOD_NOT_ALLOWED, HTTP_NOT_AUTHORIZED, HTTP_NOT_FOUND, HTTP_NOT_MODIFIED, HTTP_OK, HTTP_UNSUPPORTED_MEDIA, INVALID_ATOM_ENTRY, INVALID_COLLECTION_URI, LINK_REL_ALTERNATE, LINK_REL_ANCHOR, LINK_REL_COLLECTION, LINK_REL_CONTENT_GRAPH, LINK_REL_EDIT, LINK_REL_EDIT_MEDIA, LINK_REL_FIRST, LINK_REL_HISTORY, LINK_REL_INTROSPECTION, LINK_REL_LAST, LINK_REL_NEXT, LINK_REL_PREVIOUS, LINK_REL_RELATED, LINK_REL_SELF, MEDIA, NS_QUESO, NS_XHTML, PREFIX_QUESO, QUESO_NS, REQUEST_PARAMETER_ACCEPT, REQUEST_PARAMETER_CLIENT, REQUEST_PARAMETER_COLLECTION_URI, SPECIAL_RESOURCE_THISENTRY, SPECIAL_RESOURCE_TIMESTAMP, UNKNOWN_SERVER_ERROR, X_OVERRIDE_HEADER, X_STATUS_HEADER, XSD_ANYURI, XSD_INT, XSD_STRING |
|
Method Summary |
BinaryStoreData |
getBinaryData(java.lang.String entryId,
long revision)
|
static java.lang.String |
getDir(java.lang.String hash)
Given the hash, returns the directory. |
static java.lang.String |
getSHA1(byte[] bytes)
Calculates SHA1 sum, answer returned in hex. |
void |
init(java.util.Properties properties)
|
static java.lang.String |
padSHA1(java.lang.String hash)
Pads a string so get it to 40 chars (160-bit expressed in hex). |
AtomBinaryStore.MultiPartContents |
parseMultiPartContent(javax.servlet.http.HttpServletRequest request)
|
java.util.Map<java.lang.String,java.lang.Object> |
putBinaryData(java.lang.String entryId,
long revision,
AtomBinaryStore.MultiPartContents contents)
|
java.util.Map<java.lang.String,java.lang.Object> |
putBinaryData(java.lang.String entryId,
long revision,
javax.servlet.http.HttpServletRequest request)
|
void |
putBinaryData(java.lang.String entryId,
long revision,
java.io.InputStream in)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_MEMORY_SIZE
public static final int MAX_MEMORY_SIZE
- See Also:
- Constant Field Values
SimpleFileSystemStore
public SimpleFileSystemStore()
init
public void init(java.util.Properties properties)
throws AtomServerException
- Specified by:
init in interface AtomBinaryStore
- Throws:
AtomServerException
getBinaryData
public BinaryStoreData getBinaryData(java.lang.String entryId,
long revision)
throws AtomServerException
- Specified by:
getBinaryData in interface AtomBinaryStore
- Throws:
AtomServerException
putBinaryData
public void putBinaryData(java.lang.String entryId,
long revision,
java.io.InputStream in)
throws AtomServerException
- Specified by:
putBinaryData in interface AtomBinaryStore
- Throws:
AtomServerException
parseMultiPartContent
public AtomBinaryStore.MultiPartContents parseMultiPartContent(javax.servlet.http.HttpServletRequest request)
- Specified by:
parseMultiPartContent in interface AtomBinaryStore
putBinaryData
public java.util.Map<java.lang.String,java.lang.Object> putBinaryData(java.lang.String entryId,
long revision,
javax.servlet.http.HttpServletRequest request)
- Specified by:
putBinaryData in interface AtomBinaryStore
putBinaryData
public java.util.Map<java.lang.String,java.lang.Object> putBinaryData(java.lang.String entryId,
long revision,
AtomBinaryStore.MultiPartContents contents)
throws AtomServerException
- Specified by:
putBinaryData in interface AtomBinaryStore
- Throws:
AtomServerException
padSHA1
public static java.lang.String padSHA1(java.lang.String hash)
- Pads a string so get it to 40 chars (160-bit expressed in hex).
- Parameters:
hash -
- Returns:
getDir
public static java.lang.String getDir(java.lang.String hash)
- Given the hash, returns the directory.
- Parameters:
hash -
- Returns:
getSHA1
public static java.lang.String getSHA1(byte[] bytes)
- Calculates SHA1 sum, answer returned in hex.
- Parameters:
bytes -
- Returns:
Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.