Browse Source

Added set_datastream_state function.

pull/14/head
Nigel Banks 13 years ago
parent
commit
4260762fc0
  1. 16
      api/fedora_item.inc

16
api/fedora_item.inc

@ -1,11 +1,9 @@
<?php
/**
* @file
*
*/
/**
* @file
* Fedora Item
@ -800,6 +798,19 @@ class Fedora_Item {
return self::soap_call('modifyDatastreamByValue', $params, $quiet);
}
function set_datastream_state($dsid, $state, $log_message = 'Modified by Islandora API', $quiet = FALSE) {
$valid_states = array('A', 'D', 'I');
if (key_exists($state, $valid_states)) {
$params = array(
'pid' => $this->pid,
'dsID' => $dsid,
'dsState' => $state,
'logMessage' => $log_message,
);
return self::soap_call('setDatastreamState', $params, $quiet);
}
}
/**
* Soap call
* @param type $function_name
@ -826,6 +837,7 @@ class Fedora_Item {
case 'purgeDatastream':
case 'purgeObject':
case 'modifyObject':
case 'setDatastreamState':
$soap_client = self::$connection_helper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl'));
try {
if (!empty($soap_client)) {

Loading…
Cancel
Save