18.7 Using Cadaver as a WebDAV Client

Cadaver is an open-source, command-line, WebDAV client for UNIX. Connect to a WebDAV server with Cadaver by specifying a URL argument after the main Cadaver program name. For Oracle Portal folders, specify the same URL you entered for your portal's Web Folders in the Add Network Place Wizard:

bash$ cadaver portal_network_place_URL

When you want to do something only a privileged user can do, such as add, move, or rename content, Cadaver will prompt you for a user name and password.

After you start Cadaver, you can display a list of available commands by typing help on the command line. Some commands relevant to content management, include:

  • Upload a file [put filename]

  • Download a file [get filename]

  • Upload multiple files at once [mput common*]

    Where common is the part of the filename that all files being uploaded have in common. For example, to upload all files with names that start with hr, such as hr_benefits, hr_policies, hr_forms, the command would be:

    mput hr*
    
  • Download multiple files at once [mget common*], see Bulk upload

  • Create a folder [mkcol new_folder_name]

  • Delete a folder [rmcol folder_name]

  • Rename a file [move filename new_filename]

  • Move a file [move filename folder_name]

  • Copy a file [copy filename new_filename]

  • Delete a file [delete filename]

  • Lock a file [lock filename]

  • Unlock a file [unlock filename]

  • Invoke help [help]

Use Cadaver's file-locking capabilities to secure a file while you work on it. Even if you cannot check an item out in the portal itself (for example, you have only the page privilege Manage Items With Approval on a page), you can still use Cadaver to lock the associated file while you work on it.

Locking is useful for more than preventing the overwrite of an active file. For example, you can use it to reserve a particular file name by locking a non-existent file. When you do this, a file with the specified file name is created and locked. This prevents other users from creating a file with the same name. You must remember, however, to unlock this file when you are ready to let other users work on it.

When you use explicit file locking, you must remember to unlock the file when you are done with it. If a file should be locked and forgotten by another user, you can use the discover filename command to obtain lock information.

Note:

The action of discovering/stealing locks is not supported in Oracle Portal. Lock stealing particularly can lead to errors when users try to open previously locked files. Discover/steal locks at your own risk.

More on the Oracle Technology Network

You'll find additional information on WebDAV, Cadaver, and Oracle Portal in the article "Using WebDAV Clients to Replicate External Content into Oracle Portal," available on the Oracle Technology Network:

http://www.oracle.com/technology/products/ias/portal/content_management_10g1014.html