ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\FileDelivery\Setup\Agent Class Reference
+ Inheritance diagram for ILIAS\FileDelivery\Setup\Agent:
+ Collaboration diagram for ILIAS\FileDelivery\Setup\Agent:

Public Member Functions

 getBuildArtifactObjective ()
 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 (Metrics\Storage $storage)
 
 getMigrations ()
 Get a named map of migrations available for this Agent. More...
 
- Public Member Functions inherited from ILIAS\Setup\Agent
 getStatusObjective (Metrics\Storage $storage)
 Get the objective to be achieved when status is requested. More...
 

Detailed Description

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

Definition at line 32 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 55 of file Agent.php.

55  : Transformation
56  {
57  throw new LogicException("No Config");
58  }

◆ getBuildArtifactObjective()

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

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 34 of file Agent.php.

34  : Objective
35  {
36  return new Setup\ObjectiveCollection(
37  'File StreamDelivery Artifacts',
38  true,
39  new KeyRotationObjective(),
40  new DeliveryMethodObjective(),
41  // new BaseDirObjective() // removed objective since it's not possible to run it in some environments
42  );
43  }

◆ 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 60 of file Agent.php.

60  : Objective
61  {
62  return new DeliveryMethodObjective();
63  }

◆ 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 75 of file Agent.php.

75  : array
76  {
77  return [];
78  }

◆ 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 45 of file Agent.php.

45  : array
46  {
47  return [];
48  }

◆ getStatusObjective()

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

Definition at line 70 of file Agent.php.

70  : Objective
71  {
72  return new Objective\NullObjective();
73  }

◆ 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 65 of file Agent.php.

65  : Objective
66  {
67  return new DeliveryMethodObjective();
68  }

◆ hasConfig()

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

Does this agent require a configuration?

Implements ILIAS\Setup\Agent.

Definition at line 50 of file Agent.php.

50  : bool
51  {
52  return false;
53  }

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