PM-1005 "WebEntry-Event (Endpoints)"
- Se han implementado los siguientes Endpoints:
GET /api/1.0/{workspace}/project/{prj_uid}/web-entry-events
GET /api/1.0/{workspace}/project/{prj_uid}/web-entry-event/{wee_uid}
GET /api/1.0/{workspace}/project/{prj_uid}/web-entry-event/event/{evn_uid}
POST /api/1.0/{workspace}/project/{prj_uid}/web-entry-event
PUT /api/1.0/{workspace}/project/{prj_uid}/web-entry-event/{wee_uid}
DELETE /api/1.0/{workspace}/project/{prj_uid}/web-entry-event/{wee_uid}
- Se han implementado los metodos necesarios para el Export, Import y
Delete (delete Process) de este nuevo "Objeto"
- Se ha solucionado bugs al importar un Projecto con "Gateway to Gateway"
This commit is contained in:
@@ -118,6 +118,24 @@ class WebEntry
|
||||
return $newName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if exists the Web Entry
|
||||
*
|
||||
* @param string $webEntryUid Unique id of Web Entry
|
||||
*
|
||||
* return bool Return true if exists the Web Entry, false otherwise
|
||||
*/
|
||||
public function exists($webEntryUid)
|
||||
{
|
||||
try {
|
||||
$obj = \WebEntryPeer::retrieveByPK($webEntryUid);
|
||||
|
||||
return (!is_null($obj))? true : false;
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if exists the title of a Web Entry
|
||||
*
|
||||
@@ -165,19 +183,17 @@ class WebEntry
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if does not exist the Web Entry in table WEB_ENTRY
|
||||
* Verify if does not exists the Web Entry
|
||||
*
|
||||
* @param string $webEntryUid Unique id of Web Entry
|
||||
* @param string $fieldNameForException Field name for the exception
|
||||
*
|
||||
* return void Throw exception if does not exist the Web Entry in table WEB_ENTRY
|
||||
* return void Throw exception if does not exists the Web Entry
|
||||
*/
|
||||
public function throwExceptionIfNotExistsWebEntry($webEntryUid, $fieldNameForException)
|
||||
{
|
||||
try {
|
||||
$obj = \WebEntryPeer::retrieveByPK($webEntryUid);
|
||||
|
||||
if (is_null($obj)) {
|
||||
if (!$this->exists($webEntryUid)) {
|
||||
throw new \Exception(\G::LoadTranslation("ID_WEB_ENTRY_DOES_NOT_EXIST", array($fieldNameForException, $webEntryUid)));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
@@ -601,7 +617,7 @@ class WebEntry
|
||||
$msg = $msg . (($msg != "")? "\n" : "") . $validationFailure->getMessage();
|
||||
}
|
||||
|
||||
throw new \Exception(\G::LoadTranslation("ID_RECORD_CANNOT_BE_CREATED") . "\n" . $msg);
|
||||
throw new \Exception(\G::LoadTranslation("ID_RECORD_CANNOT_BE_CREATED") . (($msg != "")? "\n" . $msg : ""));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$cnn->rollback();
|
||||
@@ -686,7 +702,7 @@ class WebEntry
|
||||
$msg = $msg . (($msg != "")? "\n" : "") . $validationFailure->getMessage();
|
||||
}
|
||||
|
||||
throw new \Exception(\G::LoadTranslation("ID_RECORD_CANNOT_BE_CREATED") . "\n" . $msg);
|
||||
throw new \Exception(\G::LoadTranslation("ID_REGISTRY_CANNOT_BE_UPDATED") . (($msg != "")? "\n" . $msg : ""));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$cnn->rollback();
|
||||
|
||||
Reference in New Issue
Block a user