Merged in darojas/processmaker (pull request #208)
Se adiciona el filtro 'type' para assignee y adhoc. Se modifica updload image en PMUSER. Se modifica upload (incompleto) para FILESMANAGER
This commit is contained in:
@@ -19,14 +19,15 @@ class Assignee extends Api
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $type
|
||||
*
|
||||
*/
|
||||
public function doGetActivityAssignees($prjUid, $actUid, $filter = '', $start = null, $limit = null)
|
||||
public function doGetActivityAssignees($prjUid, $actUid, $filter = '', $start = null, $limit = null, $type = '')
|
||||
{
|
||||
$response = array();
|
||||
try {
|
||||
$task = new \BusinessModel\Task();
|
||||
$arrayData = $task->getTaskAssignees($prjUid, $actUid, $filter, $start, $limit);
|
||||
$arrayData = $task->getTaskAssignees($prjUid, $actUid, $filter, $start, $limit, $type);
|
||||
//Response
|
||||
$response = $arrayData;
|
||||
} catch (\Exception $e) {
|
||||
@@ -44,14 +45,15 @@ class Assignee extends Api
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $type
|
||||
*
|
||||
*/
|
||||
public function doGetActivityAvailableAssignee($prjUid, $actUid, $filter = '', $start = null, $limit = null)
|
||||
public function doGetActivityAvailableAssignee($prjUid, $actUid, $filter = '', $start = null, $limit = null, $type = '')
|
||||
{
|
||||
$response = array();
|
||||
try {
|
||||
$task = new \BusinessModel\Task();
|
||||
$arrayData = $task->getTaskAvailableAssignee($prjUid, $actUid, $filter, $start, $limit);
|
||||
$arrayData = $task->getTaskAvailableAssignee($prjUid, $actUid, $filter, $start, $limit, $type);
|
||||
//Response
|
||||
$response = $arrayData;
|
||||
} catch (\Exception $e) {
|
||||
@@ -132,14 +134,15 @@ class Assignee extends Api
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $type
|
||||
*
|
||||
*/
|
||||
public function doGetActivityAdhocAssignees($prjUid, $actUid, $filter = '', $start = null, $limit = null)
|
||||
public function doGetActivityAdhocAssignees($prjUid, $actUid, $filter = '', $start = null, $limit = null, $type = '')
|
||||
{
|
||||
$response = array();
|
||||
try {
|
||||
$task = new \BusinessModel\Task();
|
||||
$arrayData = $task->getTaskAdhocAssignees($prjUid, $actUid, $filter, $start, $limit);
|
||||
$arrayData = $task->getTaskAdhocAssignees($prjUid, $actUid, $filter, $start, $limit, $type);
|
||||
//Response
|
||||
$response = $arrayData;
|
||||
} catch (\Exception $e) {
|
||||
@@ -157,14 +160,15 @@ class Assignee extends Api
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $type
|
||||
*
|
||||
*/
|
||||
public function doGetActivityAvailableAdhocAssignee($prjUid, $actUid, $filter = '', $start = null, $limit = null)
|
||||
public function doGetActivityAvailableAdhocAssignee($prjUid, $actUid, $filter = '', $start = null, $limit = null, $type = '')
|
||||
{
|
||||
$response = array();
|
||||
try {
|
||||
$task = new \BusinessModel\Task();
|
||||
$arrayData = $task->getTaskAvailableAdhocAssignee($prjUid, $actUid, $filter, $start, $limit);
|
||||
$arrayData = $task->getTaskAvailableAdhocAssignee($prjUid, $actUid, $filter, $start, $limit, $type);
|
||||
//Response
|
||||
$response = $arrayData;
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@@ -60,22 +60,19 @@ class FilesManager extends Api
|
||||
|
||||
/**
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
* @param array $request_data
|
||||
*
|
||||
* @header Accept: application/octet-stream
|
||||
* @url POST /:prjUid/process-file-manager/upload
|
||||
*/
|
||||
public function doPostProcessFilesManagerUpload($prjUid)
|
||||
public function doPostProcessFilesManagerUpload($prjUid, $request_data)
|
||||
{
|
||||
try {
|
||||
require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "src" . PATH_SEP . "Extension" . PATH_SEP . "Restler" . PATH_SEP . "UploadFormat.php");
|
||||
$userUid = $this->getUserId();
|
||||
//Response
|
||||
$response = $arrayData;
|
||||
$filesManager = new \BusinessModel\FilesManager();
|
||||
$filesManager->uploadProcessFilesManager($request_data);
|
||||
} catch (\Exception $e) {
|
||||
//response
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -168,11 +165,3 @@ class ProcessFilesManagerStructurePut
|
||||
public $content;
|
||||
}
|
||||
|
||||
class ProcessFilesManagerStructureUpload
|
||||
{
|
||||
/**
|
||||
* @var string {@from body}
|
||||
*/
|
||||
public $url;
|
||||
|
||||
}
|
||||
|
||||
@@ -63,7 +63,6 @@ class User extends Api
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @url PUT /:usr_uid
|
||||
*
|
||||
@@ -97,5 +96,22 @@ class User extends Api
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $usr_uid {@min 32} {@max 32}
|
||||
*
|
||||
* @url POST /image-upload
|
||||
*/
|
||||
public function doPostUserImageUpload($usr_uid)
|
||||
{
|
||||
try {
|
||||
$user = new \BusinessModel\User();
|
||||
$user->uploadImage($usr_uid);
|
||||
} catch (\Exception $e) {
|
||||
//response
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user