drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/client/AbstractResourceHandle.java
public URLTable getProperties(Collection propertyNames, String depth) throws DAVException {
        // Set up the request context.
        IContext context = newContext();
        context.setDepth(depth);

        // Set up the request body.
        Document document = newDocument();
        PropFind propfind = PropFind.create(document);

        // null is a special value meaning 'all properties'.
        if (propertyNames == null)
            propfind.setIsAllProp(true);
        else {
            // Add all the property names to the request body.
            Prop prop = propfind.setProp();
            Iterator namesItr = propertyNames.iterator();
            while (namesItr.hasNext())
                prop.addPropertyName((QualifiedName) namesItr.next());
        }

        // Were ready to make the server call.
        IResponse response = null;
        try {
            // This contacts the server.
            response = davClient.propfind(locator, context, document);
            examineResponse(response);

            // Create a multi-status element editor on the response.
            if (!response.hasDocumentBody())
                throw new DAVException(Policy.bind("exception.respMustShareXMLDoc")); //$NON-NLS-1$
            Element documentElement = response.getDocumentBody().getDocumentElement();
            if (documentElement == null)
                throw new DAVException(Policy.bind("exception.respHasInvalidDoc")); //$NON-NLS-1$
            MultiStatus multiStatus = new MultiStatus(documentElement);

            // Construct a URLTable of results to return to the user.
            return extractPropStats(multiStatus);

        } catch (IOException e) {
            throw new SystemException(e);
        } catch (MalformedElementException e) {
            throw new SystemException(e);
        } finally {
            closeResponse(response);
        }
    }
public URLTable getProperties(Collection propertyNames, String depth) throws DAVException {
        // Set up the request context.
        IContext context = newContext();
        context.setDepth(depth);

        // Set up the request body.
        Document document = newDocument();
        PropFind propfind = PropFind.create(document);

        // null is a special value meaning 'all properties'.
        if (propertyNames == null)
            propfind.setIsAllProp(true);
        else {
            // Add all the property names to the request body.
            Prop prop = propfind.setProp();
            Iterator namesItr = propertyNames.iterator();
            while (namesItr.hasNext())
                prop.addPropertyName((QualifiedName) namesItr.next());
        }

        // Were ready to make the server call.
        IResponse response = null;
        try {
            // This contacts the server.
            response = davClient.propfind(locator, context, document);
            examineResponse(response);

            // Create a multi-status element editor on the response.
            if (!response.hasDocumentBody())
                throw new DAVException(Policy.bind("exception.respMustShareXMLDoc")); //$NON-NLS-1$
            Element documentElement = response.getDocumentBody().getDocumentElement();
            if (documentElement == null)
                throw new DAVException(Policy.bind("exception.respHasInvalidDoc")); //$NON-NLS-1$
            MultiStatus multiStatus = new MultiStatus(documentElement);

            // Construct a URLTable of results to return to the user.
            return extractPropStats(multiStatus);

        } catch (IOException e) {
            throw new SystemException(e);
        } catch (MalformedElementException e) {
            throw new SystemException(e);
        } finally {
            closeResponse(response);
        }
    }
public URLTable getProperties ( Collection propertyNames , String depth ) throws DAVException { // Set up the request context. IContext context = newContext ( ) ; context . setDepth ( depth ) ; // Set up the request body. Document document = newDocument ( ) ; PropFind propfind = PropFind . create ( document ) ; // null is a special value meaning 'all properties'. if ( propertyNames == null ) propfind . setIsAllProp ( true ) ; else { // Add all the property names to the request body. Prop prop = propfind . setProp ( ) ; Iterator namesItr = propertyNames . iterator ( ) ; while ( namesItr . hasNext ( ) ) prop . addPropertyName ( ( QualifiedName ) namesItr . next ( ) ) ; } // Were ready to make the server call. IResponse response = null ; try { // This contacts the server. response = davClient . propfind ( locator , context , document ) ; examineResponse ( response ) ; // Create a multi-status element editor on the response. if ( ! response . hasDocumentBody ( ) ) throw new DAVException ( Policy . bind ( "exception.respMustShareXMLDoc" ) ) ; //$NON-NLS-1$ Element documentElement = response . getDocumentBody ( ) . getDocumentElement ( ) ; if ( documentElement == null ) throw new DAVException ( Policy . bind ( "exception.respHasInvalidDoc" ) ) ; //$NON-NLS-1$ MultiStatus multiStatus = new MultiStatus ( documentElement ) ; // Construct a URLTable of results to return to the user. return extractPropStats ( multiStatus ) ; } catch ( IOException e ) { throw new SystemException ( e ) ; } catch ( MalformedElementException e ) { throw new SystemException ( e ) ; } finally { closeResponse ( response ) ; } }
Fetches and returns the specified properties for this resource and its
children to the given depth. The returned table is a URLTable of
hashtables. The keys in the first table are the <code>URL</code>s of
the resources. The nested table is a table where the keys are the names
(<code>QualifiedName</code>) of the properties and the values are the
properties' values (<code>PropertyStatus</code>).

@param propertyNames collection of property names to search for
(<code>QualifiedName</code>), or <code>null</code> to retrieve
all properties.
@param depth the depth of the search (eg. <code>Context.DEPTH_INFINITY</code>)
@return URLTable of hashtables keyed by resource <code>URLKey</code>
then by property name.
@exception DAVException if there was a problem fetching the properties.
@see IServer#propfind(Locator, Context, Document)
Fetches and returns the specified properties for this resource and its children to the given depth . The returned table is a URLTable of hashtables . The keys in the first table are the <code > URL< / code > s of the resources . The nested table is a table where the keys are the names ( <code > QualifiedName< / code > ) of the properties and the values are the properties values ( <code > PropertyStatus< / code > ) .