Select Git revision
Workspaces.class.inc
Forked from
Open source / vMap
Source project has a limited visibility.
Workspaces.class.inc 72.27 KiB
<?php
/**
* \file Workspaces.class.inc
* \class Workspaces
*
* \author Yoann Perollet <yoann.perollet@veremes.com>.
*
* \brief This file contains the Workspaces php class
*
* This class defines Rest Api to Gtf workspaces
*
*/
require_once 'Gtf.class.inc';
require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc';
require_once 'Workspace.class.inc';
require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vmlib/BdDataAccess.inc';
require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vmlib/phpUtil.inc';
require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/gtf_lib/GtfFmwParser.class.inc';
require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vmlib/files/Files_manager.class.inc';
class Workspaces extends GTF {
/**
* @SWG\Definition(
* definition="/workspaces",
* allOf={
* @SWG\Schema(ref="#/definitions/workspaces")
* }
* )
* * @SWG\Tag(
* name="Workspaces",
* description="Operations about Workspaces"
* )
*/
/**
* construct
* @param type $aPath url of the request
* @param type $aValues parameters of the request
* @param type $properties properties
* @param type $bShortcut false to reinit variables
* @param type $oConnection connection object
*/
function __construct($aPath, $aValues, $properties, $bShortcut = false, $oConnection = false) {
parent::__construct($aPath, $aValues, $properties, $bShortcut, $oConnection);
$this->aSelectedFields = Array('workspace_id', 'name', 'fmw_file', 'owner', $this->getDateSelectedFields('creation_date', 'yeartosecond'), 'description', 'subscription', 'category_id', 'success_action_id', 'failed_action_id', 'survey', 'form_type', 'legal_terms_conditions', $this->getDateSelectedFields('last_save_date', 'yeartosecond'), 'last_save_build', 'file_encoding', 'title', 'requirements', 'history', 'usage', 'key', 'email_template_id', 'locked', 'tag', 'login', 'category_name', 'nb_demande', 'email_template', 'dataencrypt', 'usepersonaldata');
}
/**
* @SWG\Get(path="/workspaces",
* tags={"Workspaces"},
* summary="Get Workspaces",
* description="Request to get Workspaces",
* operationId="GET",
* produces={"application/xml", "application/json"},
* @SWG\Parameter(
* name="token",
* in="query",
* description="user token",
* required=true,
* type="string"
* ),
* @SWG\Parameter(
* name="workspace_by",
* in="query",
* description="list of workspaceing fields",
* required=false,
* type="string"
* ),
* @SWG\Parameter(