ILIAS  trunk Revision v11.0_alpha-1838-g59fc79e306b
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 
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  (string) ($data['soap_internal_wsdl_path'] ?? ''),
66  (bool) ($data['soap_internal_wsdl_verify_peer'] ?? true),
67  (bool) ($data['soap_internal_wsdl_verify_peer_name'] ?? true),
68  (bool) ($data['soap_internal_wsdl_allow_self_signed'] ?? false),
69  );
70  });
71  }
72 
76  public function getInstallObjective(?Setup\Config $config = null): Setup\Objective
77  {
78  return new ilWebServicesConfigStoredObjective($config);
79  }
80 
84  public function getUpdateObjective(?Setup\Config $config = null): Setup\Objective
85  {
86  $wsrv_objective = new Setup\Objective\NullObjective();
87  if (!is_null($config)) {
88  $wsrv_objective = new ilWebServicesConfigStoredObjective($config);
89  }
91  'Updates of Services/WebServices',
92  false,
93  $wsrv_objective,
95  new ilECSUpdateSteps8()
96  ),
99  )
100  );
101  }
102 
106  public function getBuildObjective(): Setup\Objective
107  {
108  return new Setup\Objective\NullObjective();
109  }
110 
114  public function getStatusObjective(Setup\Metrics\Storage $storage): Setup\Objective
115  {
116  return new Setup\Objective\NullObjective();
117  }
118 
122  public function getMigrations(): array
123  {
124  return [];
125  }
126 }
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.
const DEFAULT_CONNECT_TIMEOUT
A agent is some component that performs part of the setup process.
Definition: Agent.php:29
getUpdateObjective(?Setup\Config $config=null)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
hasConfig()
Does this agent require a configuration?
Storage is simple key/value store without further schema definition.
Definition: Storage.php:29
Builds data types.
Definition: Factory.php:35
Class ilECSUpdateSteps8 contains update steps for release 8.
getArrayToConfigTransformation()
Agents must be able to tell how to create a configuration from a nested array.if Agent has no Config ...
getInstallObjective(?Setup\Config $config=null)
__construct(Refinery\Factory $refinery)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getConfigInput(?Setup\Config $config=null)
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...
getBuildObjective()
Get the goal the agent wants to achieve to build artifacts.if Config does not match the Agent...
A configuration for the setup.
Definition: Config.php:26
getStatusObjective(Setup\Metrics\Storage $storage)