/**
 * 
 * 
 * @return be_vse_data
 */
function execute()
{
    $entries = new be_vse_data();
    try {
        $access = "RW";
        include './inc/incWebServiceAPIKeyValidation.php';
        $parameters = collectParameters();
        if (validate($parameters)) {
            $entries = da_vse_data::ClearEntries($parameters->app_id, $parameters->optional_label);
        } else {
            die("Parámetros Inválidos");
        }
    } catch (Exception $ex) {
        die("EXCEPTION " . $ex->getCode());
    }
    return $entries;
}
Beispiel #2
0
 private static function testClearEntries($uuid)
 {
     ReportInfo("Testing Clearing Entries");
     ReportInfo("Clearing All");
     $result = da_vse_data::ClearEntries(1, "");
     ReportInfo("Result:");
     print_r($result);
     for ($i = 1; $i <= 10; $i++) {
         $entry = new be_vse_data();
         $entry->app_id = 1;
         $entry->vse_label = "TEST FOR CLEARING_01";
         $entry->vse_value = $i . "OK";
         $entry->vse_type = "ANY";
         $entry->vse_annotations = "Testing for clearing methods";
         $entry->captured_datetime = date("Y-m-d H:i:s");
         da_vse_data::AddEntry($entry);
     }
     for ($i = 1; $i <= 10; $i++) {
         $entry = new be_vse_data();
         $entry->app_id = 1;
         $entry->vse_label = "TEST FOR CLEARING_02";
         $entry->vse_value = $i . "OK";
         $entry->vse_type = "ANY";
         $entry->vse_annotations = "Testing for clearing methods";
         $entry->captured_datetime = date("Y-m-d H:i:s");
         da_vse_data::AddEntry($entry);
     }
     ReportInfo("Getting all entries...");
     $allrecords = da_vse_data::GetEntries(1, '', 0);
     print_r($allrecords);
     ReportInfo("Clearing TEST_FOR_CLEARING_02");
     $check01 = da_vse_data::ClearEntries(1, 'TEST FOR CLEARING_02');
     print_r($check01);
     ReportInfo("Getting all entries again...");
     $allrecords = da_vse_data::GetEntries(1, '', 0);
     print_r($allrecords);
     ReportInfo("Clearing TEST_FOR_CLEARING_01");
     $check02 = da_vse_data::ClearEntries(1, 'TEST FOR CLEARING_01');
     print_r($check02);
     ReportInfo("At this point all should be clear for app 1");
     $allrecords = da_vse_data::GetEntries(1, '', 0);
     print_r($allrecords);
 }