working in the REST API, rebuilding classes for all tables and fixing small errors
This commit is contained in:
@@ -259,7 +259,9 @@ EOT;
|
||||
));
|
||||
|
||||
$c = 0;
|
||||
foreach ($this->config['_tables'] as $table => $conf) {
|
||||
//print_r ($this->config);die;
|
||||
//foreach ($this->config['_tables'] as $table => $conf) {
|
||||
foreach ($this->config as $table => $conf) {
|
||||
$classname = self::camelize($table, 'class');
|
||||
$allowedMethods = explode(' ', $conf['ALLOW_METHODS']);
|
||||
$methods = '';
|
||||
|
||||
@@ -10,7 +10,15 @@
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
{% for column in columns %}$criteria->addSelectColumn({{ classname }}Peer::{{column}});
|
||||
@@ -23,11 +31,26 @@
|
||||
}
|
||||
} else {
|
||||
$record = {{ classname }}Peer::retrieveByPK({{ primaryKeys }});
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table {{ classname }} ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ class Services_Rest_Auth implements iAuthenticate
|
||||
|
||||
function __isAuthenticated()
|
||||
{
|
||||
return true;
|
||||
if (array_key_exists('HTTP_AUTH_KEY', $_SERVER)) {
|
||||
$authKey = $_SERVER['HTTP_AUTH_KEY'];
|
||||
} elseif (array_key_exists('auth_key', $_GET)) {
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_AdditionalTables
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_UID);
|
||||
@@ -42,12 +50,27 @@ class Services_Rest_AdditionalTables
|
||||
}
|
||||
} else {
|
||||
$record = AdditionalTablesPeer::retrieveByPK($addTabUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table AdditionalTables ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_AppCacheView
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(AppCacheViewPeer::APP_UID);
|
||||
@@ -56,12 +64,27 @@ class Services_Rest_AppCacheView
|
||||
}
|
||||
} else {
|
||||
$record = AppCacheViewPeer::retrieveByPK($appUid, $delIndex);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table AppCacheView ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_AppDelay
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(AppDelayPeer::APP_DELAY_UID);
|
||||
@@ -40,12 +48,27 @@ class Services_Rest_AppDelay
|
||||
}
|
||||
} else {
|
||||
$record = AppDelayPeer::retrieveByPK($appDelayUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table AppDelay ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_AppDelegation
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(AppDelegationPeer::APP_UID);
|
||||
@@ -48,12 +56,27 @@ class Services_Rest_AppDelegation
|
||||
}
|
||||
} else {
|
||||
$record = AppDelegationPeer::retrieveByPK($appUid, $delIndex);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table AppDelegation ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_AppDocument
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(AppDocumentPeer::APP_DOC_UID);
|
||||
@@ -40,12 +48,27 @@ class Services_Rest_AppDocument
|
||||
}
|
||||
} else {
|
||||
$record = AppDocumentPeer::retrieveByPK($appDocUid, $docVersion);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table AppDocument ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_AppEvent
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(AppEventPeer::APP_UID);
|
||||
@@ -33,12 +41,27 @@ class Services_Rest_AppEvent
|
||||
}
|
||||
} else {
|
||||
$record = AppEventPeer::retrieveByPK($appUid, $delIndex, $evnUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table AppEvent ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_AppFolder
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(AppFolderPeer::FOLDER_UID);
|
||||
@@ -31,12 +39,27 @@ class Services_Rest_AppFolder
|
||||
}
|
||||
} else {
|
||||
$record = AppFolderPeer::retrieveByPK($folderUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table AppFolder ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_AppHistory
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(AppHistoryPeer::APP_UID);
|
||||
@@ -35,12 +43,27 @@ class Services_Rest_AppHistory
|
||||
}
|
||||
} else {
|
||||
$record = AppHistoryPeer::retrieveByPK();
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table AppHistory ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_AppMessage
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(AppMessagePeer::APP_MSG_UID);
|
||||
@@ -42,12 +50,27 @@ class Services_Rest_AppMessage
|
||||
}
|
||||
} else {
|
||||
$record = AppMessagePeer::retrieveByPK($appMsgUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table AppMessage ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_AppNotes
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(AppNotesPeer::APP_UID);
|
||||
@@ -36,12 +44,27 @@ class Services_Rest_AppNotes
|
||||
}
|
||||
} else {
|
||||
$record = AppNotesPeer::retrieveByPK();
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table AppNotes ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_AppOwner
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(AppOwnerPeer::APP_UID);
|
||||
@@ -29,12 +37,27 @@ class Services_Rest_AppOwner
|
||||
}
|
||||
} else {
|
||||
$record = AppOwnerPeer::retrieveByPK($appUid, $ownUid, $usrUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table AppOwner ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_AppSolrQueue
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(AppSolrQueuePeer::APP_UID);
|
||||
@@ -28,12 +36,27 @@ class Services_Rest_AppSolrQueue
|
||||
}
|
||||
} else {
|
||||
$record = AppSolrQueuePeer::retrieveByPK($appUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table AppSolrQueue ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_AppThread
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(AppThreadPeer::APP_UID);
|
||||
@@ -31,12 +39,27 @@ class Services_Rest_AppThread
|
||||
}
|
||||
} else {
|
||||
$record = AppThreadPeer::retrieveByPK($appUid, $appThreadIndex);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table AppThread ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Application
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(ApplicationPeer::APP_UID);
|
||||
@@ -42,14 +50,129 @@ class Services_Rest_Application
|
||||
}
|
||||
} else {
|
||||
$record = ApplicationPeer::retrieveByPK($appUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Application ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function post($appUid, $appNumber, $appParent, $appStatus, $proUid, $appProcStatus, $appProcCode, $appParallel, $appInitUser, $appCurUser, $appCreateDate, $appInitDate, $appFinishDate, $appUpdateDate, $appData, $appPin)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Application();
|
||||
|
||||
$obj->setAppUid($appUid);
|
||||
$obj->setAppNumber($appNumber);
|
||||
$obj->setAppParent($appParent);
|
||||
$obj->setAppStatus($appStatus);
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setAppProcStatus($appProcStatus);
|
||||
$obj->setAppProcCode($appProcCode);
|
||||
$obj->setAppParallel($appParallel);
|
||||
$obj->setAppInitUser($appInitUser);
|
||||
$obj->setAppCurUser($appCurUser);
|
||||
$obj->setAppCreateDate($appCreateDate);
|
||||
$obj->setAppInitDate($appInitDate);
|
||||
$obj->setAppFinishDate($appFinishDate);
|
||||
$obj->setAppUpdateDate($appUpdateDate);
|
||||
$obj->setAppData($appData);
|
||||
$obj->setAppPin($appPin);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function put($appUid, $appNumber, $appParent, $appStatus, $proUid, $appProcStatus, $appProcCode, $appParallel, $appInitUser, $appCurUser, $appCreateDate, $appInitDate, $appFinishDate, $appUpdateDate, $appData, $appPin)
|
||||
{
|
||||
try {
|
||||
$obj = ApplicationPeer::retrieveByPK($appUid);
|
||||
|
||||
$obj->setAppNumber($appNumber);
|
||||
$obj->setAppParent($appParent);
|
||||
$obj->setAppStatus($appStatus);
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setAppProcStatus($appProcStatus);
|
||||
$obj->setAppProcCode($appProcCode);
|
||||
$obj->setAppParallel($appParallel);
|
||||
$obj->setAppInitUser($appInitUser);
|
||||
$obj->setAppCurUser($appCurUser);
|
||||
$obj->setAppCreateDate($appCreateDate);
|
||||
$obj->setAppInitDate($appInitDate);
|
||||
$obj->setAppFinishDate($appFinishDate);
|
||||
$obj->setAppUpdateDate($appUpdateDate);
|
||||
$obj->setAppData($appData);
|
||||
$obj->setAppPin($appPin);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function delete($appUid)
|
||||
{
|
||||
$conn = Propel::getConnection(ApplicationPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = ApplicationPeer::retrieveByPK($appUid);
|
||||
if (! is_object($obj)) {
|
||||
throw new RestException(412, 'Record does not exist.');
|
||||
}
|
||||
$obj->delete();
|
||||
|
||||
$conn->commit();
|
||||
} catch (Exception $e) {
|
||||
$conn->rollback();
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_CalendarAssignments
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(CalendarAssignmentsPeer::OBJECT_UID);
|
||||
@@ -29,12 +37,27 @@ class Services_Rest_CalendarAssignments
|
||||
}
|
||||
} else {
|
||||
$record = CalendarAssignmentsPeer::retrieveByPK($objectUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table CalendarAssignments ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_CalendarBusinessHours
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(CalendarBusinessHoursPeer::CALENDAR_UID);
|
||||
@@ -30,12 +38,27 @@ class Services_Rest_CalendarBusinessHours
|
||||
}
|
||||
} else {
|
||||
$record = CalendarBusinessHoursPeer::retrieveByPK($calendarUid, $calendarBusinessDay, $calendarBusinessStart, $calendarBusinessEnd);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table CalendarBusinessHours ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_CalendarDefinition
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(CalendarDefinitionPeer::CALENDAR_UID);
|
||||
@@ -33,12 +41,27 @@ class Services_Rest_CalendarDefinition
|
||||
}
|
||||
} else {
|
||||
$record = CalendarDefinitionPeer::retrieveByPK($calendarUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table CalendarDefinition ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_CalendarHolidays
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(CalendarHolidaysPeer::CALENDAR_UID);
|
||||
@@ -30,12 +38,27 @@ class Services_Rest_CalendarHolidays
|
||||
}
|
||||
} else {
|
||||
$record = CalendarHolidaysPeer::retrieveByPK($calendarUid, $calendarHolidayName);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table CalendarHolidays ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_CaseScheduler
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(CaseSchedulerPeer::SCH_UID);
|
||||
@@ -51,12 +59,27 @@ class Services_Rest_CaseScheduler
|
||||
}
|
||||
} else {
|
||||
$record = CaseSchedulerPeer::retrieveByPK($schUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table CaseScheduler ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_CaseTracker
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(CaseTrackerPeer::PRO_UID);
|
||||
@@ -30,12 +38,27 @@ class Services_Rest_CaseTracker
|
||||
}
|
||||
} else {
|
||||
$record = CaseTrackerPeer::retrieveByPK($proUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table CaseTracker ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_CaseTrackerObject
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(CaseTrackerObjectPeer::CTO_UID);
|
||||
@@ -32,12 +40,27 @@ class Services_Rest_CaseTrackerObject
|
||||
}
|
||||
} else {
|
||||
$record = CaseTrackerObjectPeer::retrieveByPK($ctoUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table CaseTrackerObject ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Configuration
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(ConfigurationPeer::CFG_UID);
|
||||
@@ -32,12 +40,27 @@ class Services_Rest_Configuration
|
||||
}
|
||||
} else {
|
||||
$record = ConfigurationPeer::retrieveByPK($cfgUid, $objUid, $proUid, $usrUid, $appUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Configuration ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Content
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(ContentPeer::CON_CATEGORY);
|
||||
@@ -31,12 +39,27 @@ class Services_Rest_Content
|
||||
}
|
||||
} else {
|
||||
$record = ContentPeer::retrieveByPK($conCategory, $conParent, $conId, $conLang);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Content ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Dashlet
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(DashletPeer::DAS_UID);
|
||||
@@ -34,12 +42,27 @@ class Services_Rest_Dashlet
|
||||
}
|
||||
} else {
|
||||
$record = DashletPeer::retrieveByPK($dasUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Dashlet ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_DashletInstance
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(DashletInstancePeer::DAS_INS_UID);
|
||||
@@ -34,12 +42,27 @@ class Services_Rest_DashletInstance
|
||||
}
|
||||
} else {
|
||||
$record = DashletInstancePeer::retrieveByPK($dasInsUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table DashletInstance ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_DbSource
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(DbSourcePeer::DBS_UID);
|
||||
@@ -35,12 +43,27 @@ class Services_Rest_DbSource
|
||||
}
|
||||
} else {
|
||||
$record = DbSourcePeer::retrieveByPK($dbsUid, $proUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table DbSource ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Department
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(DepartmentPeer::DEP_UID);
|
||||
@@ -33,12 +41,27 @@ class Services_Rest_Department
|
||||
}
|
||||
} else {
|
||||
$record = DepartmentPeer::retrieveByPK($depUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Department ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_DimTimeComplete
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(DimTimeCompletePeer::TIME_ID);
|
||||
@@ -34,12 +42,27 @@ class Services_Rest_DimTimeComplete
|
||||
}
|
||||
} else {
|
||||
$record = DimTimeCompletePeer::retrieveByPK($timeId);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table DimTimeComplete ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_DimTimeDelegate
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(DimTimeDelegatePeer::TIME_ID);
|
||||
@@ -34,12 +42,27 @@ class Services_Rest_DimTimeDelegate
|
||||
}
|
||||
} else {
|
||||
$record = DimTimeDelegatePeer::retrieveByPK($timeId);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table DimTimeDelegate ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Dynaform
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(DynaformPeer::DYN_UID);
|
||||
@@ -30,12 +38,27 @@ class Services_Rest_Dynaform
|
||||
}
|
||||
} else {
|
||||
$record = DynaformPeer::retrieveByPK($dynUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Dynaform ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Event
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(EventPeer::EVN_UID);
|
||||
@@ -46,12 +54,27 @@ class Services_Rest_Event
|
||||
}
|
||||
} else {
|
||||
$record = EventPeer::retrieveByPK($evnUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Event ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_FieldCondition
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(FieldConditionPeer::FCD_UID);
|
||||
@@ -34,12 +42,27 @@ class Services_Rest_FieldCondition
|
||||
}
|
||||
} else {
|
||||
$record = FieldConditionPeer::retrieveByPK($fcdUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table FieldCondition ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Fields
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(FieldsPeer::FLD_UID);
|
||||
@@ -41,12 +49,27 @@ class Services_Rest_Fields
|
||||
}
|
||||
} else {
|
||||
$record = FieldsPeer::retrieveByPK($fldUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Fields ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Gateway
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(GatewayPeer::GAT_UID);
|
||||
@@ -33,12 +41,27 @@ class Services_Rest_Gateway
|
||||
}
|
||||
} else {
|
||||
$record = GatewayPeer::retrieveByPK($gatUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Gateway ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_GroupUser
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(GroupUserPeer::GRP_UID);
|
||||
@@ -28,12 +36,27 @@ class Services_Rest_GroupUser
|
||||
}
|
||||
} else {
|
||||
$record = GroupUserPeer::retrieveByPK($grpUid, $usrUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table GroupUser ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Groupwf
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(GroupwfPeer::GRP_UID);
|
||||
@@ -30,12 +38,27 @@ class Services_Rest_Groupwf
|
||||
}
|
||||
} else {
|
||||
$record = GroupwfPeer::retrieveByPK($grpUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Groupwf ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Holiday
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(HolidayPeer::HLD_UID);
|
||||
@@ -29,12 +37,27 @@ class Services_Rest_Holiday
|
||||
}
|
||||
} else {
|
||||
$record = HolidayPeer::retrieveByPK($hldUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Holiday ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_InputDocument
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(InputDocumentPeer::INP_DOC_UID);
|
||||
@@ -34,12 +42,27 @@ class Services_Rest_InputDocument
|
||||
}
|
||||
} else {
|
||||
$record = InputDocumentPeer::retrieveByPK($inpDocUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table InputDocument ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_IsoCountry
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(IsoCountryPeer::IC_UID);
|
||||
@@ -29,12 +37,27 @@ class Services_Rest_IsoCountry
|
||||
}
|
||||
} else {
|
||||
$record = IsoCountryPeer::retrieveByPK($icUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table IsoCountry ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_IsoLocation
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(IsoLocationPeer::IC_UID);
|
||||
@@ -31,12 +39,27 @@ class Services_Rest_IsoLocation
|
||||
}
|
||||
} else {
|
||||
$record = IsoLocationPeer::retrieveByPK($icUid, $ilUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table IsoLocation ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_IsoSubdivision
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(IsoSubdivisionPeer::IC_UID);
|
||||
@@ -29,12 +37,27 @@ class Services_Rest_IsoSubdivision
|
||||
}
|
||||
} else {
|
||||
$record = IsoSubdivisionPeer::retrieveByPK($icUid, $isUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table IsoSubdivision ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Language
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(LanguagePeer::LAN_ID);
|
||||
@@ -33,12 +41,27 @@ class Services_Rest_Language
|
||||
}
|
||||
} else {
|
||||
$record = LanguagePeer::retrieveByPK($lanId);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Language ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Lexico
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(LexicoPeer::LEX_TOPIC);
|
||||
@@ -30,12 +38,27 @@ class Services_Rest_Lexico
|
||||
}
|
||||
} else {
|
||||
$record = LexicoPeer::retrieveByPK($lexTopic, $lexKey);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Lexico ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_LogCasesScheduler
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(LogCasesSchedulerPeer::LOG_CASE_UID);
|
||||
@@ -36,12 +44,27 @@ class Services_Rest_LogCasesScheduler
|
||||
}
|
||||
} else {
|
||||
$record = LogCasesSchedulerPeer::retrieveByPK($logCaseUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table LogCasesScheduler ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_LoginLog
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(LoginLogPeer::LOG_UID);
|
||||
@@ -34,12 +42,27 @@ class Services_Rest_LoginLog
|
||||
}
|
||||
} else {
|
||||
$record = LoginLogPeer::retrieveByPK($logUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table LoginLog ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_ObjectPermission
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(ObjectPermissionPeer::OP_UID);
|
||||
@@ -37,12 +45,27 @@ class Services_Rest_ObjectPermission
|
||||
}
|
||||
} else {
|
||||
$record = ObjectPermissionPeer::retrieveByPK($opUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table ObjectPermission ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_OutputDocument
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(OutputDocumentPeer::OUT_DOC_UID);
|
||||
@@ -45,12 +53,27 @@ class Services_Rest_OutputDocument
|
||||
}
|
||||
} else {
|
||||
$record = OutputDocumentPeer::retrieveByPK($outDocUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table OutputDocument ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Process
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_UID);
|
||||
@@ -51,12 +59,27 @@ class Services_Rest_Process
|
||||
}
|
||||
} else {
|
||||
$record = ProcessPeer::retrieveByPK($proUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Process ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_ProcessCategory
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID);
|
||||
@@ -30,12 +38,27 @@ class Services_Rest_ProcessCategory
|
||||
}
|
||||
} else {
|
||||
$record = ProcessCategoryPeer::retrieveByPK($categoryUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table ProcessCategory ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_ProcessOwner
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(ProcessOwnerPeer::OWN_UID);
|
||||
@@ -28,12 +36,27 @@ class Services_Rest_ProcessOwner
|
||||
}
|
||||
} else {
|
||||
$record = ProcessOwnerPeer::retrieveByPK($ownUid, $proUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table ProcessOwner ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_ProcessUser
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(ProcessUserPeer::PU_UID);
|
||||
@@ -30,12 +38,27 @@ class Services_Rest_ProcessUser
|
||||
}
|
||||
} else {
|
||||
$record = ProcessUserPeer::retrieveByPK($puUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table ProcessUser ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_ReportTable
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(ReportTablePeer::REP_TAB_UID);
|
||||
@@ -34,12 +42,27 @@ class Services_Rest_ReportTable
|
||||
}
|
||||
} else {
|
||||
$record = ReportTablePeer::retrieveByPK($repTabUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table ReportTable ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_ReportVar
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(ReportVarPeer::REP_VAR_UID);
|
||||
@@ -31,12 +39,27 @@ class Services_Rest_ReportVar
|
||||
}
|
||||
} else {
|
||||
$record = ReportVarPeer::retrieveByPK($repVarUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table ReportVar ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Route
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(RoutePeer::ROU_UID);
|
||||
@@ -43,12 +51,27 @@ class Services_Rest_Route
|
||||
}
|
||||
} else {
|
||||
$record = RoutePeer::retrieveByPK($rouUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Route ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Session
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(SessionPeer::SES_UID);
|
||||
@@ -33,12 +41,27 @@ class Services_Rest_Session
|
||||
}
|
||||
} else {
|
||||
$record = SessionPeer::retrieveByPK($sesUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Session ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_ShadowTable
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(ShadowTablePeer::SHD_UID);
|
||||
@@ -33,12 +41,27 @@ class Services_Rest_ShadowTable
|
||||
}
|
||||
} else {
|
||||
$record = ShadowTablePeer::retrieveByPK($shdUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table ShadowTable ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Stage
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(StagePeer::STG_UID);
|
||||
@@ -31,12 +39,27 @@ class Services_Rest_Stage
|
||||
}
|
||||
} else {
|
||||
$record = StagePeer::retrieveByPK($stgUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Stage ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Step
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(StepPeer::STEP_UID);
|
||||
@@ -34,12 +42,27 @@ class Services_Rest_Step
|
||||
}
|
||||
} else {
|
||||
$record = StepPeer::retrieveByPK($stepUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Step ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_StepSupervisor
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(StepSupervisorPeer::STEP_UID);
|
||||
@@ -31,12 +39,27 @@ class Services_Rest_StepSupervisor
|
||||
}
|
||||
} else {
|
||||
$record = StepSupervisorPeer::retrieveByPK($stepUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table StepSupervisor ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_StepTrigger
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(StepTriggerPeer::STEP_UID);
|
||||
@@ -32,12 +40,27 @@ class Services_Rest_StepTrigger
|
||||
}
|
||||
} else {
|
||||
$record = StepTriggerPeer::retrieveByPK($stepUid, $tasUid, $triUid, $stType);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table StepTrigger ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_SubApplication
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(SubApplicationPeer::APP_UID);
|
||||
@@ -35,12 +43,27 @@ class Services_Rest_SubApplication
|
||||
}
|
||||
} else {
|
||||
$record = SubApplicationPeer::retrieveByPK($appUid, $appParent, $delIndexParent, $delThreadParent);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table SubApplication ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_SubProcess
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(SubProcessPeer::SP_UID);
|
||||
@@ -38,12 +46,27 @@ class Services_Rest_SubProcess
|
||||
}
|
||||
} else {
|
||||
$record = SubProcessPeer::retrieveByPK($spUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table SubProcess ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_SwimlanesElements
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(SwimlanesElementsPeer::SWI_UID);
|
||||
@@ -34,12 +42,27 @@ class Services_Rest_SwimlanesElements
|
||||
}
|
||||
} else {
|
||||
$record = SwimlanesElementsPeer::retrieveByPK($swiUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table SwimlanesElements ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Task
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(TaskPeer::PRO_UID);
|
||||
@@ -67,12 +75,27 @@ class Services_Rest_Task
|
||||
}
|
||||
} else {
|
||||
$record = TaskPeer::retrieveByPK($tasUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Task ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_TaskUser
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(TaskUserPeer::TAS_UID);
|
||||
@@ -30,12 +38,27 @@ class Services_Rest_TaskUser
|
||||
}
|
||||
} else {
|
||||
$record = TaskUserPeer::retrieveByPK($tasUid, $usrUid, $tuType, $tuRelation);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table TaskUser ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Translation
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(TranslationPeer::TRN_CATEGORY);
|
||||
@@ -31,12 +39,27 @@ class Services_Rest_Translation
|
||||
}
|
||||
} else {
|
||||
$record = TranslationPeer::retrieveByPK($trnCategory, $trnId, $trnLang);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Translation ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Triggers
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(TriggersPeer::TRI_UID);
|
||||
@@ -31,12 +39,27 @@ class Services_Rest_Triggers
|
||||
}
|
||||
} else {
|
||||
$record = TriggersPeer::retrieveByPK($triUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Triggers ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_Users
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(UsersPeer::USR_UID);
|
||||
@@ -52,12 +60,27 @@ class Services_Rest_Users
|
||||
}
|
||||
} else {
|
||||
$record = UsersPeer::retrieveByPK($usrUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table Users ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,15 @@ class Services_Rest_UsersProperties
|
||||
{
|
||||
$result = array();
|
||||
try {
|
||||
if (func_num_args() == 0) {
|
||||
$noArguments = true;
|
||||
$argumentList = func_get_args();
|
||||
foreach ($argumentList as $arg) {
|
||||
if (!is_null($arg)) {
|
||||
$noArguments = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($noArguments) {
|
||||
$criteria = new Criteria('workflow');
|
||||
|
||||
$criteria->addSelectColumn(UsersPropertiesPeer::USR_UID);
|
||||
@@ -30,12 +38,27 @@ class Services_Rest_UsersProperties
|
||||
}
|
||||
} else {
|
||||
$record = UsersPropertiesPeer::retrieveByPK($usrUid);
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
if ($record) {
|
||||
$result = $record->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
} else {
|
||||
$paramValues = "";
|
||||
foreach ($argumentList as $arg) {
|
||||
$paramValues .= (strlen($paramValues) ) ? ', ' : '';
|
||||
if (!is_null($arg)) {
|
||||
$paramValues .= "$arg";
|
||||
} else {
|
||||
$paramValues .= "NULL";
|
||||
}
|
||||
}
|
||||
throw new RestException(417, "table UsersProperties ($paramValues)" );
|
||||
}
|
||||
}
|
||||
} catch (RestException $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user