org.openxdm.xcap.client
Interface XCAPClient

All Known Implementing Classes:
XCAPClientImpl

public interface XCAPClient


Method Summary
 Response delete(org.openxdm.xcap.common.key.XcapUriKey key, java.util.List<RequestHeader> additionalRequestHeaders)
          Deletes the content related the specified XCAP URI key.
 Response deleteIfMatch(org.openxdm.xcap.common.key.XcapUriKey key, java.lang.String eTag, java.util.List<RequestHeader> additionalRequestHeaders)
          Deletes the content related the specified XCAP URI key, if the specified ETag matches the current one on the server.
 Response deleteIfNoneMatch(org.openxdm.xcap.common.key.XcapUriKey key, java.lang.String eTag, java.util.List<RequestHeader> additionalRequestHeaders)
          Deletes the content related the specified XCAP URI key, if the specified ETag does not matches the current one on the server.
 Response get(org.openxdm.xcap.common.key.XcapUriKey key, java.util.List<RequestHeader> additionalRequestHeaders)
          Retrieves the XML resource from the XCAP server, for the specified key.
 boolean getDoAuthentication()
          Indicates if the client is set to do authentication on server.
 Response put(org.openxdm.xcap.common.key.XcapUriKey key, java.lang.String mimetype, byte[] content, java.util.List<RequestHeader> additionalRequestHeaders)
          Puts the specified content in the XCAP Server, in the XCAP URI pointed by the key.
 Response put(org.openxdm.xcap.common.key.XcapUriKey key, java.lang.String mimetype, java.lang.String content, java.util.List<RequestHeader> additionalRequestHeaders)
          Puts the specified content in the XCAP Server, in the XCAP URI pointed by the key.
 Response putIfMatch(org.openxdm.xcap.common.key.XcapUriKey key, java.lang.String eTag, java.lang.String mimetype, byte[] content, java.util.List<RequestHeader> additionalRequestHeaders)
          Puts the specified content in the XCAP Server, in the XCAP URI pointed by the key, if the specified ETag matches the current one on the server.
 Response putIfMatch(org.openxdm.xcap.common.key.XcapUriKey key, java.lang.String eTag, java.lang.String mimetype, java.lang.String content, java.util.List<RequestHeader> additionalRequestHeaders)
          Puts the specified content in the XCAP Server, in the XCAP URI pointed by the key, if the specified ETag matches the current one on the server.
 Response putIfNoneMatch(org.openxdm.xcap.common.key.XcapUriKey key, java.lang.String eTag, java.lang.String mimetype, byte[] content, java.util.List<RequestHeader> additionalRequestHeaders)
          Puts the specified content in the XCAP Server, in the XCAP URI pointed by the key, if the specified ETag does not matches the current one on the server.
 Response putIfNoneMatch(org.openxdm.xcap.common.key.XcapUriKey key, java.lang.String eTag, java.lang.String mimetype, java.lang.String content, java.util.List<RequestHeader> additionalRequestHeaders)
          Puts the specified content in the XCAP Server, in the XCAP URI pointed by the key, if the specified ETag does not matches the current one on the server.
 void setAuthenticationCredentials(java.lang.String userName, java.lang.String password)
          Sets the username and passowrd for authentication in the server.
 void setDoAuthentication(boolean value)
          Turns on or off the request authentication.
 void shutdown()
          Shutdown the client.
 

Method Detail

setAuthenticationCredentials

void setAuthenticationCredentials(java.lang.String userName,
                                  java.lang.String password)
Sets the username and passowrd for authentication in the server.

Parameters:
userName -
password -

setDoAuthentication

void setDoAuthentication(boolean value)
Turns on or off the request authentication.

Parameters:
value -

getDoAuthentication

boolean getDoAuthentication()
Indicates if the client is set to do authentication on server.

Returns:

shutdown

void shutdown()
Shutdown the client.


get

Response get(org.openxdm.xcap.common.key.XcapUriKey key,
             java.util.List<RequestHeader> additionalRequestHeaders)
             throws org.apache.commons.httpclient.HttpException,
                    java.io.IOException
Retrieves the XML resource from the XCAP server, for the specified key.

Parameters:
key -
additionalRequestHeaders - a list containing RequestHeaders to add in the XCAP request
Returns:
Throws:
org.apache.commons.httpclient.HttpException
java.io.IOException

put

Response put(org.openxdm.xcap.common.key.XcapUriKey key,
             java.lang.String mimetype,
             java.lang.String content,
             java.util.List<RequestHeader> additionalRequestHeaders)
             throws org.apache.commons.httpclient.HttpException,
                    java.io.IOException
Puts the specified content in the XCAP Server, in the XCAP URI pointed by the key.

Parameters:
key -
mimetype - the mimetype of the content to put, for document each XCAP App Usage defines their own mimetype, but for elements and attributes you can use ElementResource and AttributeResource static MIMETYPE fields.
content -
additionalRequestHeaders - a list containing RequestHeaders to add in the XCAP request
Returns:
Throws:
org.apache.commons.httpclient.HttpException
java.io.IOException

put

Response put(org.openxdm.xcap.common.key.XcapUriKey key,
             java.lang.String mimetype,
             byte[] content,
             java.util.List<RequestHeader> additionalRequestHeaders)
             throws org.apache.commons.httpclient.HttpException,
                    java.io.IOException
Puts the specified content in the XCAP Server, in the XCAP URI pointed by the key.

