drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/client/AbstractResourceHandle.java
public void copy(ILocator destination, String depth, boolean overwrite, Collection propertyNames) throws DAVException {
        // Define the request context.
        IContext context = newContext();
        context.setDepth(depth);
        context.setOverwrite(overwrite);

        // Set up the request body to specify which properties should be kept alive.
        Document document = newDocument();
        PropertyBehavior propertyBehavior = PropertyBehavior.create(document);

        if (propertyNames == null)
            propertyBehavior.setIsKeepAllAlive(true);
        else {
            Iterator namesItr = propertyNames.iterator();
            while (namesItr.hasNext()) {
                QualifiedName name = (QualifiedName) namesItr.next();
                String nameURI = name.getQualifier() + "/" + name.getLocalName(); //$NON-NLS-1$
                propertyBehavior.addProperty(nameURI);
            } // end-while
        } // end-if

        // Call the server to perform the copy.
        IResponse response = null;
        try {
            response = davClient.copy(locator, destination, context, document);
            examineResponse(response);
            examineMultiStatusResponse(response);
        } catch (IOException e) {
            throw new SystemException(e);
        } finally {
            closeResponse(response);
        }
    }
public void copy(ILocator destination, String depth, boolean overwrite, Collection propertyNames) throws DAVException {
        // Define the request context.
        IContext context = newContext();
        context.setDepth(depth);
        context.setOverwrite(overwrite);

        // Set up the request body to specify which properties should be kept alive.
        Document document = newDocument();
        PropertyBehavior propertyBehavior = PropertyBehavior.create(document);

        if (propertyNames == null)
            propertyBehavior.setIsKeepAllAlive(true);
        else {
            Iterator namesItr = propertyNames.iterator();
            while (namesItr.hasNext()) {
                QualifiedName name = (QualifiedName) namesItr.next();
                String nameURI = name.getQualifier() + "/" + name.getLocalName(); //$NON-NLS-1$
                propertyBehavior.addProperty(nameURI);
            } // end-while
        } // end-if

        // Call the server to perform the copy.
        IResponse response = null;
        try {
            response = davClient.copy(locator, destination, context, document);
            examineResponse(response);
            examineMultiStatusResponse(response);
        } catch (IOException e) {
            throw new SystemException(e);
        } finally {
            closeResponse(response);
        }
    }
public void copy ( ILocator destination , String depth , boolean overwrite , Collection propertyNames ) throws DAVException { // Define the request context. IContext context = newContext ( ) ; context . setDepth ( depth ) ; context . setOverwrite ( overwrite ) ; // Set up the request body to specify which properties should be kept alive. Document document = newDocument ( ) ; PropertyBehavior propertyBehavior = PropertyBehavior . create ( document ) ; if ( propertyNames == null ) propertyBehavior . setIsKeepAllAlive ( true ) ; else { Iterator namesItr = propertyNames . iterator ( ) ; while ( namesItr . hasNext ( ) ) { QualifiedName name = ( QualifiedName ) namesItr . next ( ) ; String nameURI = name . getQualifier ( ) + "/" + name . getLocalName ( ) ; //$NON-NLS-1$ propertyBehavior . addProperty ( nameURI ) ; } // end-while } // end-if // Call the server to perform the copy. IResponse response = null ; try { response = davClient . copy ( locator , destination , context , document ) ; examineResponse ( response ) ; examineMultiStatusResponse ( response ) ; } catch ( IOException e ) { throw new SystemException ( e ) ; } finally { closeResponse ( response ) ; } }
Make a copy of this resource and place it at the location specified
by the given destination locator.

@param destination the location to put the copy.
@param depth how deep to make the copy.
@param overwrite how to react if a resource already exists at the destination.
@param propertyNames <code>Collection</code> of <code>QualifiedName</code>s
of properties that MUST be copied as live properties.  Specifying <code>null</code>
mean that <i>all</i> properties must be kept alive; specifying an empty collection allows for
no properties to be kept live. (ref http://andrew2.andrew.cmu.edu/rfc/rfc2518.html#sec-12.12.1)
@exception DAVException if there was a problem copying this resource.
@see IServer#copy(ILocator, ILocator, IContext, Document)
Make a copy of this resource and place it at the location specified by the given destination locator .