return doCopy( src, dest, src.getName() );
}
private Result doCopy( Resource src, Resource dest, String name ) {
if( src instanceof CopyableResource ) {
CopyableResource cr = (CopyableResource) src;
if( dest instanceof CollectionResource ) {
CollectionResource destFolder = (CollectionResource) dest;
try {
cr.copyTo( destFolder, name );
} catch( NotAuthorizedException e ) {
return result( "not authorised" );
} catch( BadRequestException e ) {
return result( "bad request" );
} catch( ConflictException ex ) {