eXo JCR :: Cluster :: Test Client 1.15.14-CP01

org.exoplatform.services.jcr.cluster
Class JCRWebdavConnection

java.lang.Object
  extended by org.exoplatform.common.http.client.HTTPConnection
      extended by org.exoplatform.services.jcr.cluster.JCRWebdavConnection
All Implemented Interfaces:
org.exoplatform.common.http.client.HTTPClientModuleConstants

public class JCRWebdavConnection
extends org.exoplatform.common.http.client.HTTPConnection

Created by The eXo Platform SAS.
Date: 2009

Version:
$Id$
Author:
Alex Reshetnyak

Field Summary
static int CD_0
           
static int CD_CHUNKED
           
static int CD_CLOSE
           
static int CD_CONTLEN
           
static int CD_HDRS
           
static int CD_MP_BR
           
static int CD_NONE
           
static int HTTP
           
static int HTTP_1_0
           
static int HTTP_1_1
           
static int HTTP_NG
           
static int HTTPS
           
static int SHTTP
           
 
Fields inherited from class org.exoplatform.common.http.client.HTTPConnection
version
 
Fields inherited from interface org.exoplatform.common.http.client.HTTPClientModuleConstants
REQ_CONTINUE, REQ_NEWCON_RST, REQ_NEWCON_SND, REQ_RESPONSE, REQ_RESTART, REQ_RETURN, REQ_SHORTCIRC, RSP_CONTINUE, RSP_NEWCON_REQ, RSP_NEWCON_SND, RSP_REQUEST, RSP_RESTART, RSP_SEND, RSP_SHORTCIRC
 
Constructor Summary
JCRWebdavConnection(String host, int port, String user, String password, String realm, String workspacePath)
           
 
Method Summary
 org.exoplatform.common.http.client.HTTPResponse addDir(String path)
          Return true if create successfully
 org.exoplatform.common.http.client.HTTPResponse addNode(String name, byte[] data)
           
 org.exoplatform.common.http.client.HTTPResponse addNode(String name, byte[] data, String mimeType)
          Adds node (nt:file) with given mimetype.
 org.exoplatform.common.http.client.HTTPResponse addNode(String name, org.exoplatform.common.http.client.HttpOutputStream stream)
           
 org.exoplatform.common.http.client.HTTPResponse addNode(String name, org.exoplatform.common.http.client.HttpOutputStream stream, String mimeType)
           
 org.exoplatform.common.http.client.HTTPResponse addNode(String name, String[] mixinTypes, byte[] data)
          Adds node with given mixin types.
 void addNode(String name, String nodeType, byte[] data)
           
 org.exoplatform.common.http.client.HTTPResponse addProperty(String nodeName, String property)
           
 void addVersionControl(String nodeName)
           
 void checkIn(String nodeName)
           
 void checkOut(String nodeName)
           
 org.exoplatform.common.http.client.HTTPResponse getNode(String name)
           
 org.exoplatform.common.http.client.HTTPResponse getProperty(String nodeName, String property)
           
 String lock(String nodeName)
           
 org.exoplatform.common.http.client.HTTPResponse moveNode(String path, String destination)
           
 org.exoplatform.common.http.client.HTTPResponse removeNode(String name)
           
 org.exoplatform.common.http.client.HTTPResponse removeProperty(String nodeName, String property)
           
 org.exoplatform.common.http.client.HTTPResponse restore(String node, String version)
           
 org.exoplatform.common.http.client.HTTPResponse setProperty(String nodeName, String property, String value)
           
 org.exoplatform.common.http.client.HTTPResponse sqlQuery(String query)
          Performs SQL query on workspace and returns plain HTTPResponse.
 void unlock(String nodeName, String lockToken)
           
 org.exoplatform.common.http.client.HTTPResponse xpathQuery(String query)
          Performs XPath query on workspace and returns plain HTTPResponse.
 
Methods inherited from class org.exoplatform.common.http.client.HTTPConnection
addBasicAuthorization, addDefaultModule, addDigestAuthorization, addModule, Copy, Copy, Delete, Delete, dontProxyFor, dontProxyFor, doProxyFor, ExtensionMethod, ExtensionMethod, Get, Get, Get, Get, Get, getAllowUserInteraction, getContext, getDefaultAllowUserInteraction, getDefaultContext, getDefaultHeaders, getDefaultModules, getDefaultTimeout, getHost, getModules, getPort, getProtocol, getProxyHost, getProxyPort, getTimeout, Head, Head, Head, Head, Head, isCompatibleWith, Lock, Lock, MkCol, Move, Move, Options, Options, Options, Options, Post, Post, Post, Post, Post, Post, Post, Post, Post, Propfind, Propfind, PropfindAllprop, PropfindAllprop, PropfindPropname, PropfindPropname, Proppath, Put, Put, Put, Put, Put, Put, removeDefaultModule, removeModule, setAllowUserInteraction, setContext, setCurrentProxy, setDefaultAllowUserInteraction, setDefaultHeaders, setDefaultTimeout, setProxyServer, setRawMode, setSocksServer, setSocksServer, setSocksServer, setTimeout, setupRequest, stop, toString, Trace, Trace, Unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HTTP

public static final int HTTP
See Also:
Constant Field Values

HTTPS

public static final int HTTPS
See Also:
Constant Field Values

SHTTP

