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

Public Member Functions

 getBuildObjective ()
 Get the goal the agent wants to achieve to build artifacts. More...
 
 getNamedObjectives (?Config $config=null)
 Gets all named objectives The keys of the returned array are the commands. More...
 
 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...
 
 getStatusObjective (Storage $storage)
 
 getMigrations ()
 Get a named map of migrations available for this Agent. 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

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 34 of file Agent.php.

Member Function Documentation

◆ getArrayToConfigTransformation()

ILIAS\FileDelivery\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 51 of file Agent.php.

51 : Transformation
52 {
53 throw new LogicException("No Config");
54 }

◆ getBuildObjective()

ILIAS\FileDelivery\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 36 of file Agent.php.

36 : Objective
37 {
38 return new NullObjective();
39 }

◆ getInstallObjective()

ILIAS\FileDelivery\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 56 of file Agent.php.

56 : Objective
57 {
58 return new ObjectiveCollection(
59 'FileDelivery',
60 true,
61 new KeyRotationObjective(),
62 new DeliveryMethodObjective(),
63 new BaseDirObjective()
64 );
65 }

◆ getMigrations()

ILIAS\FileDelivery\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 83 of file Agent.php.

83 : array
84 {
85 return [];
86 }

◆ getNamedObjectives()

ILIAS\FileDelivery\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 41 of file Agent.php.

41 : array
42 {
43 return [];
44 }

◆ getStatusObjective()

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

Definition at line 78 of file Agent.php.

78 : Objective
79 {
80 return new NullObjective();
81 }

◆ getUpdateObjective()

ILIAS\FileDelivery\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 67 of file Agent.php.

67 : Objective
68 {
69 return new ObjectiveCollection(
70 'FileDelivery',
71 true,
72 new KeyRotationObjective(),
73 new DeliveryMethodObjective(),
74 new BaseDirObjective()
75 );
76 }

◆ hasConfig()

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

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

Definition at line 46 of file Agent.php.

46 : bool
47 {
48 return false;
49 }

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