Search in sources :

Example 6 with PropFindMethod

use of org.apache.jackrabbit.webdav.client.methods.PropFindMethod in project lobcder by skoulouzis.

the class Utils method getProperty.

public MultiStatus getProperty(String resource, DavPropertyName propertyName, boolean mustExists) throws IOException, DavException {
    DavPropertyNameSet commentNameSet1 = new DavPropertyNameSet();
    commentNameSet1.add(propertyName);
    PropFindMethod propFind = new PropFindMethod(resource, commentNameSet1, DavConstants.DEPTH_INFINITY);
    int status = client.executeMethod(propFind);
    if (mustExists) {
        assertEquals(HttpStatus.SC_MULTI_STATUS, status);
    }
    return propFind.getResponseBodyAsMultiStatus();
}
Also used : PropFindMethod(org.apache.jackrabbit.webdav.client.methods.PropFindMethod) DavPropertyNameSet(org.apache.jackrabbit.webdav.property.DavPropertyNameSet)

Aggregations

PropFindMethod (org.apache.jackrabbit.webdav.client.methods.PropFindMethod)6 DavPropertySet (org.apache.jackrabbit.webdav.property.DavPropertySet)5 DavPropertyNameSet (org.apache.jackrabbit.webdav.property.DavPropertyNameSet)4 MultiStatusResponse (org.apache.jackrabbit.webdav.MultiStatusResponse)3 IOException (java.io.IOException)2 StringRequestEntity (org.apache.commons.httpclient.methods.StringRequestEntity)2 PutMethod (org.apache.jackrabbit.webdav.client.methods.PutMethod)2 DavPropertyName (org.apache.jackrabbit.webdav.property.DavPropertyName)2 Test (org.junit.Test)2 Collection (java.util.Collection)1 GetMethod (org.apache.commons.httpclient.methods.GetMethod)1 MultiStatus (org.apache.jackrabbit.webdav.MultiStatus)1 DeleteMethod (org.apache.jackrabbit.webdav.client.methods.DeleteMethod)1 DavPropertyIterator (org.apache.jackrabbit.webdav.property.DavPropertyIterator)1 OmCalendar (org.apache.openmeetings.db.entity.calendar.OmCalendar)1 Element (org.w3c.dom.Element)1