Commit 9cc9dbf8 authored by François Agneray's avatar François Agneray
Browse files

#52 => done

parent de0ff05c
Pipeline #2392 passed with stages
in 7 minutes and 4 seconds
......@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- #44: Adding the doctrine production mode (see readme)
- #52: Changing metamodel attribute table (uri_action field deleted and renderer_config field added)
### Deprecated
- For soon-to-be removed features.
......
......@@ -37,7 +37,6 @@ To list all operations availables just type `make` in your terminal at the root
- To execute tests suite : `make phpunit`
- To execute php code sniffer : `make phpcs`
- To create the metamodel database : `make create-db`
- To load metamodel information for testing : `make dev-meta`
## Open API
......
......@@ -76,8 +76,8 @@ final class AttributeAction extends AbstractAction
$attribute->setMax($parsedBody['max']);
$attribute->setPlaceholderMin($parsedBody['placeholder_min']);
$attribute->setPlaceholderMax($parsedBody['placeholder_max']);
$attribute->setUriAction($parsedBody['uri_action']);
$attribute->setRenderer($parsedBody['renderer']);
$attribute->setRendererConfig($parsedBody['renderer_config']);
$attribute->setDisplayDetail($parsedBody['display_detail']);
$attribute->setSelected($parsedBody['selected']);
$attribute->setOrderBy($parsedBody['order_by']);
......
......@@ -21,7 +21,7 @@ use Doctrine\Common\Collections\ArrayCollection;
class Attribute implements \JsonSerializable
{
/**
* @var integer
* @var int
*
* @Id
* @Column(type="integer", nullable=false)
......@@ -73,14 +73,14 @@ class Attribute implements \JsonSerializable
protected $description;
/**
* @var integer
* @var int
*
* @Column(type="integer", name="output_display", nullable=true)
*/
protected $outputDisplay;
/**
* @var integer
* @var int
*
* @Column(type="integer", name="criteria_display", nullable=true)
*/
......@@ -145,16 +145,16 @@ class Attribute implements \JsonSerializable
/**
* @var string
*
* @Column(type="string", name="uri_action", nullable=true)
* @Column(type="string", name="renderer", nullable=true)
*/
protected $uriAction;
protected $renderer;
/**
* @var string
*
* @Column(type="string", name="renderer", nullable=true)
* @Column(type="json", name="renderer_config", nullable=true)
*/
protected $renderer;
protected $rendererConfig;
/**
* @var int
......@@ -241,7 +241,7 @@ class Attribute implements \JsonSerializable
protected $voDatatype;
/**
* @var integer
* @var int
*
* @Column(type="integer", name="vo_size", nullable=true)
*/
......@@ -429,14 +429,14 @@ class Attribute implements \JsonSerializable
$this->placeholderMax = $placeholderMax;
}
public function getUriAction()
public function getRendererConfig()
{
return $this->uriAction;
return $this->rendererConfig;
}
public function setUriAction($uriAction)
public function setRendererConfig($rendererConfig)
{
$this->uriAction = $uriAction;
$this->rendererConfig = $rendererConfig;
}
public function getRenderer()
......@@ -618,8 +618,8 @@ class Attribute implements \JsonSerializable
'max' => $this->getMax(),
'placeholder_min' => $this->getPlaceholderMin(),
'placeholder_max' => $this->getPlaceholderMax(),
'uri_action' => $this->getUriAction(),
'renderer' => $this->getRenderer(),
'renderer_config' => $this->getRendererConfig(),
'display_detail' => $this->getDisplayDetail(),
'selected' => $this->getSelected(),
'order_by' => $this->getOrderBy(),
......
......@@ -54,27 +54,27 @@ class CriteriaFamily implements \JsonSerializable
$this->dataset = $dataset;
}
public function getId(): int
public function getId()
{
return $this->id;
}
public function getLabel(): string
public function getLabel()
{
return $this->label;
}
public function setLabel(string $label): void
public function setLabel($label)
{
$this->label = $label;
}
public function getDisplay(): int
public function getDisplay()
{
return $this->display;
}
public function setDisplay(int $display): void
public function setDisplay($display)
{
$this->display = $display;
}
......
......@@ -19,7 +19,7 @@ namespace App\Entity;
class Database implements \JsonSerializable
{
/**
* @var integer
* @var int
*
* @Id
* @Column(type="integer", nullable=false)
......@@ -56,7 +56,7 @@ class Database implements \JsonSerializable
protected $host;
/**
* @var integer
* @var int
*
* @Column(type="integer", nullable=true)
*/
......@@ -76,102 +76,77 @@ class Database implements \JsonSerializable
*/
protected $password;
/**
* Getter property id
*
* @return int
*/
public function getId(): int
public function getId()
{
return $this->id;
}
/**
* Getter property label
*
* @return string
*/
public function getLabel(): string
public function getLabel()
{
return $this->label;
}
/**
* Setter property label
*
* @param string $label
*/
public function setLabel(string $label): void
public function setLabel($label)
{
$this->label = $label;
}
/**
* Getter property dbname
*
* @return string
*/
public function getDbName(): string
public function getDbName()
{
return $this->dbname;
}
/**
* Setter property dbname
*
* @param string $dbname
*/
public function setDbName(string $dbname): void
public function setDbName($dbname)
{
$this->dbname = $dbname;
}
public function getType(): string
public function getType()
{
return $this->type;
}
public function setType(string $type): void
public function setType($type)
{
$this->type = $type;
}
public function getHost(): string
public function getHost()
{
return $this->host;
}
public function setHost(string $host): void
public function setHost($host)
{
$this->host = $host;
}
public function getPort(): int
public function getPort()
{
return $this->port;
}
public function setPort(int $port): void
public function setPort($port)
{
$this->port = $port;
}
public function getLogin(): string
public function getLogin()
{
return $this->login;
}
public function setLogin(string $login): void
public function setLogin($login)
{
$this->login = $login;
}
public function getPassword(): string
public function getPassword()
{
return $this->password;
}
public function setPassword(string $password): void
public function setPassword($password)
{
$this->password = $password;
}
......
......@@ -50,14 +50,14 @@ class Dataset implements \JsonSerializable
protected $description;
/**
* @var integer
* @var int
*
* @Column(type="integer", nullable=false)
*/
protected $display;
/**
* @var integer
* @var int
*
* @Column(type="integer", nullable=true)
*/
......@@ -107,113 +107,113 @@ class Dataset implements \JsonSerializable
*/
protected $attributes;
public function __construct($name)
public function __construct(string $name)
{
$this->name = $name;
$this->attributes = new ArrayCollection();
}
public function getName(): string
public function getName()
{
return $this->name;
}
public function getTableRef(): string
public function getTableRef()
{
return $this->tableRef;
}
public function setTableRef(string $tableRef): void
public function setTableRef($tableRef)
{
$this->tableRef = $tableRef;
}
public function getLabel(): string
public function getLabel()
{
return $this->label;
}
public function setLabel(string $label): void
public function setLabel($label)
{
$this->label = $label;
}
public function getDescription(): string
public function getDescription()
{
return $this->description;
}
public function setDescription(string $description): void
public function setDescription($description)
{
$this->description = $description;
}
public function getDisplay(): int
public function getDisplay()
{
return $this->display;
}
public function setDisplay(int $display): void
public function setDisplay($display)
{
$this->display = $display;
}
public function getCount(): int
public function getCount()
{
return $this->count;
}
public function setCount(int $count): void
public function setCount($count)
{
$this->count = $count;
}
public function getVo(): bool
public function getVo()
{
return $this->vo;
}
public function setVo(bool $vo): void
public function setVo($vo)
{
$this->vo = $vo;
}
public function getDataPath(): string
public function getDataPath()
{
return $this->dataPath;
}
public function setDataPath(string $dataPath): void
public function setDataPath($dataPath)
{
$this->dataPath = $dataPath;
}
public function getSelectableRow(): bool
public function getSelectableRow()
{
return $this->selectableRow;
}
public function setSelectableRow(bool $selectableRow): void
public function setSelectableRow($selectableRow)
{
$this->selectableRow = $selectableRow;
}
public function getProject(): Project
public function getProject()
{
return $this->project;
}
public function setProject(Project $project): void
public function setProject($project)
{
$this->project = $project;
}
public function getDatasetFamily(): DatasetFamily
public function getDatasetFamily()
{
return $this->datasetFamily;
}
public function setDatasetFamily(DatasetFamily $datasetFamily): void
public function setDatasetFamily($datasetFamily)
{
$this->datasetFamily = $datasetFamily;
}
......
......@@ -21,7 +21,7 @@ use Doctrine\Common\Collections\ArrayCollection;
class DatasetFamily implements \JsonSerializable
{
/**
* @var integer
* @var int
*
* @Id
* @Column(type="integer", nullable=false)
......@@ -37,7 +37,7 @@ class DatasetFamily implements \JsonSerializable
protected $label;
/**
* @var integer
* @var int
*
* @Column(type="integer", nullable=false)
*/
......@@ -63,27 +63,27 @@ class DatasetFamily implements \JsonSerializable
$this->instance = $instance;
}
public function getId(): int
public function getId()
{
return $this->id;
}
public function getLabel(): string
public function getLabel()
{
return $this->label;
}
public function setLabel(string $label): void
public function setLabel($label)
{
$this->label = $label;
}
public function getDisplay(): int
public function getDisplay()
{
return $this->display;
}
public function setDisplay(int $display): void
public function setDisplay($display)
{
$this->display = $display;
}
......
......@@ -19,7 +19,7 @@ namespace App\Entity;
class Group implements \JsonSerializable
{
/**
* @var integer
* @var int
*
* @Id
* @Column(type="integer", nullable=false)
......
......@@ -21,7 +21,7 @@ use Doctrine\Common\Collections\ArrayCollection;
class Instance implements \JsonSerializable
{
/**
* @var integer
* @var int
*
* @Id
* @Column(type="string", nullable=false)
......
......@@ -19,7 +19,7 @@ namespace App\Entity;
class OutputCategory implements \JsonSerializable
{
/**
* @var integer
* @var int
*
* @Id
* @Column(type="integer", nullable=false)
......@@ -35,7 +35,7 @@ class OutputCategory implements \JsonSerializable
protected $label;
/**
* @var integer
* @var int
*
* @Column(type="integer", nullable=false)
*/
......@@ -49,37 +49,37 @@ class OutputCategory implements \JsonSerializable
*/
protected $outputFamily;
public function getId(): int
public function getId()
{
return $this->id;
}
public function getLabel(): string
public function getLabel()
{
return $this->label;
}
public function setLabel(string $label): void
public function setLabel($label)
{
$this->label = $label;
}
public function getDisplay(): int
public function getDisplay()
{
return $this->display;
}
public function setDisplay(int $display): void
public function setDisplay($display)
{
$this->display = $display;
}
public function setOutputFamily(OutputFamily $outputFamily): void
public function setOutputFamily($outputFamily)
{
$this->outputFamily = $outputFamily;
}
public function getOutputFamily(): OutputFamily
public function getOutputFamily()
{
return $this->outputFamily;
}
......
......@@ -19,7 +19,7 @@ namespace App\Entity;
class OutputFamily implements \JsonSerializable
{
/**
* @var integer
* @var int
*
* @Id
* @Column(type="integer", nullable=false)
......@@ -35,7 +35,7 @@ class OutputFamily implements \JsonSerializable
protected $label;
/**
* @var integer
* @var int
*
* @Column(type="integer", nullable=false)
*/
......@@ -54,27 +54,27 @@ class OutputFamily implements \JsonSerializable
$this->dataset = $dataset;
}
public function getId(): int
public function getId()
{
return $this->id;
}
public function getLabel(): string
public function getLabel()
{
return $this->label;
}
public function setLabel(string $label): void
public function setLabel($label)
{
$this->label = $label;
}
public function setDisplay(int $display): void
public function setDisplay($display)
{
$this->display = $display;
}
public function getDisplay(): int
public function getDisplay()
{
return $this->display;
}
......
......@@ -67,57 +67,57 @@ class Project implements \JsonSerializable
$this->name = $name;
}
public function getName(): string
public function getName()
{
return $this->name;
}
public function getLabel(): string
public function getLabel()
{
return $this