public static final int SHTTP
See Also:
Constant Field Values

HTTP_NG

public static final int HTTP_NG
See Also:
Constant Field Values

HTTP_1_0

public static final int HTTP_1_0
See Also:
Constant Field Values

HTTP_1_1

public static final int HTTP_1_1
See Also:
Constant Field Values

CD_NONE

public static final int CD_NONE
See Also:
Constant Field Values

CD_HDRS

public static final int CD_HDRS
See Also:
Constant Field Values

CD_0

public static final int CD_0
See Also:
Constant Field Values

CD_CLOSE

public static final int CD_CLOSE
See Also:
Constant Field Values

CD_CONTLEN

public static final int CD_CONTLEN
See Also:
Constant Field Values

CD_CHUNKED

public static final int CD_CHUNKED
See Also:
Constant Field Values

CD_MP_BR

public static final int CD_MP_BR
See Also:
Constant Field Values
Constructor Detail

JCRWebdavConnection

public JCRWebdavConnection(String host,
                           int port,
                           String user,
                           String password,
                           String realm,
                           String workspacePath)
Method Detail

addNode

public org.exoplatform.common.http.client.HTTPResponse addNode(String name,
                                                               byte[] data)
                                                        throws IOException,
                                                               org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

addNode

public void addNode(String name,
                    String nodeType,
                    byte[] data)
             throws IOException,
                    org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

addNode

public org.exoplatform.common.http.client.HTTPResponse addNode(String name,
                                                               String[] mixinTypes,
                                                               byte[] data)
                                                        throws IOException,
                                                               org.exoplatform.common.http.client.ModuleException
Adds node with given mixin types.

Parameters:
name -
nodeType -
mixinTypes -
data -
Returns:
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

addNode

public org.exoplatform.common.http.client.HTTPResponse addNode(String name,
                                                               byte[] data,
                                                               String mimeType)
                                                        throws IOException,
                                                               org.exoplatform.common.http.client.ModuleException
Adds node (nt:file) with given mimetype.

Parameters:
name -
data -
mimeType -
Returns:
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

addNode

public org.exoplatform.common.http.client.HTTPResponse addNode(String name,
                                                               org.exoplatform.common.http.client.HttpOutputStream stream)
                                                        throws IOException,
                                                               org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

addNode

public org.exoplatform.common.http.client.HTTPResponse addNode(String name,
                                                               org.exoplatform.common.http.client.HttpOutputStream stream,
                                                               String mimeType)
                                                        throws IOException,
                                                               org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

removeNode

public org.exoplatform.common.http.client.HTTPResponse removeNode(String name)
                                                           throws IOException,
                                                                  org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

getNode

public org.exoplatform.common.http.client.HTTPResponse getNode(String name)
                                                        throws IOException,
                                                               org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

addProperty

public org.exoplatform.common.http.client.HTTPResponse addProperty(String nodeName,
                                                                   String property)
                                                            throws IOException,
                                                                   org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

setProperty

public org.exoplatform.common.http.client.HTTPResponse setProperty(String nodeName,
                                                                   String property,
                                                                   String value)
                                                            throws IOException,
                                                                   org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

getProperty

public org.exoplatform.common.http.client.HTTPResponse getProperty(String nodeName,
                                                                   String property)
                                                            throws IOException,
                                                                   org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

removeProperty

public org.exoplatform.common.http.client.HTTPResponse removeProperty(String nodeName,
                                                                      String property)
                                                               throws IOException,
                                                                      org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

lock

public String lock(String nodeName)
            throws IOException,
                   org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

unlock

public void unlock(String nodeName,
                   String lockToken)
            throws IOException,
                   org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

addVersionControl

public void addVersionControl(String nodeName)
                       throws IOException,
                              org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

checkIn

public void checkIn(String nodeName)
             throws IOException,
                    org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

checkOut

public void checkOut(String nodeName)
              throws IOException,
                     org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

addDir

public org.exoplatform.common.http.client.HTTPResponse addDir(String path)
                                                       throws IOException,
                                                              org.exoplatform.common.http.client.ModuleException
Return true if create successfully

Parameters:
path -
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

restore

public org.exoplatform.common.http.client.HTTPResponse restore(String node,
                                                               String version)
                                                        throws IOException,
                                                               org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

moveNode

public org.exoplatform.common.http.client.HTTPResponse moveNode(String path,
                                                                String destination)
                                                         throws IOException,
                                                                org.exoplatform.common.http.client.ModuleException
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

xpathQuery

public org.exoplatform.common.http.client.HTTPResponse xpathQuery(String query)
                                                           throws IOException,
                                                                  org.exoplatform.common.http.client.ModuleException
Performs XPath query on workspace and returns plain HTTPResponse. It should be returned with status 207 and must contain the XML with node collection.

Parameters:
query -
Returns:
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

sqlQuery

public org.exoplatform.common.http.client.HTTPResponse sqlQuery(String query)
                                                         throws IOException,
                                                                org.exoplatform.common.http.client.ModuleException
Performs SQL query on workspace and returns plain HTTPResponse. It should be returned with status 207 and must contain the XML with node collection.

Parameters:
query -
Returns:
Throws:
IOException
org.exoplatform.common.http.client.ModuleException

eXo JCR :: Cluster :: Test Client 1.15.14-CP01

Copyright © 2015 eXo Platform SAS. All Rights Reserved.