Adicion de validaciones para funciones Activity Resources

This commit is contained in:
Brayan Osmar Pereyra Suxo
2013-12-06 15:43:08 -04:00
parent 100aa3c751
commit 16e4f98019

View File

@@ -12,9 +12,10 @@ use \Luracast\Restler\RestException;
class Activity extends Api class Activity extends Api
{ {
/** /**
* @param string $projectUid * @param string $projectUid {@min 32} {@max 32}
* @param string $activityUid * @param string $activityUid {@min 32} {@max 32}
* @param string $filter {@choice definition,,properties} * @param string $filter {@choice definition,,properties}
*
* @url GET /:projectUid/activity/:activityUid * @url GET /:projectUid/activity/:activityUid
*/ */
public function doGetProjectActivity($projectUid, $activityUid, $filter = '') public function doGetProjectActivity($projectUid, $activityUid, $filter = '')
@@ -58,9 +59,13 @@ class Activity extends Api
/** /**
* @param string $projectUid {@min 32} {@max 32}
* @param string $activityUid {@min 32} {@max 32}
* @param ActivityPropertiesStructure $properties {@from body}
*
* @url PUT /:projectUid/activity/:activityUid * @url PUT /:projectUid/activity/:activityUid
*/ */
public function doPutProjectActivity($projectUid, $activityUid, $request_data = array()) public function doPutProjectActivity($projectUid, $activityUid, ActivityPropertiesStructure $properties, $request_data = array())
{ {
try { try {
$task = new \BusinessModel\Task(); $task = new \BusinessModel\Task();
@@ -73,6 +78,9 @@ class Activity extends Api
/** /**
* @param string $projectUid {@min 32} {@max 32}
* @param string $activityUid {@min 32} {@max 32}
*
* @url DELETE /:projectUid/activity/:activityUid * @url DELETE /:projectUid/activity/:activityUid
*/ */
public function doDeleteProjectActivity($projectUid, $activityUid) public function doDeleteProjectActivity($projectUid, $activityUid)
@@ -118,3 +126,125 @@ class Activity extends Api
} }
} }
class ActivityPropertiesStructure
{
/**
* @var string {@from body} {@min 1} {@max 200}
*/
public $tas_title;
/**
* @var string {@from body}
*/
public $tas_description;
/**
* @var string {@from body}
*/
public $tas_priority_variable;
/**
* @var string {@from body}
*/
public $tas_derivation_screen_tpl;
/**
* @var string {@from body} {@choice TRUE,FALSE}
*/
public $tas_start;
/**
* @var string {@from body} {@choice BALANCED,MANUAL,EVALUATE,REPORT_TO,SELF_SERVICE,SELF_SERVICE_EVALUATE}
*/
public $tas_assign_type;
/**
* @var string {@from body}
*/
public $tas_assign_variable;
/**
* @var string {@from body}
*/
public $tas_group_variable;
public $tas_selfservice_time;
/**
* @var int {@from body} {@choice 1,0}
*/
public $tas_selfservice_timeout;
/**
* @var string {@from body} {@choice DAYS,,HOURS}
*/
public $tas_selfservice_time_unit;
/**
* @var string {@from body} {@min 0} {@max 32}
*/
public $tas_selfservice_trigger_uid;
/**
* @var string {@from body} {@choice TRUE,FALSE}
*/
public $tas_transfer_fly;
/**
* @var int {@from body}
*/
public $tas_duration;
/**
* @var string {@from body} {@choice DAYS,HOURS}
*/
public $tas_timeunit;
public $tas_type_day;
/**
* @var string {@from body} {@min 0} {@max 32}
*/
public $tas_calendar;
/**
* @var string {@from body} {@choice NORMAL,ADHOC}
*/
public $tas_type;
/**
* @var string {@from body}
*/
public $tas_def_title;
/**
* @var string {@from body}
*/
public $tas_def_description;
/**
* @var string {@from body} {@choice TRUE,FALSE}
*/
public $tas_send_last_email;
/**
* @var string {@from body}
*/
public $tas_def_subject_message;
/**
* @var string {@from body} {@choice template,text}
*/
public $tas_def_message_type;
/**
* @var string {@from body}
*/
public $tas_def_message;
/**
* @var string {@from body}
*/
public $tas_def_message_template;
}