ProcessMaker-MA "Group (endpoints)"

- Se han implementado los siguientes Endpoints:
    GET /api/1.0/{workspace}/group/{grp_uid}/users?filter={filter}&start={start}&limit={limit}
    GET /api/1.0/{workspace}/group/{grp_uid}/available-users?filter={filter}&start={start}&limit={limit}
This commit is contained in:
Victor Saisa Lopez
2014-02-10 17:16:44 -04:00
parent b57863cda4
commit 381ca03c0b
6 changed files with 334 additions and 121 deletions

View File

@@ -140,7 +140,6 @@ class Process
$criteria->add("CT.CON_VALUE", $processTitle, \Criteria::EQUAL);
$rsCriteria = \ProcessPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
if ($rsCriteria->next()) {
return true;
@@ -227,6 +226,29 @@ class Process
}
}
/**
* Validate pager data
*
* @param array $arrayData Data
* @param array $arrayFieldNameForException Fields for exception messages
*
* return void Throw exception if pager data has an invalid value
*/
public function throwExceptionIfDataNotMetPagerVarDefinition($arrayData, $arrayFieldNameForException)
{
try {
foreach ($arrayData as $key => $value) {
$nameForException = (isset($arrayFieldNameForException[$key]))? $arrayFieldNameForException[$key] : "";
if (!is_null($value) && ($value . "" == "" || !preg_match("/^(?:\+|\-)?(?:0|[1-9]\d*)$/", $value . "") || (int)($value) < 0)) {
throw (new \Exception(str_replace(array("{0}"), array($nameForException), "Invalid value specified for \"{0}\". Expecting positive integer value")));
}
}
} catch (\Exception $e) {
throw $e;
}
}
/**
* Verify if doesn't exist the Process in table PROCESS
*