ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\DataProtection\Setup\Agent Class Reference
+ Inheritance diagram for ILIAS\DataProtection\Setup\Agent:
+ Collaboration diagram for ILIAS\DataProtection\Setup\Agent:

Public Member Functions

 __construct (private readonly Refinery $refinery)
 
 hasConfig ()
 Does this agent require a configuration? More...
 
 getArrayToConfigTransformation ()
 Agents must be able to tell how to create a configuration from a nested array. More...
 
 getInstallObjective (?Config $config=null)
 Get the goals the agent wants to achieve on setup. More...
 
 getUpdateObjective (?Config $config=null)
 Get the goal the agent wants to achieve on update. More...
 
 getBuildObjective ()
 Get the goal the agent wants to achieve to build artifacts. More...
 
 getStatusObjective (Storage $storage)
 
 getMigrations ()
 Get a named map of migrations available for this Agent. More...
 
 getNamedObjectives (?Config $config=null)
 Gets all named objectives The keys of the returned array are the commands. More...
 
- Public Member Functions inherited from ILIAS\Setup\Agent
 hasConfig ()
 Does this agent require a configuration? More...
 
 getArrayToConfigTransformation ()
 Agents must be able to tell how to create a configuration from a nested array. More...
 
 getInstallObjective (?Config $config=null)
 Get the goals the agent wants to achieve on setup. More...
 
 getUpdateObjective (?Config $config=null)
 Get the goal the agent wants to achieve on update. More...
 
 getBuildObjective ()
 Get the goal the agent wants to achieve to build artifacts. More...
 
 getStatusObjective (Metrics\Storage $storage)
 Get the objective to be achieved when status is requested. More...
 
 getMigrations ()
 Get a named map of migrations available for this Agent. More...
 
 getNamedObjectives (?Config $config=null)
 Gets all named objectives The keys of the returned array are the commands. More...
 

Detailed Description

Definition at line 32 of file Agent.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\DataProtection\Setup\Agent::__construct ( private readonly Refinery  $refinery)

Definition at line 34 of file Agent.php.

35 {
36 }

Member Function Documentation

◆ getArrayToConfigTransformation()

ILIAS\DataProtection\Setup\Agent::getArrayToConfigTransformation ( )

Agents must be able to tell how to create a configuration from a nested array.

Exceptions
LogicExceptionif Agent has no Config

Implements ILIAS\Setup\Agent.

Definition at line 43 of file Agent.php.

43 : Transformation
44 {
45 return $this->refinery->identity();
46 }

References ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ getBuildObjective()

ILIAS\DataProtection\Setup\Agent::getBuildObjective ( )

Get the goal the agent wants to achieve to build artifacts.

Exceptions
InvalidArgumentExceptionif Config does not match the Agent.

Implements ILIAS\Setup\Agent.

Definition at line 58 of file Agent.php.

58 : Objective
59 {
60 return new NullObjective();
61 }

◆ getInstallObjective()

ILIAS\DataProtection\Setup\Agent::getInstallObjective ( ?Config  $config = null)

Get the goals the agent wants to achieve on setup.

The provided configuration is to be used to set according configuration values in the installation.

Exceptions
InvalidArgumentExceptionif Config does not match the Agent..

Implements ILIAS\Setup\Agent.

Definition at line 48 of file Agent.php.

48 : Objective
49 {
50 return new NullObjective();
51 }

◆ getMigrations()

ILIAS\DataProtection\Setup\Agent::getMigrations ( )

Get a named map of migrations available for this Agent.

Should also return Migrations that have run completely.

Returns
array<string,Migration>|Migration[]

Implements ILIAS\Setup\Agent.

Definition at line 68 of file Agent.php.

68 : array
69 {
70 return [];
71 }

◆ getNamedObjectives()

ILIAS\DataProtection\Setup\Agent::getNamedObjectives ( ?Config  $config = null)

Gets all named objectives The keys of the returned array are the commands.

Only the AgentCollection should return an array where the cmd of the named objective is the array key.

Parameters
Config | null$config
Returns
array<string|int, ObjectiveConstructor>

Implements ILIAS\Setup\Agent.

Definition at line 73 of file Agent.php.

73 : array
74 {
75 return [];
76 }

◆ getStatusObjective()

ILIAS\DataProtection\Setup\Agent::getStatusObjective ( Storage  $storage)

Definition at line 63 of file Agent.php.

63 : Objective
64 {
65 return new NullObjective();
66 }

◆ getUpdateObjective()

ILIAS\DataProtection\Setup\Agent::getUpdateObjective ( ?Config  $config = null)

Get the goal the agent wants to achieve on update.

The provided configuration is to be used to change according configuration values in the installation. If this is not possible for some reason, an according UnachievableException needs to be thrown in the according objective.

The configuration is not to be used to initialize the required environment for the objectives. This must be done via ClientIdReadObjective and depending objectives like ilIniFilesLoadedObjective.

If no configuration is provided the configuration of the component should stay as is.

Exceptions
InvalidArgumentExceptionif Config does not match the Agent..

Implements ILIAS\Setup\Agent.

Definition at line 53 of file Agent.php.

53 : Objective
54 {
55 return new ilTreeAdminNodeAddedObjective('dpro', 'DataProtection');
56 }

◆ hasConfig()

ILIAS\DataProtection\Setup\Agent::hasConfig ( )

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

Definition at line 38 of file Agent.php.

38 : bool
39 {
40 return false;
41 }

The documentation for this class was generated from the following file: