Refactoring of classes that where in workflow/engine/src , now all of them have a unique parent namespace \ProcessMaker

This commit is contained in:
Erik Amaru Ortiz
2014-04-02 17:02:02 -04:00
parent 4d59bc2d5a
commit 8b823af4ae
40 changed files with 257 additions and 257 deletions

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -19,7 +19,7 @@ class Calendar extends Api
public function index($filter = null, $start = null, $limit = null)
{
try {
$calendar = new \BusinessModel\Calendar();
$calendar = new \ProcessMaker\BusinessModel\Calendar();
$calendar->setFormatFieldNameInUppercase($this->formatFieldNameInUppercase);
$response = $calendar->getCalendars(array("filter" => $filter), null, null, $start, $limit);
@@ -38,7 +38,7 @@ class Calendar extends Api
public function doGet($cal_uid)
{
try {
$calendar = new \BusinessModel\Calendar();
$calendar = new \ProcessMaker\BusinessModel\Calendar();
$calendar->setFormatFieldNameInUppercase($this->formatFieldNameInUppercase);
$response = $calendar->getCalendar($cal_uid);
@@ -59,7 +59,7 @@ class Calendar extends Api
public function doPost($request_data)
{
try {
$calendar = new \BusinessModel\Calendar();
$calendar = new \ProcessMaker\BusinessModel\Calendar();
$calendar->setFormatFieldNameInUppercase($this->formatFieldNameInUppercase);
$arrayData = $calendar->create($request_data);
@@ -81,7 +81,7 @@ class Calendar extends Api
public function doPut($cal_uid, $request_data)
{
try {
$calendar = new \BusinessModel\Calendar();
$calendar = new \ProcessMaker\BusinessModel\Calendar();
$calendar->setFormatFieldNameInUppercase($this->formatFieldNameInUppercase);
$arrayData = $calendar->update($cal_uid, $request_data);
@@ -98,7 +98,7 @@ class Calendar extends Api
public function doDelete($cal_uid)
{
try {
$calendar = new \BusinessModel\Calendar();
$calendar = new \ProcessMaker\BusinessModel\Calendar();
$calendar->setFormatFieldNameInUppercase($this->formatFieldNameInUppercase);
$calendar->delete($cal_uid);

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -54,7 +54,7 @@ class Cases extends Api
$dataList['category'] = $cat_uid;
$dataList['process'] = $pro_uid;
$dataList['search'] = $search;
$oCases = new \BusinessModel\Cases();
$oCases = new \ProcessMaker\BusinessModel\Cases();
$response = $oCases->getList($dataList);
return $response;
} catch (\Exception $e) {
@@ -101,7 +101,7 @@ class Cases extends Api
$dataList['category'] = $cat_uid;
$dataList['process'] = $pro_uid;
$dataList['search'] = $search;
$oCases = new \BusinessModel\Cases();
$oCases = new \ProcessMaker\BusinessModel\Cases();
$response = $oCases->getList($dataList);
return $response;
} catch (\Exception $e) {
@@ -148,7 +148,7 @@ class Cases extends Api
$dataList['category'] = $cat_uid;
$dataList['process'] = $pro_uid;
$dataList['search'] = $search;
$oCases = new \BusinessModel\Cases();
$oCases = new \ProcessMaker\BusinessModel\Cases();
$response = $oCases->getList($dataList);
return $response;
} catch (\Exception $e) {
@@ -195,7 +195,7 @@ class Cases extends Api
$dataList['category'] = $cat_uid;
$dataList['process'] = $pro_uid;
$dataList['search'] = $search;
$oCases = new \BusinessModel\Cases();
$oCases = new \ProcessMaker\BusinessModel\Cases();
$response = $oCases->getList($dataList);
return $response;
} catch (\Exception $e) {
@@ -242,7 +242,7 @@ class Cases extends Api
$dataList['category'] = $cat_uid;
$dataList['process'] = $pro_uid;
$dataList['search'] = $search;
$oCases = new \BusinessModel\Cases();
$oCases = new \ProcessMaker\BusinessModel\Cases();
$response = $oCases->getList($dataList);
return $response;
} catch (\Exception $e) {
@@ -289,7 +289,7 @@ class Cases extends Api
$dataList['category'] = $cat_uid;
$dataList['process'] = $pro_uid;
$dataList['search'] = $search;
$oCases = new \BusinessModel\Cases();
$oCases = new \ProcessMaker\BusinessModel\Cases();
$response = $oCases->getList($dataList);
return $response;
} catch (\Exception $e) {
@@ -336,7 +336,7 @@ class Cases extends Api
$dataList['category'] = $cat_uid;
$dataList['process'] = $pro_uid;
$dataList['search'] = $search;
$oCases = new \BusinessModel\Cases();
$oCases = new \ProcessMaker\BusinessModel\Cases();
$response = $oCases->getList($dataList);
return $response;
} catch (\Exception $e) {
@@ -383,7 +383,7 @@ class Cases extends Api
$dataList['category'] = $cat_uid;
$dataList['process'] = $pro_uid;
$dataList['search'] = $search;
$oCases = new \BusinessModel\Cases();
$oCases = new \ProcessMaker\BusinessModel\Cases();
$response = $oCases->getList($dataList);
return $response;
} catch (\Exception $e) {
@@ -430,7 +430,7 @@ class Cases extends Api
$dataList['category'] = $cat_uid;
$dataList['process'] = $pro_uid;
$dataList['search'] = $search;
$oCases = new \BusinessModel\Cases();
$oCases = new \ProcessMaker\BusinessModel\Cases();
$response = $oCases->getList($dataList);
return $response;
} catch (\Exception $e) {
@@ -477,7 +477,7 @@ class Cases extends Api
$dataList['category'] = $cat_uid;
$dataList['process'] = $pro_uid;
$dataList['search'] = $search;
$oCases = new \BusinessModel\Cases();
$oCases = new \ProcessMaker\BusinessModel\Cases();
$response = $oCases->getList($dataList);
return $response;
} catch (\Exception $e) {
@@ -536,7 +536,7 @@ class Cases extends Api
$dataList['dateFrom'] = $date_from;
$dataList['dateTo'] = $date_to;
$dataList['search'] = $search;
$oCases = new \BusinessModel\Cases();
$oCases = new \ProcessMaker\BusinessModel\Cases();
$response = $oCases->getList($dataList);
return $response;
} catch (\Exception $e) {
@@ -595,7 +595,7 @@ class Cases extends Api
$dataList['dateFrom'] = $date_from;
$dataList['dateTo'] = $date_to;
$dataList['search'] = $search;
$oCases = new \BusinessModel\Cases();
$oCases = new \ProcessMaker\BusinessModel\Cases();
$response = $oCases->getList($dataList);
return $response;
} catch (\Exception $e) {
@@ -612,7 +612,7 @@ class Cases extends Api
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$oData = $cases->getCaseInfo($app_uid, $userUid);
return $oData;
} catch (\Exception $e) {
@@ -629,7 +629,7 @@ class Cases extends Api
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$oData = $cases->getTaskCase($app_uid, $userUid);
return $oData;
} catch (\Exception $e) {
@@ -649,7 +649,7 @@ class Cases extends Api
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$oData = $cases->addCase($pro_uid, $tas_uid, $userUid, $variables);
return $oData;
} catch (\Exception $e) {
@@ -669,7 +669,7 @@ class Cases extends Api
public function doPostCaseImpersonate($pro_uid, $usr_uid, $tas_uid, $variables=null)
{
try {
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$oData = $cases->addCaseImpersonate($pro_uid, $usr_uid, $tas_uid, $variables);
return $oData;
} catch (\Exception $e) {
@@ -689,7 +689,7 @@ class Cases extends Api
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$cases->updateReassignCase($app_uid, $userUid, $del_index, $usr_uid_source, $usr_uid_target);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -706,7 +706,7 @@ class Cases extends Api
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$cases->updateRouteCase($app_uid, $userUid, $del_index);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -727,7 +727,7 @@ class Cases extends Api
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$cases->putCancelCase($cas_uid, $userUid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -749,7 +749,7 @@ class Cases extends Api
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
if ($unpaused_date == null) {
$cases->putPauseCase($cas_uid, $userUid);
} else {
@@ -774,7 +774,7 @@ class Cases extends Api
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$cases->putUnpauseCase($cas_uid, $userUid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -796,7 +796,7 @@ class Cases extends Api
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$cases->putExecuteTriggerCase($cas_uid, $tri_uid, $userUid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -816,7 +816,7 @@ class Cases extends Api
public function doDeleteCase($cas_uid)
{
try {
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$cases->deleteCase($cas_uid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -836,7 +836,7 @@ class Cases extends Api
public function doGetCaseVariables($app_uid)
{
try {
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$response = $cases->getCaseVariables($app_uid);
return $response;
} catch (\Exception $e) {
@@ -858,7 +858,7 @@ class Cases extends Api
public function doPutCaseVariables($app_uid, $request_data)
{
try {
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$cases->setCaseVariables($app_uid, $request_data);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -908,7 +908,7 @@ class Cases extends Api
$dataList['search'] = $search;
$usr_uid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$response = $cases->getCaseNotes($app_uid, $usr_uid, $dataList);
return $response;
} catch (\Exception $e) {
@@ -957,7 +957,7 @@ class Cases extends Api
$dataList['search'] = $search;
$usr_uid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$response = $cases->getCaseNotes($app_uid, $usr_uid, $dataList);
return $response;
} catch (\Exception $e) {
@@ -981,7 +981,7 @@ class Cases extends Api
{
try {
$usr_uid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases = new \ProcessMaker\BusinessModel\Cases();
$send_mail = ($send_mail == 0) ? false : true;
$cases->saveCaseNote($app_uid, $usr_uid, $note_content, $send_mail);
} catch (\Exception $e) {

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Cases;
namespace ProcessMaker\Services\Api\Cases;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -20,7 +20,7 @@ class InputDocument extends Api
{
try {
$userUid = $this->getUserId();
$inputDocument = new \BusinessModel\Cases\InputDocument();
$inputDocument = new \ProcessMaker\BusinessModel\Cases\InputDocument();
$response = $inputDocument->getCasesInputDocuments($app_uid, $userUid);
return $response;
} catch (\Exception $e) {
@@ -38,7 +38,7 @@ class InputDocument extends Api
{
try {
$userUid = $this->getUserId();
$inputDocument = new \BusinessModel\Cases\InputDocument();
$inputDocument = new \ProcessMaker\BusinessModel\Cases\InputDocument();
$response = $inputDocument->getCasesInputDocument($app_uid, $userUid, $inp_doc_uid);
return $response;
} catch (\Exception $e) {
@@ -55,7 +55,7 @@ class InputDocument extends Api
public function doDeleteInputDocument($app_uid, $inp_doc_uid)
{
try {
$inputDocument = new \BusinessModel\Cases\InputDocument();
$inputDocument = new \ProcessMaker\BusinessModel\Cases\InputDocument();
$inputDocument->removeInputDocument($inp_doc_uid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -73,7 +73,7 @@ class InputDocument extends Api
{
try {
$userUid = $this->getUserId();
$inputDocument = new \BusinessModel\Cases\InputDocument();
$inputDocument = new \ProcessMaker\BusinessModel\Cases\InputDocument();
$response = $inputDocument->addCasesInputDocument($app_uid, $tas_uid, $app_doc_comment, $inp_doc_uid, $userUid);
return $response;
} catch (\Exception $e) {

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Cases;
namespace ProcessMaker\Services\Api\Cases;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -20,7 +20,7 @@ class OutputDocument extends Api
{
try {
$userUid = $this->getUserId();
$outputDocument = new \BusinessModel\Cases\OutputDocument();
$outputDocument = new \ProcessMaker\BusinessModel\Cases\OutputDocument();
$response = $outputDocument->getCasesOutputDocuments($app_uid, $userUid);
return $response;
} catch (\Exception $e) {
@@ -38,7 +38,7 @@ class OutputDocument extends Api
{
try {
$userUid = $this->getUserId();
$outputDocument = new \BusinessModel\Cases\OutputDocument();
$outputDocument = new \ProcessMaker\BusinessModel\Cases\OutputDocument();
$response = $outputDocument->getCasesOutputDocument($app_uid, $userUid, $app_doc_uid);
return $response;
} catch (\Exception $e) {
@@ -55,7 +55,7 @@ class OutputDocument extends Api
public function doDeleteOutputDocument($app_uid, $app_doc_uid)
{
try {
$outputDocument = new \BusinessModel\Cases\OutputDocument();
$outputDocument = new \ProcessMaker\BusinessModel\Cases\OutputDocument();
$outputDocument->removeOutputDocument($app_doc_uid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -71,7 +71,7 @@ class OutputDocument extends Api
{
try {
$userUid = $this->getUserId();
$outputDocument = new \BusinessModel\Cases\OutputDocument();
$outputDocument = new \ProcessMaker\BusinessModel\Cases\OutputDocument();
$response = $outputDocument->addCasesOutputDocument($app_uid, $out_doc_uid, $userUid);
return $response;
} catch (\Exception $e) {

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -27,7 +27,7 @@ class Department extends Api
public function doGetDepartments()
{
try {
$oDepartment = new \BusinessModel\Department();
$oDepartment = new \ProcessMaker\BusinessModel\Department();
$response = $oDepartment->getDepartments();
return $response;
} catch (\Exception $e) {
@@ -49,7 +49,7 @@ class Department extends Api
public function doGetDepartment($dep_uid)
{
try {
$oDepartment = new \BusinessModel\Department();
$oDepartment = new \ProcessMaker\BusinessModel\Department();
$response = $oDepartment->getDepartment($dep_uid);
return $response;
} catch (\Exception $e) {
@@ -73,7 +73,7 @@ class Department extends Api
public function doPost($request_data, $dep_title)
{
try {
$oDepartment = new \BusinessModel\Department();
$oDepartment = new \ProcessMaker\BusinessModel\Department();
$response = $oDepartment->saveDepartment($request_data);
return $response;
} catch (\Exception $e) {
@@ -98,7 +98,7 @@ class Department extends Api
{
try {
$request_data['dep_uid'] = $dep_uid;
$oDepartment = new \BusinessModel\Department();
$oDepartment = new \ProcessMaker\BusinessModel\Department();
$response = $oDepartment->saveDepartment($request_data, false);
return $response;
} catch (\Exception $e) {
@@ -120,7 +120,7 @@ class Department extends Api
public function doDelete($dep_uid)
{
try {
$oDepartment = new \BusinessModel\Department();
$oDepartment = new \ProcessMaker\BusinessModel\Department();
$oDepartment->deleteDepartment($dep_uid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -17,7 +17,7 @@ class Group extends Api
public function index($filter = null, $start = null, $limit = null)
{
try {
$group = new \BusinessModel\Group();
$group = new \ProcessMaker\BusinessModel\Group();
$group->setFormatFieldNameInUppercase(false);
$response = $group->getGroups(array("filter" => $filter), null, null, $start, $limit);
@@ -36,7 +36,7 @@ class Group extends Api
public function doGet($grp_uid)
{
try {
$group = new \BusinessModel\Group();
$group = new \ProcessMaker\BusinessModel\Group();
$group->setFormatFieldNameInUppercase(false);
$response = $group->getGroup($grp_uid);
@@ -57,7 +57,7 @@ class Group extends Api
public function doPost($request_data)
{
try {
$group = new \BusinessModel\Group();
$group = new \ProcessMaker\BusinessModel\Group();
$group->setFormatFieldNameInUppercase(false);
$arrayData = $group->create($request_data);
@@ -79,7 +79,7 @@ class Group extends Api
public function doPut($grp_uid, $request_data)
{
try {
$group = new \BusinessModel\Group();
$group = new \ProcessMaker\BusinessModel\Group();
$group->setFormatFieldNameInUppercase(false);
$arrayData = $group->update($grp_uid, $request_data);
@@ -96,7 +96,7 @@ class Group extends Api
public function doDelete($grp_uid)
{
try {
$group = new \BusinessModel\Group();
$group = new \ProcessMaker\BusinessModel\Group();
$group->setFormatFieldNameInUppercase(false);
$group->delete($grp_uid);
@@ -113,7 +113,7 @@ class Group extends Api
public function doGetUsers($grp_uid, $filter = null, $start = null, $limit = null)
{
try {
$group = new \BusinessModel\Group();
$group = new \ProcessMaker\BusinessModel\Group();
$group->setFormatFieldNameInUppercase(false);
$response = $group->getUsers("USERS", $grp_uid, array("filter" => $filter), null, null, $start, $limit);
@@ -132,7 +132,7 @@ class Group extends Api
public function doGetAvailableUsers($grp_uid, $filter = null, $start = null, $limit = null)
{
try {
$group = new \BusinessModel\Group();
$group = new \ProcessMaker\BusinessModel\Group();
$group->setFormatFieldNameInUppercase(false);
$response = $group->getUsers("AVAILABLE-USERS", $grp_uid, array("filter" => $filter), null, null, $start, $limit);

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Group;
namespace ProcessMaker\Services\Api\Group;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -22,7 +22,7 @@ class User extends Api
public function doPostUser($grp_uid, $request_data)
{
try {
$groupUser = new \BusinessModel\Group\User();
$groupUser = new \ProcessMaker\BusinessModel\Group\User();
$groupUser->setFormatFieldNameInUppercase(false);
$arrayData = $groupUser->create($grp_uid, $request_data);
@@ -40,7 +40,7 @@ class User extends Api
public function doDeleteUser($grp_uid, $usr_uid)
{
try {
$groupUser = new \BusinessModel\Group\User();
$groupUser = new \ProcessMaker\BusinessModel\Group\User();
$groupUser->setFormatFieldNameInUppercase(false);
$groupUser->delete($grp_uid, $usr_uid);

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -22,7 +22,7 @@ class Pmtable extends Api
public function doGetPmTables()
{
try {
$oPmTable = new \BusinessModel\Table();
$oPmTable = new \ProcessMaker\BusinessModel\Table();
$response = $oPmTable->getTables();
return $response;
} catch (\Exception $e) {
@@ -42,7 +42,7 @@ class Pmtable extends Api
public function doGetPmTable($pmt_uid)
{
try {
$oPmTable = new \BusinessModel\Table();
$oPmTable = new \ProcessMaker\BusinessModel\Table();
$response = $oPmTable->getTable($pmt_uid);
return $response;
} catch (\Exception $e) {
@@ -62,7 +62,7 @@ class Pmtable extends Api
public function doGetPmTableData($pmt_uid)
{
try {
$oPmTable = new \BusinessModel\Table();
$oPmTable = new \ProcessMaker\BusinessModel\Table();
$response = $oPmTable->getTableData($pmt_uid);
return $response;
} catch (\Exception $e) {
@@ -88,7 +88,7 @@ class Pmtable extends Api
$pmt_tab_dsc = ''
) {
try {
$oReportTable = new \BusinessModel\Table();
$oReportTable = new \ProcessMaker\BusinessModel\Table();
$response = $oReportTable->saveTable($request_data);
if (isset($response['pro_uid'])) {
unset($response['pro_uid']);
@@ -118,7 +118,7 @@ class Pmtable extends Api
$pmt_rows = ''
) {
try {
$oReportTable = new \BusinessModel\Table();
$oReportTable = new \ProcessMaker\BusinessModel\Table();
$response = $oReportTable->saveTableData($pmt_uid, $request_data);
return $response;
} catch (\Exception $e) {
@@ -145,7 +145,7 @@ class Pmtable extends Api
) {
try {
$request_data['pmt_uid'] = $pmt_uid;
$oReportTable = new \BusinessModel\Table();
$oReportTable = new \ProcessMaker\BusinessModel\Table();
$response = $oReportTable->updateTable($request_data);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -170,7 +170,7 @@ class Pmtable extends Api
$pmt_rows = ''
) {
try {
$oReportTable = new \BusinessModel\Table();
$oReportTable = new \ProcessMaker\BusinessModel\Table();
$response = $oReportTable->updateTableData($pmt_uid, $request_data);
return $response;
} catch (\Exception $e) {
@@ -191,7 +191,7 @@ class Pmtable extends Api
public function doDeletePmTable($pmt_uid)
{
try {
$oReportTable = new \BusinessModel\Table();
$oReportTable = new \ProcessMaker\BusinessModel\Table();
$response = $oReportTable->deleteTable($pmt_uid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -226,7 +226,7 @@ class Pmtable extends Api
if ($key3 != '') {
$rows[$key3] = $value3;
}
$oReportTable = new \BusinessModel\Table();
$oReportTable = new \ProcessMaker\BusinessModel\Table();
$response = $oReportTable->deleteTableData($pmt_uid, $rows);
return $response;
} catch (\Exception $e) {

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -27,7 +27,7 @@ class Process extends Api
$arrayFilterData["category"] = $proCategory;
}
$process = new \BusinessModel\Process();
$process = new \ProcessMaker\BusinessModel\Process();
$data = $process->loadAllProcess($arrayFilterData, $start, $limit);
// Composing Response
@@ -48,7 +48,7 @@ class Process extends Api
$response = array();
try {
$process = new \BusinessModel\Process();
$process = new \ProcessMaker\BusinessModel\Process();
$data = $process->loadProcess($processUid);
@@ -68,7 +68,7 @@ class Process extends Api
defined('SYS_LANG') || define("SYS_LANG", $request_data["lang"]);
try {
$process = new \BusinessModel\Process();
$process = new \ProcessMaker\BusinessModel\Process();
$userUid = $this->getUserId();
return $process->createProcess($userUid, $request_data);
@@ -83,7 +83,7 @@ class Process extends Api
$response = array();
try {
$process = new \BusinessModel\Process();
$process = new \ProcessMaker\BusinessModel\Process();
$userUid = $this->getUserId();
$data = $process->updateProcess($processUid, $userUid, $request_data);
@@ -104,7 +104,7 @@ class Process extends Api
$response = array();
try {
$process = new \BusinessModel\Process();
$process = new \ProcessMaker\BusinessModel\Process();
$result = $process->deleteProcess($processUid, (($checkCases && $checkCases == 1)? true : false));
@@ -128,7 +128,7 @@ class Process extends Api
try {
$task1 = new \Task();
$task2 = new \BusinessModel\Task();
$task2 = new \ProcessMaker\BusinessModel\Task();
$arrayData = $task1->load($activityUid);
@@ -206,7 +206,7 @@ class Process extends Api
$response = array();
try {
$task2 = new \BusinessModel\Task();
$task2 = new \ProcessMaker\BusinessModel\Task();
$arrayData = array(
"_extended" => array(
@@ -242,7 +242,7 @@ class Process extends Api
$response = array();
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$data = $task->getStepsList($activityUid, $processUid, false, $start, $limit);

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -19,7 +19,7 @@ class ProcessCategory extends Api
public function doGetCategories($filter = null, $start = null, $limit = null)
{
try {
$processCategory = new \BusinessModel\ProcessCategory();
$processCategory = new \ProcessMaker\BusinessModel\ProcessCategory();
$processCategory->setFormatFieldNameInUppercase($this->formatFieldNameInUppercase);
$response = $processCategory->getCategories(array("filter" => $filter), null, null, $start, $limit);
@@ -38,7 +38,7 @@ class ProcessCategory extends Api
public function doGetCategory($cat_uid)
{
try {
$processCategory = new \BusinessModel\ProcessCategory();
$processCategory = new \ProcessMaker\BusinessModel\ProcessCategory();
$processCategory->setFormatFieldNameInUppercase($this->formatFieldNameInUppercase);
$response = $processCategory->getCategory($cat_uid);
@@ -58,7 +58,7 @@ class ProcessCategory extends Api
public function doPostCategory($cat_name)
{
try {
$processCategory = new \BusinessModel\ProcessCategory();
$processCategory = new \ProcessMaker\BusinessModel\ProcessCategory();
$response = $processCategory->addCategory($cat_name);
return $response;
@@ -77,7 +77,7 @@ class ProcessCategory extends Api
public function doPutCategory($cat_uid, $cat_name)
{
try {
$processCategory = new \BusinessModel\ProcessCategory();
$processCategory = new \ProcessMaker\BusinessModel\ProcessCategory();
$response = $processCategory->updateCategory($cat_uid, $cat_name);
return $response;
@@ -95,7 +95,7 @@ class ProcessCategory extends Api
public function doDeleteCategory($cat_uid)
{
try {
$processCategory = new \BusinessModel\ProcessCategory();
$processCategory = new \ProcessMaker\BusinessModel\ProcessCategory();
$processCategory->deleteCategory($cat_uid);
} catch (\Exception $e) {

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
use Luracast\Restler\RestException;
use ProcessMaker\Services\Api;
@@ -104,7 +104,7 @@ class Project extends Api
public function doGetProcess($prj_uid)
{
try {
$process = new \BusinessModel\Process();
$process = new \ProcessMaker\BusinessModel\Process();
$process->setFormatFieldNameInUppercase(false);
$process->setArrayFieldNameForException(array("processUid" => "prj_uid"));
@@ -125,7 +125,7 @@ class Project extends Api
public function doPutProcess($prj_uid, $request_data)
{
try {
$process = new \BusinessModel\Process();
$process = new \ProcessMaker\BusinessModel\Process();
$process->setFormatFieldNameInUppercase(false);
$process->setArrayFieldNameForException(array("processUid" => "prj_uid"));
@@ -143,7 +143,7 @@ class Project extends Api
public function doGetDynaForms($prj_uid)
{
try {
$process = new \BusinessModel\Process();
$process = new \ProcessMaker\BusinessModel\Process();
$process->setFormatFieldNameInUppercase(false);
$process->setArrayFieldNameForException(array("processUid" => "prj_uid"));
@@ -163,7 +163,7 @@ class Project extends Api
public function doGetInputDocuments($prj_uid)
{
try {
$process = new \BusinessModel\Process();
$process = new \ProcessMaker\BusinessModel\Process();
$process->setFormatFieldNameInUppercase(false);
$process->setArrayFieldNameForException(array("processUid" => "prj_uid"));
@@ -183,7 +183,7 @@ class Project extends Api
public function doGetWebEntries($prj_uid)
{
try {
$process = new \BusinessModel\Process();
$process = new \ProcessMaker\BusinessModel\Process();
$process->setFormatFieldNameInUppercase(false);
$process->setArrayFieldNameForException(array("processUid" => "prj_uid"));
@@ -203,7 +203,7 @@ class Project extends Api
public function doGetVariables($prj_uid)
{
try {
$process = new \BusinessModel\Process();
$process = new \ProcessMaker\BusinessModel\Process();
$process->setFormatFieldNameInUppercase(false);
$process->setArrayFieldNameForException(array("processUid" => "prj_uid"));
@@ -225,7 +225,7 @@ class Project extends Api
public function doGetGridVariables($prj_uid, $grid_uid = "")
{
try {
$process = new \BusinessModel\Process();
$process = new \ProcessMaker\BusinessModel\Process();
$process->setFormatFieldNameInUppercase(false);
$process->setArrayFieldNameForException(array("processUid" => "prj_uid"));
@@ -245,7 +245,7 @@ class Project extends Api
public function doGetTriggerWizards($prj_uid)
{
try {
$process = new \BusinessModel\Process();
$process = new \ProcessMaker\BusinessModel\Process();
$process->setFormatFieldNameInUppercase(false);
$process->setArrayFieldNameForException(array("processUid" => "prj_uid", "libraryName" => "lib_name", "methodName" => "fn_name"));

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -44,7 +44,7 @@ class Activity extends Api
if ($filter == '' || $filter == 'properties') {
// PROPERTIES
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$properties = $task->getProperties($prj_uid, $act_uid, true, false);
foreach ($properties as $key => $value) {
if (in_array($key, $hiddenFields)) {
@@ -77,7 +77,7 @@ class Activity extends Api
if (isset($request_data['properties']['tas_start'])) {
unset($request_data['properties']['tas_start']);
}
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$properties = $task->updateProperties($prj_uid, $act_uid, $request_data);
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
@@ -99,7 +99,7 @@ class Activity extends Api
public function doDeleteProjectActivity($prj_uid, $act_uid)
{
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$task->deleteTask($prj_uid, $act_uid);
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
@@ -115,7 +115,7 @@ class Activity extends Api
public function doGetActivitySteps($act_uid, $prj_uid)
{
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$task->setFormatFieldNameInUppercase(false);
$task->setArrayParamException(array("taskUid" => "act_uid", "stepUid" => "step_uid"));
@@ -135,7 +135,7 @@ class Activity extends Api
public function doGetActivityAvailableSteps($act_uid, $prj_uid)
{
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$task->setFormatFieldNameInUppercase(false);
$task->setArrayParamException(array("taskUid" => "act_uid"));

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project\Activity;
namespace ProcessMaker\Services\Api\Project\Activity;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -26,7 +26,7 @@ class Assignee extends Api
{
$response = array();
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$arrayData = $task->getTaskAssignees($prjUid, $actUid, $filter, $start, $limit, $type);
//Response
$response = $arrayData;
@@ -52,7 +52,7 @@ class Assignee extends Api
{
$response = array();
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$arrayData = $task->getTaskAvailableAssignee($prjUid, $actUid, $filter, $start, $limit, $type);
//Response
$response = $arrayData;
@@ -75,7 +75,7 @@ class Assignee extends Api
{
$response = array();
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$objectData = $task->getTaskAssignee($prjUid, $actUid, $aasUid);
//Response
$response = $objectData;
@@ -99,7 +99,7 @@ class Assignee extends Api
public function doPostActivityAssignee($prjUid, $actUid, $aas_uid, $aas_type)
{
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$task->addTaskAssignee($prjUid, $actUid, $aas_uid, $aas_type);
} catch (\Exception $e) {
//Response
@@ -118,7 +118,7 @@ class Assignee extends Api
public function doDeleteActivityAssignee($prjUid, $actUid, $aasUid)
{
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$task->removeTaskAssignee($prjUid, $actUid, $aasUid);
} catch (\Exception $e) {
//Response
@@ -141,7 +141,7 @@ class Assignee extends Api
{
$response = array();
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$arrayData = $task->getTaskAdhocAssignees($prjUid, $actUid, $filter, $start, $limit, $type);
//Response
$response = $arrayData;
@@ -167,7 +167,7 @@ class Assignee extends Api
{
$response = array();
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$arrayData = $task->getTaskAvailableAdhocAssignee($prjUid, $actUid, $filter, $start, $limit, $type);
//Response
$response = $arrayData;
@@ -190,7 +190,7 @@ class Assignee extends Api
{
$response = array();
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$objectData = $task->getTaskAdhocAssignee($prjUid, $actUid, $aasUid);
//Response
$response = $objectData;
@@ -214,7 +214,7 @@ class Assignee extends Api
public function doPostActivityAdhocAssignee($prjUid, $actUid, $ada_uid, $ada_type)
{
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$task->addTaskAdhocAssignee($prjUid, $actUid, $ada_uid, $ada_type);
} catch (\Exception $e) {
//Response
@@ -233,7 +233,7 @@ class Assignee extends Api
public function doDeleteActivityAdhocAssignee($prjUid, $actUid, $adaUid)
{
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$task->removeTaskAdhocAssignee($prjUid, $actUid, $adaUid);
} catch (\Exception $e) {
//Response
@@ -256,7 +256,7 @@ class Assignee extends Api
{
$response = array();
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$arrayData = $task->getTaskAssigneesAll($prjUid, $actUid, $filter, $start, $limit, $type);
//Response
$response = $arrayData;
@@ -282,7 +282,7 @@ class Assignee extends Api
{
$response = array();
try {
$task = new \BusinessModel\Task();
$task = new \ProcessMaker\BusinessModel\Task();
$arrayData = $task->getTaskAdhocAssigneesAll($prjUid, $actUid, $filter, $start, $limit, $type);
//Response
$response = $arrayData;

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project\Activity;
namespace ProcessMaker\Services\Api\Project\Activity;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -21,7 +21,7 @@ class Step extends Api
public function doGetActivityStep($step_uid, $act_uid, $prj_uid)
{
try {
$step = new \BusinessModel\Step();
$step = new \ProcessMaker\BusinessModel\Step();
$step->setFormatFieldNameInUppercase(false);
$step->setArrayParamException(array("stepUid" => "step_uid", "taskUid" => "act_uid", "processUid" => "prj_uid"));
@@ -58,7 +58,7 @@ class Step extends Api
$step_mode = "EDIT"
) {
try {
$step = new \BusinessModel\Step();
$step = new \ProcessMaker\BusinessModel\Step();
$step->setFormatFieldNameInUppercase(false);
$step->setArrayParamException(array("stepUid" => "step_uid", "taskUid" => "act_uid", "processUid" => "prj_uid"));
@@ -97,7 +97,7 @@ class Step extends Api
$step_mode = "EDIT"
) {
try {
$step = new \BusinessModel\Step();
$step = new \ProcessMaker\BusinessModel\Step();
$step->setFormatFieldNameInUppercase(false);
$step->setArrayParamException(array("stepUid" => "step_uid", "taskUid" => "act_uid", "processUid" => "prj_uid"));
@@ -117,7 +117,7 @@ class Step extends Api
public function doDeleteActivityStep($step_uid, $act_uid, $prj_uid)
{
try {
$step = new \BusinessModel\Step();
$step = new \ProcessMaker\BusinessModel\Step();
$step->setFormatFieldNameInUppercase(false);
$step->setArrayParamException(array("stepUid" => "step_uid", "taskUid" => "act_uid", "processUid" => "prj_uid"));
@@ -137,7 +137,7 @@ class Step extends Api
public function doGetActivityStepTriggers($step_uid, $act_uid, $prj_uid)
{
try {
$step = new \BusinessModel\Step();
$step = new \ProcessMaker\BusinessModel\Step();
$step->setFormatFieldNameInUppercase(false);
$step->setArrayParamException(array("stepUid" => "step_uid", "taskUid" => "act_uid", "processUid" => "prj_uid"));
@@ -160,7 +160,7 @@ class Step extends Api
public function doGetActivityStepAvailableTriggers($step_uid, $act_uid, $prj_uid, $type)
{
try {
$step = new \BusinessModel\Step();
$step = new \ProcessMaker\BusinessModel\Step();
$step->setFormatFieldNameInUppercase(false);
$step->setArrayParamException(array("stepUid" => "step_uid", "taskUid" => "act_uid", "processUid" => "prj_uid"));
@@ -183,7 +183,7 @@ class Step extends Api
public function doGetActivityStepAssignTaskTriggers($act_uid, $prj_uid)
{
try {
$step = new \BusinessModel\Step();
$step = new \ProcessMaker\BusinessModel\Step();
$step->setFormatFieldNameInUppercase(false);
$step->setArrayParamException(array("stepUid" => "step_uid", "taskUid" => "act_uid", "processUid" => "prj_uid"));
@@ -205,7 +205,7 @@ class Step extends Api
public function doGetActivityStepAssignTaskAvailableTriggers($act_uid, $prj_uid, $type)
{
try {
$step = new \BusinessModel\Step();
$step = new \ProcessMaker\BusinessModel\Step();
$step->setFormatFieldNameInUppercase(false);
$step->setArrayParamException(array("stepUid" => "step_uid", "taskUid" => "act_uid", "processUid" => "prj_uid"));

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project\Activity\Step;
namespace ProcessMaker\Services\Api\Project\Activity\Step;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -23,7 +23,7 @@ class Trigger extends Api
public function doGetActivityStepTrigger($triggerUid, $stepUid, $activityUid, $projectUid, $type)
{
try {
$stepTrigger = new \BusinessModel\Step\Trigger();
$stepTrigger = new \ProcessMaker\BusinessModel\Step\Trigger();
$response = $stepTrigger->getTrigger($stepUid, strtoupper($type), $activityUid, $triggerUid);
@@ -48,7 +48,7 @@ class Trigger extends Api
try {
$request_data = (array)($request_data);
$stepTrigger = new \BusinessModel\Step\Trigger();
$stepTrigger = new \ProcessMaker\BusinessModel\Step\Trigger();
$arrayData = $stepTrigger->create($stepUid, $request_data["st_type"], $activityUid, $request_data["tri_uid"], $request_data);
} catch (\Exception $e) {
@@ -70,7 +70,7 @@ class Trigger extends Api
try {
$request_data = (array)($request_data);
$stepTrigger = new \BusinessModel\Step\Trigger();
$stepTrigger = new \ProcessMaker\BusinessModel\Step\Trigger();
$arrayData = $stepTrigger->update($stepUid, $request_data["st_type"], $activityUid, $triggerUid, $request_data);
} catch (\Exception $e) {
@@ -90,7 +90,7 @@ class Trigger extends Api
public function doDeleteActivityStepTrigger($triggerUid, $stepUid, $activityUid, $projectUid, $type)
{
try {
$stepTrigger = new \BusinessModel\Step\Trigger();
$stepTrigger = new \ProcessMaker\BusinessModel\Step\Trigger();
$stepTrigger->delete($stepUid, strtoupper($type), $activityUid, $triggerUid);
} catch (\Exception $e) {
@@ -111,7 +111,7 @@ class Trigger extends Api
public function doGetActivityStepAssignTaskTrigger($triggerUid, $activityUid, $projectUid, $type)
{
try {
$stepTrigger = new \BusinessModel\Step\Trigger();
$stepTrigger = new \ProcessMaker\BusinessModel\Step\Trigger();
$response = $stepTrigger->getTrigger("", strtoupper(str_replace("-", "_", $type)), $activityUid, $triggerUid);
@@ -135,7 +135,7 @@ class Trigger extends Api
try {
$request_data = (array)($request_data);
$stepTrigger = new \BusinessModel\Step\Trigger();
$stepTrigger = new \ProcessMaker\BusinessModel\Step\Trigger();
$arrayData = $stepTrigger->create("", $request_data["st_type"], $activityUid, $request_data["tri_uid"], $request_data);
} catch (\Exception $e) {
@@ -156,7 +156,7 @@ class Trigger extends Api
try {
$request_data = (array)($request_data);
$stepTrigger = new \BusinessModel\Step\Trigger();
$stepTrigger = new \ProcessMaker\BusinessModel\Step\Trigger();
$arrayData = $stepTrigger->update("", $request_data["st_type"], $activityUid, $triggerUid, $request_data);
} catch (\Exception $e) {
@@ -175,7 +175,7 @@ class Trigger extends Api
public function doDeleteActivityStepAssignTaskTrigger($triggerUid, $activityUid, $projectUid, $type)
{
try {
$stepTrigger = new \BusinessModel\Step\Trigger();
$stepTrigger = new \ProcessMaker\BusinessModel\Step\Trigger();
$stepTrigger->delete("", strtoupper(str_replace("-", "_", $type)), $activityUid, $triggerUid);
} catch (\Exception $e) {

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -19,7 +19,7 @@ class CaseScheduler extends Api
public function doGetProjectCaseSchedulers($prjUid)
{
try {
$caseScheduler = new \BusinessModel\CaseScheduler();
$caseScheduler = new \ProcessMaker\BusinessModel\CaseScheduler();
$arrayData = $caseScheduler->getCaseSchedulers($prjUid);
//Response
$response = $arrayData;
@@ -39,7 +39,7 @@ class CaseScheduler extends Api
public function doGetProjectCaseScheduler($prjUid, $caseSchedulerUid)
{
try {
$caseScheduler = new \BusinessModel\CaseScheduler();
$caseScheduler = new \ProcessMaker\BusinessModel\CaseScheduler();
$objectData = $caseScheduler->getCaseScheduler($prjUid, $caseSchedulerUid);
//Response
$response = $objectData;
@@ -63,7 +63,7 @@ class CaseScheduler extends Api
try {
$userUid = $this->getUserId();
$request_data = (array)($request_data);
$caseScheduler = new \BusinessModel\CaseScheduler();
$caseScheduler = new \ProcessMaker\BusinessModel\CaseScheduler();
$objectData = $caseScheduler->addCaseScheduler($prjUid, $request_data, $userUid);
//Response
$response = $objectData;
@@ -87,7 +87,7 @@ class CaseScheduler extends Api
try {
$userUid = $this->getUserId();
$request_data = (array)($request_data);
$caseScheduler = new \BusinessModel\CaseScheduler();
$caseScheduler = new \ProcessMaker\BusinessModel\CaseScheduler();
$objectData = $caseScheduler->updateCaseScheduler($prjUid, $request_data, $userUid, $schUid);
//Response
$response = $objectData;
@@ -107,7 +107,7 @@ class CaseScheduler extends Api
public function doDeleteProjectCaseScheduler($prjUid, $schUid)
{
try {
$caseScheduler = new \BusinessModel\CaseScheduler();
$caseScheduler = new \ProcessMaker\BusinessModel\CaseScheduler();
$caseScheduler->deleteCaseScheduler($schUid);
} catch (\Exception $e) {
//response

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -19,7 +19,7 @@ class CaseTracker extends Api
public function doGetCaseTrackerProperty($prj_uid)
{
try {
$caseTracker = new \BusinessModel\CaseTracker();
$caseTracker = new \ProcessMaker\BusinessModel\CaseTracker();
$response = $caseTracker->getCaseTracker($prj_uid);
@@ -46,7 +46,7 @@ class CaseTracker extends Api
$message_history = 0
) {
try {
$caseTracker = new \BusinessModel\CaseTracker();
$caseTracker = new \ProcessMaker\BusinessModel\CaseTracker();
$arrayData = $caseTracker->update($prj_uid, $request_data);
} catch (\Exception $e) {
@@ -62,7 +62,7 @@ class CaseTracker extends Api
public function doGetCaseTrackerObjects($prj_uid)
{
try {
$caseTracker = new \BusinessModel\CaseTracker();
$caseTracker = new \ProcessMaker\BusinessModel\CaseTracker();
$response = $caseTracker->getCaseTrackerObjects($prj_uid);
@@ -80,7 +80,7 @@ class CaseTracker extends Api
public function doGetCaseTrackerAvailableObjects($prj_uid)
{
try {
$caseTracker = new \BusinessModel\CaseTracker();
$caseTracker = new \ProcessMaker\BusinessModel\CaseTracker();
$response = $caseTracker->getAvailableCaseTrackerObjects($prj_uid);

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -20,7 +20,7 @@ class CaseTrackerObject extends Api
public function doGetCaseTrackerObject($cto_uid, $prj_uid)
{
try {
$caseTrackerObject = new \BusinessModel\CaseTrackerObject();
$caseTrackerObject = new \ProcessMaker\BusinessModel\CaseTrackerObject();
$response = $caseTrackerObject->getCaseTrackerObject($cto_uid);
@@ -51,7 +51,7 @@ class CaseTrackerObject extends Api
$cto_position = 1
) {
try {
$caseTrackerObject = new \BusinessModel\CaseTrackerObject();
$caseTrackerObject = new \ProcessMaker\BusinessModel\CaseTrackerObject();
$arrayData = $caseTrackerObject->create($prj_uid, $request_data);
@@ -84,7 +84,7 @@ class CaseTrackerObject extends Api
$cto_position = 1
) {
try {
$caseTrackerObject = new \BusinessModel\CaseTrackerObject();
$caseTrackerObject = new \ProcessMaker\BusinessModel\CaseTrackerObject();
$arrayData = $caseTrackerObject->update($cto_uid, $request_data);
} catch (\Exception $e) {
@@ -101,7 +101,7 @@ class CaseTrackerObject extends Api
public function doDeleteCaseTrackerObject($cto_uid, $prj_uid)
{
try {
$caseTrackerObject = new \BusinessModel\CaseTrackerObject();
$caseTrackerObject = new \ProcessMaker\BusinessModel\CaseTrackerObject();
$caseTrackerObject->delete($cto_uid);
} catch (\Exception $e) {

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -26,7 +26,7 @@ class DataBaseConnection extends Api
public function doGetDataBaseConnections($prj_uid)
{
try {
$oDBConnection = new \BusinessModel\DataBaseConnection();
$oDBConnection = new \ProcessMaker\BusinessModel\DataBaseConnection();
$response = $oDBConnection->getDataBaseConnections($prj_uid);
return $response;
} catch (\Exception $e) {
@@ -46,7 +46,7 @@ class DataBaseConnection extends Api
public function doGetDataBaseConnection($prj_uid, $dbs_uid)
{
try {
$oDBConnection = new \BusinessModel\DataBaseConnection();
$oDBConnection = new \ProcessMaker\BusinessModel\DataBaseConnection();
$response = $oDBConnection->getDataBaseConnection($prj_uid, $dbs_uid);
return $response;
} catch (\Exception $e) {
@@ -86,7 +86,7 @@ class DataBaseConnection extends Api
$dbs_description = ''
) {
try {
$oDBConnection = new \BusinessModel\DataBaseConnection();
$oDBConnection = new \ProcessMaker\BusinessModel\DataBaseConnection();
$request_data['pro_uid'] = $prj_uid;
$response = $oDBConnection->testConnection($request_data, true);
return $response;
@@ -128,7 +128,7 @@ class DataBaseConnection extends Api
$dbs_description = ''
) {
try {
$oDBConnection = new \BusinessModel\DataBaseConnection();
$oDBConnection = new \ProcessMaker\BusinessModel\DataBaseConnection();
$response = $oDBConnection->saveDataBaseConnection($prj_uid, $request_data, true);
return $response;
} catch (\Exception $e) {
@@ -171,7 +171,7 @@ class DataBaseConnection extends Api
) {
try {
$request_data['dbs_uid'] = $dbs_uid;
$oDBConnection = new \BusinessModel\DataBaseConnection();
$oDBConnection = new \ProcessMaker\BusinessModel\DataBaseConnection();
$response = $oDBConnection->saveDataBaseConnection($prj_uid, $request_data);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -191,7 +191,7 @@ class DataBaseConnection extends Api
public function doDeleteDataBaseConnection($prj_uid, $dbs_uid)
{
try {
$oDBConnection = new \BusinessModel\DataBaseConnection();
$oDBConnection = new \ProcessMaker\BusinessModel\DataBaseConnection();
$response = $oDBConnection->deleteDataBaseConnection($prj_uid, $dbs_uid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -20,7 +20,7 @@ class DynaForm extends Api
public function doGetDynaForm($dyn_uid, $prj_uid)
{
try {
$dynaForm = new \BusinessModel\DynaForm();
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
$dynaForm->setFormatFieldNameInUppercase(false);
$response = $dynaForm->getDynaForm($dyn_uid);
@@ -42,7 +42,7 @@ class DynaForm extends Api
public function doPostDynaForm($prj_uid, $request_data)
{
try {
$dynaForm = new \BusinessModel\DynaForm();
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
$dynaForm->setFormatFieldNameInUppercase(false);
$dynaForm->setArrayFieldNameForException(array("processUid" => "prj_uid"));
@@ -66,7 +66,7 @@ class DynaForm extends Api
public function doPutDynaForm($dyn_uid, $prj_uid, $request_data)
{
try {
$dynaForm = new \BusinessModel\DynaForm();
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
$dynaForm->setFormatFieldNameInUppercase(false);
$arrayData = $dynaForm->update($dyn_uid, $request_data);
@@ -84,7 +84,7 @@ class DynaForm extends Api
public function doDeleteDynaForm($dyn_uid, $prj_uid)
{
try {
$dynaForm = new \BusinessModel\DynaForm();
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
$dynaForm->setFormatFieldNameInUppercase(false);
$dynaForm->delete($dyn_uid);

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -32,7 +32,7 @@ class Event extends Api
$hiddenFields = array('pro_uid', 'evn_action_parameters',
'evn_posx', 'evn_posy', 'evn_type', 'tas_evn_uid', 'evn_max_attempts'
);
$event = new \BusinessModel\Event();
$event = new \ProcessMaker\BusinessModel\Event();
$response = $event->getEvents($prj_uid, $filter);
foreach ($response as &$eventData) {
foreach ($eventData as $key => $value) {
@@ -65,7 +65,7 @@ class Event extends Api
$hiddenFields = array('pro_uid', 'evn_action_parameters',
'evn_posx', 'evn_posy', 'evn_type', 'tas_evn_uid', 'evn_max_attempts'
);
$event = new \BusinessModel\Event();
$event = new \ProcessMaker\BusinessModel\Event();
$response = $event->getEvents($prj_uid, '', $evn_uid);
foreach ($response as $key => $eventData) {
if (in_array($key, $hiddenFields)) {
@@ -125,7 +125,7 @@ class Event extends Api
$hiddenFields = array('pro_uid', 'evn_action_parameters',
'evn_posx', 'evn_posy', 'evn_type', 'tas_evn_uid', 'evn_max_attempts'
);
$event = new \BusinessModel\Event();
$event = new \ProcessMaker\BusinessModel\Event();
$response = $event->saveEvents($prj_uid, $request_data, true);
foreach ($response as $key => $eventData) {
if (in_array($key, $hiddenFields)) {
@@ -193,7 +193,7 @@ class Event extends Api
'evn_max_attempts'
);
$request_data['evn_uid'] = $evn_uid;
$event = new \BusinessModel\Event();
$event = new \ProcessMaker\BusinessModel\Event();
$event->saveEvents($prj_uid, $request_data);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -216,7 +216,7 @@ class Event extends Api
public function doDeleteEvent($prj_uid, $evn_uid)
{
try {
$event = new \BusinessModel\Event();
$event = new \ProcessMaker\BusinessModel\Event();
$response = $event->deleteEvent($prj_uid, $evn_uid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -20,7 +20,7 @@ class FilesManager extends Api
public function doGetProcessFilesManager($prj_uid, $path = '')
{
try {
$filesManager = new \BusinessModel\FilesManager();
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
if ($path != '') {
$arrayData = $filesManager->getProcessFilesManagerPath($prj_uid, $path);
} else {
@@ -48,7 +48,7 @@ class FilesManager extends Api
$userUid = $this->getUserId();
$request_data = (array)($request_data);
$request_data = array_merge(array('prf_content' => $prf_content ), $request_data);
$filesManager = new \BusinessModel\FilesManager();
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
$arrayData = $filesManager->addProcessFilesManager($prj_uid, $userUid, $request_data);
//Response
$response = $arrayData;
@@ -68,7 +68,7 @@ class FilesManager extends Api
public function doPostProcessFilesManagerUpload($prj_uid, $prf_uid)
{
try {
$filesManager = new \BusinessModel\FilesManager();
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
$sData = $filesManager->uploadProcessFilesManager($prj_uid, $prf_uid);
//Response
$response = $sData;
@@ -90,7 +90,7 @@ class FilesManager extends Api
try {
$userUid = $this->getUserId();
$request_data = (array)($request_data);
$filesManager = new \BusinessModel\FilesManager();
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
$arrayData = $filesManager->updateProcessFilesManager($prj_uid, $userUid, $request_data, $prf_uid);
//Response
$response = $arrayData;
@@ -110,7 +110,7 @@ class FilesManager extends Api
public function doDeleteProcessFilesManager($prj_uid, $prf_uid)
{
try {
$filesManager = new \BusinessModel\FilesManager();
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
$filesManager->deleteProcessFilesManager($prj_uid, $prf_uid);
} catch (\Exception $e) {
//response
@@ -127,7 +127,7 @@ class FilesManager extends Api
public function doGetProcessFilesManagerDownload($prj_uid, $prf_uid)
{
try {
$filesManager = new \BusinessModel\FilesManager();
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
$filesManager->downloadProcessFilesManager($prj_uid, $prf_uid);
} catch (\Exception $e) {
//response
@@ -144,7 +144,7 @@ class FilesManager extends Api
public function doDeleteFolderProcessFilesManager($prj_uid, $path)
{
try {
$filesManager = new \BusinessModel\FilesManager();
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
$filesManager->deleteFolderProcessFilesManager($prj_uid, $path);
} catch (\Exception $e) {
//response
@@ -162,7 +162,7 @@ class FilesManager extends Api
public function doGetProcessFileManager($prj_uid, $prf_uid)
{
try {
$filesManager = new \BusinessModel\FilesManager();
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
$response = $filesManager->getProcessFileManager($prj_uid, $prf_uid);
//response
return $response;

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -20,7 +20,7 @@ class InputDocument extends Api
public function doGetInputDocument($inp_doc_uid, $prj_uid)
{
try {
$inputDocument = new \BusinessModel\InputDocument();
$inputDocument = new \ProcessMaker\BusinessModel\InputDocument();
$inputDocument->setFormatFieldNameInUppercase(false);
$inputDocument->setArrayFieldNameForException(array("processUid" => "prj_uid"));
@@ -43,7 +43,7 @@ class InputDocument extends Api
public function doPostInputDocument($prj_uid, $request_data)
{
try {
$inputDocument = new \BusinessModel\InputDocument();
$inputDocument = new \ProcessMaker\BusinessModel\InputDocument();
$inputDocument->setFormatFieldNameInUppercase(false);
$inputDocument->setArrayFieldNameForException(array("processUid" => "prj_uid"));
@@ -67,7 +67,7 @@ class InputDocument extends Api
public function doPutInputDocument($inp_doc_uid, $prj_uid, $request_data)
{
try {
$inputDocument = new \BusinessModel\InputDocument();
$inputDocument = new \ProcessMaker\BusinessModel\InputDocument();
$inputDocument->setFormatFieldNameInUppercase(false);
$inputDocument->setArrayFieldNameForException(array("processUid" => "prj_uid"));
@@ -86,7 +86,7 @@ class InputDocument extends Api
public function doDeleteInputDocument($inp_doc_uid, $prj_uid)
{
try {
$inputDocument = new \BusinessModel\InputDocument();
$inputDocument = new \ProcessMaker\BusinessModel\InputDocument();
$inputDocument->setFormatFieldNameInUppercase(false);
$inputDocument->setArrayFieldNameForException(array("processUid" => "prj_uid"));

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -19,7 +19,7 @@ class OutputDocuments extends Api
public function doGetProjectOutputDocuments($prjUid)
{
try {
$outputDocument = new \BusinessModel\OutputDocument();
$outputDocument = new \ProcessMaker\BusinessModel\OutputDocument();
$arrayData = $outputDocument->getOutputDocuments($prjUid);
//Response
$response = $arrayData;
@@ -39,7 +39,7 @@ class OutputDocuments extends Api
public function doGetProjectOutputDocument($prjUid, $outputDocumentUid)
{
try {
$outputDocument = new \BusinessModel\OutputDocument();
$outputDocument = new \ProcessMaker\BusinessModel\OutputDocument();
$objectData = $outputDocument->getOutputDocument($prjUid, $outputDocumentUid);
//Response
$response = $objectData;
@@ -62,7 +62,7 @@ class OutputDocuments extends Api
{
try {
$request_data = (array)($request_data);
$outputDocument = new \BusinessModel\OutputDocument();
$outputDocument = new \ProcessMaker\BusinessModel\OutputDocument();
$arrayData = $outputDocument->addOutputDocument($prjUid, $request_data);
//Response
$response = $arrayData;
@@ -85,7 +85,7 @@ class OutputDocuments extends Api
{
try {
$request_data = (array)($request_data);
$outputDocument = new \BusinessModel\OutputDocument();
$outputDocument = new \ProcessMaker\BusinessModel\OutputDocument();
$arrayData = $outputDocument->updateOutputDocument($prjUid, $request_data, $outputDocumentUid, 0);
} catch (\Exception $e) {
//Response
@@ -102,7 +102,7 @@ class OutputDocuments extends Api
public function doDeleteProjectOutputDocument($prjUid, $outputDocumentUid)
{
try {
$outputDocument = new \BusinessModel\OutputDocument();
$outputDocument = new \ProcessMaker\BusinessModel\OutputDocument();
$outputDocument->deleteOutputDocument($prjUid, $outputDocumentUid);
} catch (\Exception $e) {
//Response

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -28,7 +28,7 @@ class ProcessPermissions extends Api
public function doGetProcessPermissions($prj_uid)
{
try {
$processPermissions = new \BusinessModel\ProcessPermissions();
$processPermissions = new \ProcessMaker\BusinessModel\ProcessPermissions();
$response = $processPermissions->getProcessPermissions($prj_uid);
return $response;
} catch (\Exception $e) {
@@ -51,7 +51,7 @@ class ProcessPermissions extends Api
public function doGetProcessPermission($prj_uid, $ob_uid)
{
try {
$processPermissions = new \BusinessModel\ProcessPermissions();
$processPermissions = new \ProcessMaker\BusinessModel\ProcessPermissions();
$response = $processPermissions->getProcessPermissions($prj_uid, $ob_uid);
return $response;
} catch (\Exception $e) {
@@ -104,7 +104,7 @@ class ProcessPermissions extends Api
'object_type', 'object', 'participated', 'action'
);
$request_data['pro_uid'] = $prj_uid;
$processPermissions = new \BusinessModel\ProcessPermissions();
$processPermissions = new \ProcessMaker\BusinessModel\ProcessPermissions();
$response = $processPermissions->saveProcessPermission($request_data);
foreach ($response as $key => $eventData) {
if (in_array($key, $hiddenFields)) {
@@ -160,7 +160,7 @@ class ProcessPermissions extends Api
) {
try {
$request_data['pro_uid'] = $prj_uid;
$processPermissions = new \BusinessModel\ProcessPermissions();
$processPermissions = new \ProcessMaker\BusinessModel\ProcessPermissions();
$response = $processPermissions->saveProcessPermission($request_data, $ob_uid);
return $response;
} catch (\Exception $e) {
@@ -183,7 +183,7 @@ class ProcessPermissions extends Api
public function doDeleteProcessPermission($prj_uid, $ob_uid)
{
try {
$processPermissions = new \BusinessModel\ProcessPermissions();
$processPermissions = new \ProcessMaker\BusinessModel\ProcessPermissions();
$response = $processPermissions->deleteProcessPermission($ob_uid, $prj_uid);
return $response;
} catch (\Exception $e) {

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -19,7 +19,7 @@ class ProcessSupervisors extends Api
public function doGetProcessSupervisors($prjUid)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$arrayData = $supervisor->getProcessSupervisors($prjUid);
//Response
$response = $arrayData;
@@ -39,7 +39,7 @@ class ProcessSupervisors extends Api
public function doGetProcessSupervisor($prjUid, $puUid)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$objectData = $supervisor->getProcessSupervisor($prjUid, $puUid);
//Response
$response = $objectData;
@@ -59,7 +59,7 @@ class ProcessSupervisors extends Api
public function doGetAvailableSupervisors($prjUid, $obj_type = '')
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$arrayData = $supervisor->getAvailableProcessSupervisors($obj_type, $prjUid);
//Response
$response = $arrayData;
@@ -79,7 +79,7 @@ class ProcessSupervisors extends Api
public function doGetProcessSupervisorDynaforms($prjUid)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$arrayData = $supervisor->getProcessSupervisorDynaforms($prjUid);
//Response
$response = $arrayData;
@@ -99,7 +99,7 @@ class ProcessSupervisors extends Api
public function doGetProcessSupervisorDynaform($prjUid, $pudUid)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$objectData = $supervisor->getProcessSupervisorDynaform($prjUid, $pudUid);
//Response
$response = $objectData;
@@ -118,7 +118,7 @@ class ProcessSupervisors extends Api
public function doGetAvailableProcessSupervisorDynaform($prjUid)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$arrayData = $supervisor->getAvailableProcessSupervisorDynaform($prjUid);
//Response
$response = $arrayData;
@@ -137,7 +137,7 @@ class ProcessSupervisors extends Api
public function doGetProcessSupervisorInputDocuments($prjUid)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$arrayData = $supervisor->getProcessSupervisorInputDocuments($prjUid);
//Response
$response = $arrayData;
@@ -157,7 +157,7 @@ class ProcessSupervisors extends Api
public function doGetProcessSupervisorInputDocument($prjUid, $puiUid)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$objectData = $supervisor->getProcessSupervisorInputDocument($prjUid, $puiUid);
//Response
$response = $objectData;
@@ -176,7 +176,7 @@ class ProcessSupervisors extends Api
public function doGetAvailableProcessSupervisorInputDocument($prjUid)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$arrayData = $supervisor->getAvailableProcessSupervisorInputDocument($prjUid);
//Response
$response = $arrayData;
@@ -199,7 +199,7 @@ class ProcessSupervisors extends Api
public function doPostProcessSupervisor($prjUid, $usr_uid, $pu_type)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$objectData = $supervisor->addProcessSupervisor($prjUid, $usr_uid, $pu_type);
//Response
$response = $objectData;
@@ -222,7 +222,7 @@ class ProcessSupervisors extends Api
public function doPostProcessSupervisorDynaform($prjUid, $dyn_uid, $pud_position=null)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$objectData = $supervisor->addProcessSupervisorDynaform($prjUid, $dyn_uid, $pud_position);
//Response
$response = $objectData;
@@ -245,7 +245,7 @@ class ProcessSupervisors extends Api
public function doPostProcessSupervisorInputDocument($prjUid, $inp_doc_uid, $pui_position=null)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$objectData = $supervisor->addProcessSupervisorInputDocument($prjUid, $inp_doc_uid, $pui_position);
//Response
$response = $objectData;
@@ -266,7 +266,7 @@ class ProcessSupervisors extends Api
public function doDeleteSupervisor($prjUid, $puUid)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$supervisor->removeProcessSupervisor($prjUid, $puUid);
} catch (\Exception $e) {
//response
@@ -284,7 +284,7 @@ class ProcessSupervisors extends Api
public function doDeleteDynaformSupervisor($prjUid, $pudUid)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$supervisor->removeDynaformSupervisor($prjUid, $pudUid);
ob_end_clean();
} catch (\Exception $e) {
@@ -303,7 +303,7 @@ class ProcessSupervisors extends Api
public function doDeleteInputDocumentSupervisor($prjUid, $puiUid)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$supervisor->removeInputDocumentSupervisor($prjUid, $puiUid);
ob_end_clean();
} catch (\Exception $e) {
@@ -324,7 +324,7 @@ class ProcessSupervisors extends Api
public function doPutProcessSupervisorDynaform($prjUid, $pud_uid, $pud_position = null)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$objectData = $supervisor->updateProcessSupervisorDynaform($prjUid, $pud_uid, $pud_position);
//Response
$response = $objectData;
@@ -347,7 +347,7 @@ class ProcessSupervisors extends Api
public function doPutProcessSupervisorInputDocument($prjUid, $pui_uid, $pui_position = null)
{
try {
$supervisor = new \BusinessModel\ProcessSupervisor();
$supervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$objectData = $supervisor->updateProcessSupervisorInputDocument($prjUid, $pui_uid, $pui_position);
//Response
$response = $objectData;

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -19,7 +19,7 @@ class ProjectUsers extends Api
public function doGetProjectUsers($prj_uid)
{
try {
$users = new \BusinessModel\ProjectUser();
$users = new \ProcessMaker\BusinessModel\ProjectUser();
$arrayData = $users->getProjectUsers($prj_uid);
//Response
$response = $arrayData;
@@ -38,7 +38,7 @@ class ProjectUsers extends Api
public function doGetProjectStartingTasks($prj_uid)
{
try {
$startingTasks = new \BusinessModel\ProjectUser();
$startingTasks = new \ProcessMaker\BusinessModel\ProjectUser();
$arrayData = $startingTasks->getProjectStartingTasks($prj_uid);
//Response
$response = $arrayData;
@@ -58,7 +58,7 @@ class ProjectUsers extends Api
public function doGetProjectStartingTaskUsers($prj_uid, $usr_uid)
{
try {
$startingTasks = new \BusinessModel\ProjectUser();
$startingTasks = new \ProcessMaker\BusinessModel\ProjectUser();
$arrayData = $startingTasks->getProjectStartingTaskUsers($prj_uid, $usr_uid);
//Response
$response = $arrayData;
@@ -80,7 +80,7 @@ class ProjectUsers extends Api
{
try {
$request_data = (array)($request_data);
$user = new \BusinessModel\ProjectUser();
$user = new \ProcessMaker\BusinessModel\ProjectUser();
$objectData = $user->postProjectWsUserCanStartTask($prj_uid, $act_uid, $request_data);
//Response
$response = $objectData;

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -26,7 +26,7 @@ class ReportTable extends Api
public function doGetReportTables($prj_uid)
{
try {
$oReportTable = new \BusinessModel\Table();
$oReportTable = new \ProcessMaker\BusinessModel\Table();
$response = $oReportTable->getTables($prj_uid, true);
return $response;
} catch (\Exception $e) {
@@ -46,7 +46,7 @@ class ReportTable extends Api
public function doGetReportTable($prj_uid, $rep_uid)
{
try {
$oReportTable = new \BusinessModel\Table();
$oReportTable = new \ProcessMaker\BusinessModel\Table();
$response = $oReportTable->getTable($rep_uid, $prj_uid, true);
return $response;
} catch (\Exception $e) {
@@ -66,7 +66,7 @@ class ReportTable extends Api
public function doGetPopulateReportTable($prj_uid, $rep_uid)
{
try {
$oReportTable = new \BusinessModel\Table();
$oReportTable = new \ProcessMaker\BusinessModel\Table();
$response = $oReportTable->generateDataReport($prj_uid, $rep_uid);
return $response;
} catch (\Exception $e) {
@@ -86,7 +86,7 @@ class ReportTable extends Api
public function doGetReportTableData($prj_uid, $rep_uid)
{
try {
$oReportTable = new \BusinessModel\Table();
$oReportTable = new \ProcessMaker\BusinessModel\Table();
$response = $oReportTable->getTableData($rep_uid, $prj_uid, true);
return $response;
} catch (\Exception $e) {
@@ -121,7 +121,7 @@ class ReportTable extends Api
$rep_tab_grid = ''
) {
try {
$oReportTable = new \BusinessModel\Table();
$oReportTable = new \ProcessMaker\BusinessModel\Table();
$response = $oReportTable->saveTable($request_data, $prj_uid, true);
if (isset($response['pro_uid'])) {
unset($response['pro_uid']);
@@ -153,7 +153,7 @@ class ReportTable extends Api
) {
try {
$request_data['rep_uid'] = $rep_uid;
$oReportTable = new \BusinessModel\Table();
$oReportTable = new \ProcessMaker\BusinessModel\Table();
$response = $oReportTable->updateTable($request_data, $prj_uid, true);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -173,7 +173,7 @@ class ReportTable extends Api
public function doDeleteReportTable($prj_uid, $rep_uid)
{
try {
$oReportTable = new \BusinessModel\Table();
$oReportTable = new \ProcessMaker\BusinessModel\Table();
$response = $oReportTable->deleteTable($rep_uid, $prj_uid, true);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -29,7 +29,7 @@ class Subprocess extends Api
{
try {
$hiddenFields = array('spr_uid', 'spr_pro_parent', 'spr_tas_parent');
$oSubProcess = new \BusinessModel\Subprocess();
$oSubProcess = new \ProcessMaker\BusinessModel\Subprocess();
$response = $oSubProcess->getSubprocesss($prj_uid, $tas_uid);
foreach ($response as $key => $value) {
if (in_array($key, $hiddenFields)) {
@@ -57,7 +57,7 @@ class Subprocess extends Api
public function doPutSubprocess($prj_uid, $tas_uid, $request_data)
{
try {
$oSubProcess = new \BusinessModel\Subprocess();
$oSubProcess = new \ProcessMaker\BusinessModel\Subprocess();
$oSubProcess->putSubprocesss($prj_uid, $tas_uid, $request_data);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -26,7 +26,7 @@ class Trigger extends Api
public function doGetTriggers($projectUid)
{
try {
$trigger = new \BusinessModel\Trigger();
$trigger = new \ProcessMaker\BusinessModel\Trigger();
$response = $trigger->getTriggers($projectUid);
return $response;
} catch (\Exception $e) {
@@ -46,7 +46,7 @@ class Trigger extends Api
public function doGetTrigger($projectUid, $triggerUid)
{
try {
$trigger = new \BusinessModel\Trigger();
$trigger = new \ProcessMaker\BusinessModel\Trigger();
$response = $trigger->getDataTrigger($triggerUid);
return $response;
} catch (\Exception $e) {
@@ -73,7 +73,7 @@ class Trigger extends Api
public function doPostTrigger($projectUid, $request_data, $tri_title, $tri_description = '', $tri_type = 'SCRIPT', $tri_webbot = '', $tri_param = '')
{
try {
$trigger = new \BusinessModel\Trigger();
$trigger = new \ProcessMaker\BusinessModel\Trigger();
$response = $trigger->saveTrigger($projectUid, $request_data, true);
return $response;
} catch (\Exception $e) {
@@ -101,7 +101,7 @@ class Trigger extends Api
{
try {
$request_data['tri_uid'] = $triggerUid;
$trigger = new \BusinessModel\Trigger();
$trigger = new \ProcessMaker\BusinessModel\Trigger();
$trigger->saveTrigger($projectUid, $request_data, false, $triggerUid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -121,7 +121,7 @@ class Trigger extends Api
public function doDeleteTrigger($projectUid, $triggerUid)
{
try {
$trigger = new \BusinessModel\Trigger();
$trigger = new \ProcessMaker\BusinessModel\Trigger();
$response = $trigger->deleteTrigger($triggerUid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -30,7 +30,7 @@ class TriggerWizard extends Api
public function doGetTriggerWizard($prj_uid, $lib_name, $fn_name = "")
{
try {
$triggerWizard = new \BusinessModel\TriggerWizard();
$triggerWizard = new \ProcessMaker\BusinessModel\TriggerWizard();
$triggerWizard->setFormatFieldNameInUppercase($this->formatFieldNameInUppercase);
$triggerWizard->setArrayFieldNameForException($this->arrayFieldNameForException);
@@ -53,7 +53,7 @@ class TriggerWizard extends Api
public function doGetTriggerWizardTrigger($prj_uid, $lib_name, $fn_name, $tri_uid)
{
try {
$triggerWizard = new \BusinessModel\TriggerWizard();
$triggerWizard = new \ProcessMaker\BusinessModel\TriggerWizard();
$triggerWizard->setFormatFieldNameInUppercase($this->formatFieldNameInUppercase);
$triggerWizard->setArrayFieldNameForException($this->arrayFieldNameForException);
@@ -78,7 +78,7 @@ class TriggerWizard extends Api
public function doPostTriggerWizard($prj_uid, $lib_name, $fn_name, $request_data)
{
try {
$triggerWizard = new \BusinessModel\TriggerWizard();
$triggerWizard = new \ProcessMaker\BusinessModel\TriggerWizard();
$triggerWizard->setFormatFieldNameInUppercase($this->formatFieldNameInUppercase);
$triggerWizard->setArrayFieldNameForException($this->arrayFieldNameForException);
@@ -104,7 +104,7 @@ class TriggerWizard extends Api
public function doPutTriggerWizard($prj_uid, $lib_name, $fn_name, $tri_uid, $request_data)
{
try {
$triggerWizard = new \BusinessModel\TriggerWizard();
$triggerWizard = new \ProcessMaker\BusinessModel\TriggerWizard();
$triggerWizard->setFormatFieldNameInUppercase($this->formatFieldNameInUppercase);
$triggerWizard->setArrayFieldNameForException($this->arrayFieldNameForException);

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker\Project;
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -21,7 +21,7 @@ class WebEntry extends Api
public function doGetWebEntry($dyn_uid, $tas_uid, $prj_uid)
{
try {
$webEntry = new \BusinessModel\WebEntry();
$webEntry = new \ProcessMaker\BusinessModel\WebEntry();
$webEntry->setFormatFieldNameInUppercase(false);
$webEntry->setArrayFieldNameForException(array("processUid" => "prj_uid"));
@@ -44,7 +44,7 @@ class WebEntry extends Api
public function doPostWebEntry($prj_uid, $request_data)
{
try {
$webEntry = new \BusinessModel\WebEntry();
$webEntry = new \ProcessMaker\BusinessModel\WebEntry();
$webEntry->setFormatFieldNameInUppercase(false);
$webEntry->setArrayFieldNameForException(array("processUid" => "prj_uid"));
@@ -68,7 +68,7 @@ class WebEntry extends Api
public function doDeleteWebEntry($dyn_uid, $tas_uid, $prj_uid)
{
try {
$webEntry = new \BusinessModel\WebEntry();
$webEntry = new \ProcessMaker\BusinessModel\WebEntry();
$webEntry->setFormatFieldNameInUppercase(false);
$webEntry->setArrayFieldNameForException(array("processUid" => "prj_uid"));

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -22,7 +22,7 @@ class System extends Api
public function doGetDataBaseEngines()
{
try {
$oDBConnection = new \BusinessModel\DataBaseConnection();
$oDBConnection = new \ProcessMaker\BusinessModel\DataBaseConnection();
$response = $oDBConnection->getDbEngines();
return $response;
} catch (\Exception $e) {

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
class Type
{

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\ProcessMaker;
namespace ProcessMaker\Services\Api;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
@@ -20,7 +20,7 @@ class User extends Api
public function doGetUsers($filter = '', $start = null, $limit = null)
{
try {
$user = new \BusinessModel\User();
$user = new \ProcessMaker\BusinessModel\User();
$response = $user->getUsers($filter, $start, $limit);
return $response;
} catch (\Exception $e) {
@@ -36,7 +36,7 @@ class User extends Api
public function doGetUser($usr_uid)
{
try {
$user = new \BusinessModel\User();
$user = new \ProcessMaker\BusinessModel\User();
$response = $user->getUser($usr_uid);
return $response;
} catch (\Exception $e) {
@@ -54,7 +54,7 @@ class User extends Api
public function doPostUser($request_data)
{
try {
$user = new \BusinessModel\User();
$user = new \ProcessMaker\BusinessModel\User();
$arrayData = $user->create($request_data);
$response = $arrayData;
return $response;
@@ -73,7 +73,7 @@ class User extends Api
{
try {
$userLoggedUid = $this->getUserId();
$user = new \BusinessModel\User();
$user = new \ProcessMaker\BusinessModel\User();
$arrayData = $user->update($usr_uid, $request_data, $userLoggedUid);
$response = $arrayData;
return $response;
@@ -90,7 +90,7 @@ class User extends Api
public function doDeleteUser($usr_uid)
{
try {
$user = new \BusinessModel\User();
$user = new \ProcessMaker\BusinessModel\User();
$user->delete($usr_uid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -105,7 +105,7 @@ class User extends Api
public function doPostUserImageUpload($usr_uid)
{
try {
$user = new \BusinessModel\User();
$user = new \ProcessMaker\BusinessModel\User();
$user->uploadImage($usr_uid);
} catch (\Exception $e) {
//response

View File

@@ -1,6 +1,6 @@
<?php
namespace Services\Api\OAuth2;
namespace ProcessMaker\Services\OAuth2;
/**
* Simple PmPDO storage for all storage types

View File

@@ -1,5 +1,5 @@
<?php
namespace Services\Api\OAuth2;
namespace ProcessMaker\Services\OAuth2;
use Luracast\Restler\iAuthenticate;