UpgradingYourApplicationForFedora2.2
From FedoraWiki
This guide is is aimed at developers upgrading their applications to work with Fedora 2.2.
Contents |
WSDL Changes
Fedora's WSDL has changed to use the more conventional "document/literal" style with the "wrapped" convention. If your application generates client stubs directly from WSDL, you will need to regenerate these stubs.
The WSDL for a running Fedora server can now be found at http://localhost:8080/fedora/wsdl It is recommended that you use this WSDL for the generation of client stubs, if needed.
API-M Changes
Two New Methods
String compareDatastreamChecksum(String PID, String datastreamID, String versionDate)
Compares the currently-computed checksum with the stored checksum of the given datastream. Returns the checksum if they match, otherwise throws an exception.
String setDatastreamVersionable(String PID, String datastreamID, boolean versionable, String logMessage)
Sets whether future modifications to a datastream will result in a new version, or will replace the existing version. Returns the server date the operation completed.
Five Changed Methods
String modifyObject(String PID, String state, String label, String ownerId, String logMessage)
NEW PARAMETER: ownerId
String addDatastream(String PID, String dsID, String[] altIDs, String dsLabel, boolean versionable, String MIMEType, String formatURI, String dsLocation, String controlGroup, String dsState, String checksumType, String checksum, String logMessage)
NEW PARAMETER: checksumType (MD5, SHA-1, SHA-256, SHA-384, or SHA-512) NEW PARAMETER: checksum (hex representation)
String modifyDatastreamByReference(String PID, String datastreamID, String[] altIDs, String dsLabel, String mimeType, String formatURI, String dsLocation, String checksumType, String checksum, String logMessage, boolean force)
NEW PARAMETER: checksumType (MD5, SHA-1, SHA-256, SHA-384, or SHA-512) NEW PARAMETER: checksum (hex representation) REMOVED PARAMETER: dsState (use setDatastreamState instead) REMOVED PARAMETER: dsVersionable (use setDatastreamVersionable instead)
String modifyDatastreamByValue(String PID, String datastreamID, String[] altIDs, String dsLabel, String mimeType, String formatURI, byte[] dsContent, String checksumType, String checksum, String logMessage, boolean force)
NEW PARAMETER: checksumType (MD5, SHA-1, SHA-256, SHA-384, or SHA-512) NEW PARAMETER: checksum (hex representation) REMOVED PARAMETER: dsState (use setDatastreamState instead) REMOVED PARAMETER: dsVersionable (use setDatastreamVersionable instead)
String[] purgeDatastream(String PID, String datastreamID, String startDT, String endDT, String logMessage, boolean force)
NEW PARAMETER: startDT (start date of range of versions to purge)
API-A Changes
No methods were added, however, the HTTP upload endpoint (fedora/management/upload) has been extended to support "chunked" encoding, which makes uploading very large datastreams more feasible. Your client can now use this
FedoraClient Changes
If you're using FedoraClient in your application code, note the following changes:
- FedoraClient no longer "takes over" logging. Accordingly, the FORCE_LOG4J_CONFIGURATION field has been deprecated.
- FedoraClient has an upload method that can be used for uploading datastreams to the HTTP upload endpoint.
- FedoraClient's new upload method automatically uses "chunked" encoding, making very large uploads possible.
The following Java libraries also need to be upgraded or added:
- commons-httpclient-2.0 upgraded to commons-httpclient-3.1-beta1
- commons-codec-1.3 added (required by new commons-httpclient)
