org.openanzo.atom.client
Class HttpAtomClient
java.lang.Object
org.openanzo.atom.client.HttpAtomClient
- All Implemented Interfaces:
- AtomClient, AtomClientConstants
public class HttpAtomClient
- extends java.lang.Object
- implements AtomClient, AtomClientConstants
| Fields inherited from interface org.openanzo.atom.client.AtomClientConstants |
CACHE_CONTROL_NO_CACHE, CLIENT_ERROR, CONTENT_ATOM_SERVICE_XML, CONTENT_ATOM_XML, CONTENT_JSON, CONTENT_RDF, HEADER_A_IM, HEADER_ACCEPT, HEADER_ALLOW, HEADER_CACHE_CONTROL, HEADER_CONTENT_TYPE, HEADER_ETAG, HEADER_IF_MATCH, HEADER_IF_MODIFIED_SINCE, HEADER_IF_NONE_MATCH, HEADER_IF_UNMODIFIED_SINCE, 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, LINK_REL_ALTERNATE, 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 |
|
Constructor Summary |
HttpAtomClient(java.lang.String host,
int port,
java.lang.String atomContext)
|
|
Method Summary |
AtomClientResponse<org.apache.abdera.model.Element> |
deleteEntry(java.net.URI entryEditUri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<java.lang.String> |
get(java.net.URI uri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<java.io.InputStream> |
getBinary(java.net.URI uri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
java.net.URI |
getCollectionURL()
|
java.net.URI |
getCollectionURL(java.lang.String colName)
|
java.net.URI |
getContextURL()
|
AtomClientResponse<org.apache.abdera.model.Entry> |
getEntry(java.lang.String entryId,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<org.apache.abdera.model.Entry> |
getEntry(java.net.URI entryEditUri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<org.apache.abdera.model.Feed> |
getFeed(java.net.URI collectionURL,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<org.apache.abdera.model.Service> |
getIntrospectionDoc(java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<java.lang.String> |
post(java.net.URI collectionId,
java.lang.String data,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<org.apache.abdera.model.Entry> |
postBinary(java.net.URI collectionId,
java.io.File input,
java.lang.String mimetype,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<org.apache.abdera.model.Entry> |
postBinary(java.net.URI collectionId,
java.io.InputStream data,
java.lang.String mimetype,
long length,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<org.apache.abdera.model.Entry> |
postBinaryToEndpoint(java.lang.String endpoint,
java.io.File f,
java.lang.String contentType,
java.util.Map<java.lang.String,java.lang.String> properties,
boolean isCreate)
|
AtomClientResponse<org.apache.abdera.model.Entry> |
postEntry(java.net.URI collectionId,
org.apache.abdera.model.Entry entry,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<org.apache.abdera.model.Element> |
purgeEntry(java.net.URI entryEditUri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<org.apache.abdera.model.Entry> |
putBinary(java.net.URI entryEditMediaURI,
java.io.File input,
java.lang.String mimetype,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<org.apache.abdera.model.Entry> |
putBinary(java.net.URI entryEditMediaURI,
java.io.InputStream data,
java.lang.String mimetype,
long length,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<org.apache.abdera.model.Entry> |
putEntry(java.net.URI entryEditUri,
org.apache.abdera.model.Entry entry,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
AtomClientResponse<org.apache.abdera.model.Entry> |
revertEntry(java.net.URI entryEditUri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
void |
setLogin(java.lang.String username,
java.lang.String password)
|
AtomClientResponse<org.apache.abdera.model.Entry> |
undeleteEntry(java.net.URI entryEditUri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpAtomClient
public HttpAtomClient(java.lang.String host,
int port,
java.lang.String atomContext)
throws AtomClientException
- Throws:
AtomClientException
get
public AtomClientResponse<java.lang.String> get(java.net.URI uri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Throws:
AtomClientException
getBinary
public AtomClientResponse<java.io.InputStream> getBinary(java.net.URI uri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Throws:
AtomClientException
post
public AtomClientResponse<java.lang.String> post(java.net.URI collectionId,
java.lang.String data,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Throws:
AtomClientException
postBinary
public AtomClientResponse<org.apache.abdera.model.Entry> postBinary(java.net.URI collectionId,
java.io.File input,
java.lang.String mimetype,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException,
java.io.FileNotFoundException
- Throws:
AtomClientException
java.io.FileNotFoundException
postBinaryToEndpoint
public AtomClientResponse<org.apache.abdera.model.Entry> postBinaryToEndpoint(java.lang.String endpoint,
java.io.File f,
java.lang.String contentType,
java.util.Map<java.lang.String,java.lang.String> properties,
boolean isCreate)
throws AtomClientException
- Throws:
AtomClientException
postBinary
public AtomClientResponse<org.apache.abdera.model.Entry> postBinary(java.net.URI collectionId,
java.io.InputStream data,
java.lang.String mimetype,
long length,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Throws:
AtomClientException
putBinary
public AtomClientResponse<org.apache.abdera.model.Entry> putBinary(java.net.URI entryEditMediaURI,
java.io.File input,
java.lang.String mimetype,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException,
java.io.FileNotFoundException
- Throws:
AtomClientException
java.io.FileNotFoundException
putBinary
public AtomClientResponse<org.apache.abdera.model.Entry> putBinary(java.net.URI entryEditMediaURI,
java.io.InputStream data,
java.lang.String mimetype,
long length,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Throws:
AtomClientException
getEntry
public AtomClientResponse<org.apache.abdera.model.Entry> getEntry(java.lang.String entryId,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Specified by:
getEntry in interface AtomClient
- Throws:
AtomClientException
getEntry
public AtomClientResponse<org.apache.abdera.model.Entry> getEntry(java.net.URI entryEditUri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Specified by:
getEntry in interface AtomClient
- Throws:
AtomClientException
postEntry
public AtomClientResponse<org.apache.abdera.model.Entry> postEntry(java.net.URI collectionId,
org.apache.abdera.model.Entry entry,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Specified by:
postEntry in interface AtomClient
- Throws:
AtomClientException
putEntry
public AtomClientResponse<org.apache.abdera.model.Entry> putEntry(java.net.URI entryEditUri,
org.apache.abdera.model.Entry entry,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Specified by:
putEntry in interface AtomClient
- Throws:
AtomClientException
deleteEntry
public AtomClientResponse<org.apache.abdera.model.Element> deleteEntry(java.net.URI entryEditUri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Specified by:
deleteEntry in interface AtomClient
- Throws:
AtomClientException
undeleteEntry
public AtomClientResponse<org.apache.abdera.model.Entry> undeleteEntry(java.net.URI entryEditUri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Specified by:
undeleteEntry in interface AtomClient
- Throws:
AtomClientException
purgeEntry
public AtomClientResponse<org.apache.abdera.model.Element> purgeEntry(java.net.URI entryEditUri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Specified by:
purgeEntry in interface AtomClient
- Throws:
AtomClientException
revertEntry
public AtomClientResponse<org.apache.abdera.model.Entry> revertEntry(java.net.URI entryEditUri,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Specified by:
revertEntry in interface AtomClient
- Throws:
AtomClientException
getFeed
public AtomClientResponse<org.apache.abdera.model.Feed> getFeed(java.net.URI collectionURL,
java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Specified by:
getFeed in interface AtomClient
- Throws:
AtomClientException
getIntrospectionDoc
public AtomClientResponse<org.apache.abdera.model.Service> getIntrospectionDoc(java.util.Map<java.lang.String,java.lang.String> requestHeaders)
throws AtomClientException
- Specified by:
getIntrospectionDoc in interface AtomClient
- Throws:
AtomClientException
setLogin
public void setLogin(java.lang.String username,
java.lang.String password)
- Specified by:
setLogin in interface AtomClient
getContextURL
public java.net.URI getContextURL()
throws java.net.MalformedURLException,
java.net.URISyntaxException
- Throws:
java.net.MalformedURLException
java.net.URISyntaxException
getCollectionURL
public java.net.URI getCollectionURL(java.lang.String colName)
throws java.net.MalformedURLException,
java.net.URISyntaxException
- Throws:
java.net.MalformedURLException
java.net.URISyntaxException
getCollectionURL
public java.net.URI getCollectionURL()
throws java.net.MalformedURLException,
java.net.URISyntaxException
- Throws:
java.net.MalformedURLException
java.net.URISyntaxException
Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.