ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilWebServicesSetupAgent.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 use ILIAS\Setup;
22 use ILIAS\Refinery;
23 use ILIAS\UI;
24 
25 class ilWebServicesSetupAgent implements Setup\Agent
26 {
28 
29  protected Refinery\Factory $refinery;
30 
31  public function __construct(Refinery\Factory $refinery)
32  {
33  $this->refinery = $refinery;
34  }
35 
39  public function hasConfig(): bool
40  {
41  return true;
42  }
43 
47  public function getConfigInput(Setup\Config $config = null): UI\Component\Input\Container\Form\FormInput
48  {
49  throw new \LogicException("Not yet implemented.");
50  }
51 
56  {
57  return $this->refinery->custom()->transformation(function ($data) {
58  return new \ilWebServicesSetupConfig(
59  (bool) ($data["soap_user_administration"] ?? false),
60  $data["soap_wsdl_path"] ?? "",
61  (int) ($data["soap_connect_timeout"] ?? ilSoapClient::DEFAULT_CONNECT_TIMEOUT),
62  (int) ($data["soap_response_timeout"] ?? ilSoapClient::DEFAULT_RESPONSE_TIMEOUT),
63  $data["rpc_server_host"] ?? "",
64  (int) ($data["rpc_server_port"] ?? 0),
65  );
66  });
67  }
68 
72  public function getInstallObjective(Setup\Config $config = null): Setup\Objective
73  {
74  return new ilWebServicesConfigStoredObjective($config);
75  }
76 
80  public function getUpdateObjective(Setup\Config $config = null): Setup\Objective
81  {
82  $wsrv_objective = new Setup\Objective\NullObjective();
83  if (!is_null($config)) {
84  $wsrv_objective = new ilWebServicesConfigStoredObjective($config);
85  }
87  'Updates of Services/WebServices',
88  false,
89  $wsrv_objective,
91  new ilECSUpdateSteps8()
92  )
93  );
94  }
95 
99  public function getBuildArtifactObjective(): Setup\Objective
100  {
101  return new Setup\Objective\NullObjective();
102  }
103 
107  public function getStatusObjective(Setup\Metrics\Storage $storage): Setup\Objective
108  {
109  return new Setup\Objective\NullObjective();
110  }
111 
115  public function getMigrations(): array
116  {
117  return [];
118  }
119 }
An objective is a desired state of the system that is supposed to be created by the setup...
Definition: Objective.php:30
const DEFAULT_RESPONSE_TIMEOUT
Store information about https is enabled.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const DEFAULT_CONNECT_TIMEOUT
getInstallObjective(Setup\Config $config=null)
getConfigInput(Setup\Config $config=null)
getUpdateObjective(Setup\Config $config=null)
Class ilECSUpdateSteps8 contains update steps for release 8.
__construct(Refinery\Factory $refinery)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A transformation is a function from one datatype to another.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A configuration for the setup.
Definition: Config.php:26
getStatusObjective(Setup\Metrics\Storage $storage)