Parameters:
key -
mimetype - the mimetype of the content to put, for document each XCAP App Usage defines their own mimetype, but for elements and attributes you can use ElementResource and AttributeResource static MIMETYPE fields.
content -
additionalRequestHeaders - a list containing RequestHeaders to add in the XCAP request
Returns:
Throws:
org.apache.commons.httpclient.HttpException
java.io.IOException

putIfMatch

Response putIfMatch(org.openxdm.xcap.common.key.XcapUriKey key,
                    java.lang.String eTag,
                    java.lang.String mimetype,
                    java.lang.String content,
                    java.util.List<RequestHeader> additionalRequestHeaders)
                    throws org.apache.commons.httpclient.HttpException,
                           java.io.IOException
Puts the specified content in the XCAP Server, in the XCAP URI pointed by the key, if the specified ETag matches the current one on the server.

Parameters:
key -
eTag -
mimetype - the mimetype of the content to put, for document each XCAP App Usage defines their own mimetype, but for elements and attributes you can use ElementResource and AttributeResource static MIMETYPE fields.
content -
additionalRequestHeaders - a list containing RequestHeaders to add in the XCAP request
Returns:
Throws:
org.apache.commons.httpclient.HttpException
java.io.IOException

putIfMatch

Response putIfMatch(org.openxdm.xcap.common.key.XcapUriKey key,
                    java.lang.String eTag,
                    java.lang.String mimetype,
                    byte[] content,
                    java.util.List<RequestHeader> additionalRequestHeaders)
                    throws org.apache.commons.httpclient.HttpException,
                           java.io.IOException
Puts the specified content in the XCAP Server, in the XCAP URI pointed by the key, if the specified ETag matches the current one on the server.

Parameters:
key -
eTag -
mimetype - the mimetype of the content to put, for document each XCAP App Usage defines their own mimetype, but for elements and attributes you can use ElementResource and AttributeResource static MIMETYPE fields.
content -
additionalRequestHeaders - a list containing RequestHeaders to add in the XCAP request
Returns:
Throws:
org.apache.commons.httpclient.HttpException
java.io.IOException

putIfNoneMatch

Response putIfNoneMatch(org.openxdm.xcap.common.key.XcapUriKey key,
                        java.lang.String eTag,
                        java.lang.String mimetype,
                        java.lang.String content,
                        java.util.List<RequestHeader> additionalRequestHeaders)
                        throws org.apache.commons.httpclient.HttpException,
                               java.io.IOException
Puts the specified content in the XCAP Server, in the XCAP URI pointed by the key, if the specified ETag does not matches the current one on the server.

Parameters:
key -
eTag -
mimetype - the mimetype of the content to put, for document each XCAP App Usage defines their own mimetype, but for elements and attributes you can use ElementResource and AttributeResource static MIMETYPE fields.
content -
additionalRequestHeaders - a list containing RequestHeaders to add in the XCAP request
Returns:
Throws:
org.apache.commons.httpclient.HttpException
java.io.IOException

putIfNoneMatch

Response putIfNoneMatch(org.openxdm.xcap.common.key.XcapUriKey key,
                        java.lang.String eTag,
                        java.lang.String mimetype,
                        byte[] content,
                        java.util.List<RequestHeader> additionalRequestHeaders)
                        throws org.apache.commons.httpclient.HttpException,
                               java.io.IOException
Puts the specified content in the XCAP Server, in the XCAP URI pointed by the key, if the specified ETag does not matches the current one on the server.

Parameters:
key -
eTag -
mimetype - the mimetype of the content to put, for document each XCAP App Usage defines their own mimetype, but for elements and attributes you can use ElementResource and AttributeResource static MIMETYPE fields.
content -
additionalRequestHeaders - a list containing RequestHeaders to add in the XCAP request
Returns:
Throws:
org.apache.commons.httpclient.HttpException
java.io.IOException

delete

Response delete(org.openxdm.xcap.common.key.XcapUriKey key,
                java.util.List<RequestHeader> additionalRequestHeaders)
                throws org.apache.commons.httpclient.HttpException,
                       java.io.IOException
Deletes the content related the specified XCAP URI key.

Parameters:
key -
additionalRequestHeaders - a list containing RequestHeaders to add in the XCAP request
Returns:
Throws:
org.apache.commons.httpclient.HttpException
java.io.IOException

deleteIfMatch

Response deleteIfMatch(org.openxdm.xcap.common.key.XcapUriKey key,
                       java.lang.String eTag,
                       java.util.List<RequestHeader> additionalRequestHeaders)
                       throws org.apache.commons.httpclient.HttpException,
                              java.io.IOException
Deletes the content related the specified XCAP URI key, if the specified ETag matches the current one on the server.

Parameters:
key -
eTag -
additionalRequestHeaders - a list containing RequestHeaders to add in the XCAP request
Returns:
Throws:
org.apache.commons.httpclient.HttpException
java.io.IOException

deleteIfNoneMatch

Response deleteIfNoneMatch(org.openxdm.xcap.common.key.XcapUriKey key,
                           java.lang.String eTag,
                           java.util.List<RequestHeader> additionalRequestHeaders)
                           throws org.apache.commons.httpclient.HttpException,
                                  java.io.IOException
Deletes the content related the specified XCAP URI key, if the specified ETag does not matches the current one on the server.

Parameters:
key -
eTag -
additionalRequestHeaders - a list containing RequestHeaders to add in the XCAP request
Returns:
Throws:
org.apache.commons.httpclient.HttpException
java.io.IOException


Copyright © 2009. All Rights Reserved.