#472 REST Services: added core/delete (to bulk delete, full-featured), and validated the operation core/apply_stimulus

SVN:trunk[2616]
This commit is contained in:
Romain Quetiez
2013-03-13 11:01:16 +00:00
parent 462f163d8a
commit 3cf398618e
4 changed files with 213 additions and 2 deletions

View File

@@ -587,6 +587,10 @@ class RestResult
* Result: the requested operation is not valid for the specified version
*/
const UNKNOWN_OPERATION = 11;
/**
* Result: the requested operation cannot be performed because it can cause data (integrity) loss
*/
const UNSAFE = 12;
/**
* Result: the operation could not be performed, see the message for troubleshooting
*/
@@ -789,7 +793,11 @@ class RestUtils
}
elseif (is_numeric($key))
{
$res = MetaModel::GetObject($sClass, $key);
$res = MetaModel::GetObject($sClass, $key, false);
if (is_null($res))
{
throw new Exception("Invalid object $sClass::$key");
}
}
elseif (is_string($key))
{