@@ -39,6 +39,7 @@ class Services_Rest_AppDocument
|
||||
$criteria->addSelectColumn(AppDocumentPeer::APP_DOC_TAGS);
|
||||
$criteria->addSelectColumn(AppDocumentPeer::APP_DOC_STATUS);
|
||||
$criteria->addSelectColumn(AppDocumentPeer::APP_DOC_STATUS_DATE);
|
||||
$criteria->addSelectColumn(AppDocumentPeer::APP_DOC_FIELDNAME);
|
||||
|
||||
$dataset = AppEventPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
@@ -61,5 +61,77 @@ class Services_Rest_AppOwner
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid, $ownUid, $usrUid 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, $ownUid, $usrUid)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new AppOwner();
|
||||
|
||||
$obj->setAppUid($appUid);
|
||||
$obj->setOwnUid($ownUid);
|
||||
$obj->setUsrUid($usrUid);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid, $ownUid, $usrUid 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, $ownUid, $usrUid)
|
||||
{
|
||||
try {
|
||||
$obj = AppOwnerPeer::retrieveByPK($appUid, $ownUid, $usrUid);
|
||||
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid, $ownUid, $usrUid 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, $ownUid, $usrUid)
|
||||
{
|
||||
$conn = Propel::getConnection(AppOwnerPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = AppOwnerPeer::retrieveByPK($appUid, $ownUid, $usrUid);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -63,5 +63,82 @@ class Services_Rest_AppThread
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid, $appThreadIndex 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, $appThreadIndex, $appThreadParent, $appThreadStatus, $delIndex)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new AppThread();
|
||||
|
||||
$obj->setAppUid($appUid);
|
||||
$obj->setAppThreadIndex($appThreadIndex);
|
||||
$obj->setAppThreadParent($appThreadParent);
|
||||
$obj->setAppThreadStatus($appThreadStatus);
|
||||
$obj->setDelIndex($delIndex);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid, $appThreadIndex 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, $appThreadIndex, $appThreadParent, $appThreadStatus, $delIndex)
|
||||
{
|
||||
try {
|
||||
$obj = AppThreadPeer::retrieveByPK($appUid, $appThreadIndex);
|
||||
|
||||
$obj->setAppThreadParent($appThreadParent);
|
||||
$obj->setAppThreadStatus($appThreadStatus);
|
||||
$obj->setDelIndex($delIndex);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid, $appThreadIndex 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, $appThreadIndex)
|
||||
{
|
||||
$conn = Propel::getConnection(AppThreadPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = AppThreadPeer::retrieveByPK($appUid, $appThreadIndex);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -74,5 +74,105 @@ class Services_Rest_Application
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -65,5 +65,87 @@ class Services_Rest_CalendarDefinition
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $calendarUid 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($calendarUid, $calendarName, $calendarCreateDate, $calendarUpdateDate, $calendarWorkDays, $calendarDescription, $calendarStatus)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new CalendarDefinition();
|
||||
|
||||
$obj->setCalendarUid($calendarUid);
|
||||
$obj->setCalendarName($calendarName);
|
||||
$obj->setCalendarCreateDate($calendarCreateDate);
|
||||
$obj->setCalendarUpdateDate($calendarUpdateDate);
|
||||
$obj->setCalendarWorkDays($calendarWorkDays);
|
||||
$obj->setCalendarDescription($calendarDescription);
|
||||
$obj->setCalendarStatus($calendarStatus);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $calendarUid 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($calendarUid, $calendarName, $calendarCreateDate, $calendarUpdateDate, $calendarWorkDays, $calendarDescription, $calendarStatus)
|
||||
{
|
||||
try {
|
||||
$obj = CalendarDefinitionPeer::retrieveByPK($calendarUid);
|
||||
|
||||
$obj->setCalendarName($calendarName);
|
||||
$obj->setCalendarCreateDate($calendarCreateDate);
|
||||
$obj->setCalendarUpdateDate($calendarUpdateDate);
|
||||
$obj->setCalendarWorkDays($calendarWorkDays);
|
||||
$obj->setCalendarDescription($calendarDescription);
|
||||
$obj->setCalendarStatus($calendarStatus);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $calendarUid 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($calendarUid)
|
||||
{
|
||||
$conn = Propel::getConnection(CalendarDefinitionPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = CalendarDefinitionPeer::retrieveByPK($calendarUid);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -63,5 +63,80 @@ class Services_Rest_Content
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $conCategory, $conParent, $conId, $conLang 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($conCategory, $conParent, $conId, $conLang, $conValue)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Content();
|
||||
|
||||
$obj->setConCategory($conCategory);
|
||||
$obj->setConParent($conParent);
|
||||
$obj->setConId($conId);
|
||||
$obj->setConLang($conLang);
|
||||
$obj->setConValue($conValue);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $conCategory, $conParent, $conId, $conLang 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($conCategory, $conParent, $conId, $conLang, $conValue)
|
||||
{
|
||||
try {
|
||||
$obj = ContentPeer::retrieveByPK($conCategory, $conParent, $conId, $conLang);
|
||||
|
||||
$obj->setConValue($conValue);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $conCategory, $conParent, $conId, $conLang 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($conCategory, $conParent, $conId, $conLang)
|
||||
{
|
||||
$conn = Propel::getConnection(ContentPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = ContentPeer::retrieveByPK($conCategory, $conParent, $conId, $conLang);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -61,5 +61,79 @@ class Services_Rest_Holiday
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $hldUid 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($hldUid, $hldDate, $hldDescription)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Holiday();
|
||||
|
||||
$obj->setHldUid($hldUid);
|
||||
$obj->setHldDate($hldDate);
|
||||
$obj->setHldDescription($hldDescription);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $hldUid 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($hldUid, $hldDate, $hldDescription)
|
||||
{
|
||||
try {
|
||||
$obj = HolidayPeer::retrieveByPK($hldUid);
|
||||
|
||||
$obj->setHldDate($hldDate);
|
||||
$obj->setHldDescription($hldDescription);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $hldUid 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($hldUid)
|
||||
{
|
||||
$conn = Propel::getConnection(HolidayPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = HolidayPeer::retrieveByPK($hldUid);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -83,5 +83,123 @@ class Services_Rest_Process
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $proUid 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($proUid, $proParent, $proTime, $proTimeunit, $proStatus, $proTypeDay, $proType, $proAssignment, $proShowMap, $proShowMessage, $proShowDelegate, $proShowDynaform, $proCategory, $proSubCategory, $proIndustry, $proUpdateDate, $proCreateDate, $proCreateUser, $proHeight, $proWidth, $proTitleX, $proTitleY, $proDebug, $proDynaforms, $proDerivationScreenTpl)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Process();
|
||||
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setProParent($proParent);
|
||||
$obj->setProTime($proTime);
|
||||
$obj->setProTimeunit($proTimeunit);
|
||||
$obj->setProStatus($proStatus);
|
||||
$obj->setProTypeDay($proTypeDay);
|
||||
$obj->setProType($proType);
|
||||
$obj->setProAssignment($proAssignment);
|
||||
$obj->setProShowMap($proShowMap);
|
||||
$obj->setProShowMessage($proShowMessage);
|
||||
$obj->setProShowDelegate($proShowDelegate);
|
||||
$obj->setProShowDynaform($proShowDynaform);
|
||||
$obj->setProCategory($proCategory);
|
||||
$obj->setProSubCategory($proSubCategory);
|
||||
$obj->setProIndustry($proIndustry);
|
||||
$obj->setProUpdateDate($proUpdateDate);
|
||||
$obj->setProCreateDate($proCreateDate);
|
||||
$obj->setProCreateUser($proCreateUser);
|
||||
$obj->setProHeight($proHeight);
|
||||
$obj->setProWidth($proWidth);
|
||||
$obj->setProTitleX($proTitleX);
|
||||
$obj->setProTitleY($proTitleY);
|
||||
$obj->setProDebug($proDebug);
|
||||
$obj->setProDynaforms($proDynaforms);
|
||||
$obj->setProDerivationScreenTpl($proDerivationScreenTpl);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $proUid 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($proUid, $proParent, $proTime, $proTimeunit, $proStatus, $proTypeDay, $proType, $proAssignment, $proShowMap, $proShowMessage, $proShowDelegate, $proShowDynaform, $proCategory, $proSubCategory, $proIndustry, $proUpdateDate, $proCreateDate, $proCreateUser, $proHeight, $proWidth, $proTitleX, $proTitleY, $proDebug, $proDynaforms, $proDerivationScreenTpl)
|
||||
{
|
||||
try {
|
||||
$obj = ProcessPeer::retrieveByPK($proUid);
|
||||
|
||||
$obj->setProParent($proParent);
|
||||
$obj->setProTime($proTime);
|
||||
$obj->setProTimeunit($proTimeunit);
|
||||
$obj->setProStatus($proStatus);
|
||||
$obj->setProTypeDay($proTypeDay);
|
||||
$obj->setProType($proType);
|
||||
$obj->setProAssignment($proAssignment);
|
||||
$obj->setProShowMap($proShowMap);
|
||||
$obj->setProShowMessage($proShowMessage);
|
||||
$obj->setProShowDelegate($proShowDelegate);
|
||||
$obj->setProShowDynaform($proShowDynaform);
|
||||
$obj->setProCategory($proCategory);
|
||||
$obj->setProSubCategory($proSubCategory);
|
||||
$obj->setProIndustry($proIndustry);
|
||||
$obj->setProUpdateDate($proUpdateDate);
|
||||
$obj->setProCreateDate($proCreateDate);
|
||||
$obj->setProCreateUser($proCreateUser);
|
||||
$obj->setProHeight($proHeight);
|
||||
$obj->setProWidth($proWidth);
|
||||
$obj->setProTitleX($proTitleX);
|
||||
$obj->setProTitleY($proTitleY);
|
||||
$obj->setProDebug($proDebug);
|
||||
$obj->setProDynaforms($proDynaforms);
|
||||
$obj->setProDerivationScreenTpl($proDerivationScreenTpl);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $proUid 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($proUid)
|
||||
{
|
||||
$conn = Propel::getConnection(ProcessPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = ProcessPeer::retrieveByPK($proUid);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -65,5 +65,87 @@ class Services_Rest_Session
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $sesUid 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($sesUid, $sesStatus, $usrUid, $sesRemoteIp, $sesInitDate, $sesDueDate, $sesEndDate)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Session();
|
||||
|
||||
$obj->setSesUid($sesUid);
|
||||
$obj->setSesStatus($sesStatus);
|
||||
$obj->setUsrUid($usrUid);
|
||||
$obj->setSesRemoteIp($sesRemoteIp);
|
||||
$obj->setSesInitDate($sesInitDate);
|
||||
$obj->setSesDueDate($sesDueDate);
|
||||
$obj->setSesEndDate($sesEndDate);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $sesUid 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($sesUid, $sesStatus, $usrUid, $sesRemoteIp, $sesInitDate, $sesDueDate, $sesEndDate)
|
||||
{
|
||||
try {
|
||||
$obj = SessionPeer::retrieveByPK($sesUid);
|
||||
|
||||
$obj->setSesStatus($sesStatus);
|
||||
$obj->setUsrUid($usrUid);
|
||||
$obj->setSesRemoteIp($sesRemoteIp);
|
||||
$obj->setSesInitDate($sesInitDate);
|
||||
$obj->setSesDueDate($sesDueDate);
|
||||
$obj->setSesEndDate($sesEndDate);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $sesUid 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($sesUid)
|
||||
{
|
||||
$conn = Propel::getConnection(SessionPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = SessionPeer::retrieveByPK($sesUid);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -66,5 +66,89 @@ class Services_Rest_Step
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $stepUid 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($stepUid, $proUid, $tasUid, $stepTypeObj, $stepUidObj, $stepCondition, $stepPosition, $stepMode)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Step();
|
||||
|
||||
$obj->setStepUid($stepUid);
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setTasUid($tasUid);
|
||||
$obj->setStepTypeObj($stepTypeObj);
|
||||
$obj->setStepUidObj($stepUidObj);
|
||||
$obj->setStepCondition($stepCondition);
|
||||
$obj->setStepPosition($stepPosition);
|
||||
$obj->setStepMode($stepMode);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $stepUid 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($stepUid, $proUid, $tasUid, $stepTypeObj, $stepUidObj, $stepCondition, $stepPosition, $stepMode)
|
||||
{
|
||||
try {
|
||||
$obj = StepPeer::retrieveByPK($stepUid);
|
||||
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setTasUid($tasUid);
|
||||
$obj->setStepTypeObj($stepTypeObj);
|
||||
$obj->setStepUidObj($stepUidObj);
|
||||
$obj->setStepCondition($stepCondition);
|
||||
$obj->setStepPosition($stepPosition);
|
||||
$obj->setStepMode($stepMode);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $stepUid 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($stepUid)
|
||||
{
|
||||
$conn = Propel::getConnection(StepPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = StepPeer::retrieveByPK($stepUid);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -70,5 +70,97 @@ class Services_Rest_SubProcess
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $spUid 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($spUid, $proUid, $tasUid, $proParent, $tasParent, $spType, $spSynchronous, $spSynchronousType, $spSynchronousWait, $spVariablesOut, $spVariablesIn, $spGridIn)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new SubProcess();
|
||||
|
||||
$obj->setSpUid($spUid);
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setTasUid($tasUid);
|
||||
$obj->setProParent($proParent);
|
||||
$obj->setTasParent($tasParent);
|
||||
$obj->setSpType($spType);
|
||||
$obj->setSpSynchronous($spSynchronous);
|
||||
$obj->setSpSynchronousType($spSynchronousType);
|
||||
$obj->setSpSynchronousWait($spSynchronousWait);
|
||||
$obj->setSpVariablesOut($spVariablesOut);
|
||||
$obj->setSpVariablesIn($spVariablesIn);
|
||||
$obj->setSpGridIn($spGridIn);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $spUid 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($spUid, $proUid, $tasUid, $proParent, $tasParent, $spType, $spSynchronous, $spSynchronousType, $spSynchronousWait, $spVariablesOut, $spVariablesIn, $spGridIn)
|
||||
{
|
||||
try {
|
||||
$obj = SubProcessPeer::retrieveByPK($spUid);
|
||||
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setTasUid($tasUid);
|
||||
$obj->setProParent($proParent);
|
||||
$obj->setTasParent($tasParent);
|
||||
$obj->setSpType($spType);
|
||||
$obj->setSpSynchronous($spSynchronous);
|
||||
$obj->setSpSynchronousType($spSynchronousType);
|
||||
$obj->setSpSynchronousWait($spSynchronousWait);
|
||||
$obj->setSpVariablesOut($spVariablesOut);
|
||||
$obj->setSpVariablesIn($spVariablesIn);
|
||||
$obj->setSpGridIn($spGridIn);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $spUid 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($spUid)
|
||||
{
|
||||
$conn = Propel::getConnection(SubProcessPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = SubProcessPeer::retrieveByPK($spUid);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ class Services_Rest_Task
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_PRIORITY_VARIABLE);
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_ASSIGN_TYPE);
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_ASSIGN_VARIABLE);
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_GROUP_VARIABLE);
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_MI_INSTANCE_VARIABLE);
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_MI_COMPLETE_VARIABLE);
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_ASSIGN_LOCATION);
|
||||
|
||||
@@ -63,5 +63,81 @@ class Services_Rest_Translation
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $trnCategory, $trnId, $trnLang 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($trnCategory, $trnId, $trnLang, $trnValue, $trnUpdateDate)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Translation();
|
||||
|
||||
$obj->setTrnCategory($trnCategory);
|
||||
$obj->setTrnId($trnId);
|
||||
$obj->setTrnLang($trnLang);
|
||||
$obj->setTrnValue($trnValue);
|
||||
$obj->setTrnUpdateDate($trnUpdateDate);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $trnCategory, $trnId, $trnLang 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($trnCategory, $trnId, $trnLang, $trnValue, $trnUpdateDate)
|
||||
{
|
||||
try {
|
||||
$obj = TranslationPeer::retrieveByPK($trnCategory, $trnId, $trnLang);
|
||||
|
||||
$obj->setTrnValue($trnValue);
|
||||
$obj->setTrnUpdateDate($trnUpdateDate);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $trnCategory, $trnId, $trnLang 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($trnCategory, $trnId, $trnLang)
|
||||
{
|
||||
$conn = Propel::getConnection(TranslationPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = TranslationPeer::retrieveByPK($trnCategory, $trnId, $trnLang);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -84,5 +84,125 @@ class Services_Rest_Users
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $usrUid 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($usrUid, $usrUsername, $usrPassword, $usrFirstname, $usrLastname, $usrEmail, $usrDueDate, $usrCreateDate, $usrUpdateDate, $usrStatus, $usrCountry, $usrCity, $usrLocation, $usrAddress, $usrPhone, $usrFax, $usrCellular, $usrZipCode, $depUid, $usrPosition, $usrResume, $usrBirthday, $usrRole, $usrReportsTo, $usrReplacedBy, $usrUx)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Users();
|
||||
|
||||
$obj->setUsrUid($usrUid);
|
||||
$obj->setUsrUsername($usrUsername);
|
||||
$obj->setUsrPassword($usrPassword);
|
||||
$obj->setUsrFirstname($usrFirstname);
|
||||
$obj->setUsrLastname($usrLastname);
|
||||
$obj->setUsrEmail($usrEmail);
|
||||
$obj->setUsrDueDate($usrDueDate);
|
||||
$obj->setUsrCreateDate($usrCreateDate);
|
||||
$obj->setUsrUpdateDate($usrUpdateDate);
|
||||
$obj->setUsrStatus($usrStatus);
|
||||
$obj->setUsrCountry($usrCountry);
|
||||
$obj->setUsrCity($usrCity);
|
||||
$obj->setUsrLocation($usrLocation);
|
||||
$obj->setUsrAddress($usrAddress);
|
||||
$obj->setUsrPhone($usrPhone);
|
||||
$obj->setUsrFax($usrFax);
|
||||
$obj->setUsrCellular($usrCellular);
|
||||
$obj->setUsrZipCode($usrZipCode);
|
||||
$obj->setDepUid($depUid);
|
||||
$obj->setUsrPosition($usrPosition);
|
||||
$obj->setUsrResume($usrResume);
|
||||
$obj->setUsrBirthday($usrBirthday);
|
||||
$obj->setUsrRole($usrRole);
|
||||
$obj->setUsrReportsTo($usrReportsTo);
|
||||
$obj->setUsrReplacedBy($usrReplacedBy);
|
||||
$obj->setUsrUx($usrUx);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $usrUid 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($usrUid, $usrUsername, $usrPassword, $usrFirstname, $usrLastname, $usrEmail, $usrDueDate, $usrCreateDate, $usrUpdateDate, $usrStatus, $usrCountry, $usrCity, $usrLocation, $usrAddress, $usrPhone, $usrFax, $usrCellular, $usrZipCode, $depUid, $usrPosition, $usrResume, $usrBirthday, $usrRole, $usrReportsTo, $usrReplacedBy, $usrUx)
|
||||
{
|
||||
try {
|
||||
$obj = UsersPeer::retrieveByPK($usrUid);
|
||||
|
||||
$obj->setUsrUsername($usrUsername);
|
||||
$obj->setUsrPassword($usrPassword);
|
||||
$obj->setUsrFirstname($usrFirstname);
|
||||
$obj->setUsrLastname($usrLastname);
|
||||
$obj->setUsrEmail($usrEmail);
|
||||
$obj->setUsrDueDate($usrDueDate);
|
||||
$obj->setUsrCreateDate($usrCreateDate);
|
||||
$obj->setUsrUpdateDate($usrUpdateDate);
|
||||
$obj->setUsrStatus($usrStatus);
|
||||
$obj->setUsrCountry($usrCountry);
|
||||
$obj->setUsrCity($usrCity);
|
||||
$obj->setUsrLocation($usrLocation);
|
||||
$obj->setUsrAddress($usrAddress);
|
||||
$obj->setUsrPhone($usrPhone);
|
||||
$obj->setUsrFax($usrFax);
|
||||
$obj->setUsrCellular($usrCellular);
|
||||
$obj->setUsrZipCode($usrZipCode);
|
||||
$obj->setDepUid($depUid);
|
||||
$obj->setUsrPosition($usrPosition);
|
||||
$obj->setUsrResume($usrResume);
|
||||
$obj->setUsrBirthday($usrBirthday);
|
||||
$obj->setUsrRole($usrRole);
|
||||
$obj->setUsrReportsTo($usrReportsTo);
|
||||
$obj->setUsrReplacedBy($usrReplacedBy);
|
||||
$obj->setUsrUx($usrUx);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $usrUid 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($usrUid)
|
||||
{
|
||||
$conn = Propel::getConnection(UsersPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = UsersPeer::retrieveByPK($usrUid);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user