|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.sling.commons.testing.integration.SlingIntegrationTestClient
public class SlingIntegrationTestClient
Client functions to interact with Sling in integration tests
Constructor Summary | |
---|---|
SlingIntegrationTestClient(org.apache.commons.httpclient.HttpClient client)
|
Method Summary | |
---|---|
java.lang.String |
createNode(java.lang.String url,
java.util.Map<java.lang.String,java.lang.String> nodeProperties)
Call the other createNode method with headers==null |
java.lang.String |
createNode(java.lang.String url,
java.util.Map<java.lang.String,java.lang.String> clientNodeProperties,
java.util.Map<java.lang.String,java.lang.String> requestHeaders,
boolean multiPart)
Create a node under given path, using a POST to Sling |
int |
delete(java.lang.String url)
Delete a file from the Sling repository |
void |
mkdir(java.lang.String url)
Create the given directory via WebDAV, if needed, under given URL |
void |
mkdirs(java.lang.String baseUrl,
java.lang.String path)
Create the given directory via WebDAV, including parent directories |
int |
upload(java.lang.String toUrl,
java.io.InputStream is)
Upload a file to the Sling repository |
void |
uploadToFileNode(java.lang.String url,
java.io.File localFile,
java.lang.String fieldName,
java.lang.String typeHint)
Upload to an file node structure, see SLING-168 |
void |
uploadToFileNodes(java.lang.String url,
java.io.File[] localFiles,
java.lang.String[] fieldNames,
java.lang.String[] typeHints)
Upload multiple files to file node structures |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SlingIntegrationTestClient(org.apache.commons.httpclient.HttpClient client)
Method Detail |
---|
public int upload(java.lang.String toUrl, java.io.InputStream is) throws java.io.IOException
java.io.IOException
public int delete(java.lang.String url) throws java.io.IOException
java.io.IOException
public void mkdir(java.lang.String url) throws java.io.IOException
java.io.IOException
public void mkdirs(java.lang.String baseUrl, java.lang.String path) throws java.io.IOException
java.io.IOException
public java.lang.String createNode(java.lang.String url, java.util.Map<java.lang.String,java.lang.String> nodeProperties) throws java.io.IOException
java.io.IOException
public java.lang.String createNode(java.lang.String url, java.util.Map<java.lang.String,java.lang.String> clientNodeProperties, java.util.Map<java.lang.String,java.lang.String> requestHeaders, boolean multiPart) throws java.io.IOException
url
- under which node is createdmultiPart
- if true, does a multipart POST
java.io.IOException
public void uploadToFileNode(java.lang.String url, java.io.File localFile, java.lang.String fieldName, java.lang.String typeHint) throws java.io.IOException
java.io.IOException
public void uploadToFileNodes(java.lang.String url, java.io.File[] localFiles, java.lang.String[] fieldNames, java.lang.String[] typeHints) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |