ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Setup\Agent Interface Reference

A agent is some component that performs part of the setup process. More...

+ Inheritance diagram for ILIAS\Setup\Agent:
+ Collaboration diagram for ILIAS\Setup\Agent:

Public Member Functions

 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...
 
 getBuildArtifactObjective ()
 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

A agent is some component that performs part of the setup process.

Definition at line 29 of file Agent.php.

Member Function Documentation

◆ getArrayToConfigTransformation()

ILIAS\Setup\Agent::getArrayToConfigTransformation ( )

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

Exceptions
LogicExceptionif Agent has no Config

Implemented in ILIAS\Setup\AgentCollection, ILIAS\Setup\Agent\NullAgent, ilTreeSetupAgent, ilCourseObjectiveSetupAgent, ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent, ilTestQuestionPoolSetupAgent, ilResourceStorageSetupAgent, ILIAS\LDAP\Setup\LDAPSetupAgent, and ilUICoreSetupAgent.

Referenced by ILIAS\Setup\CLI\readAgentConfig().

+ Here is the caller graph for this function:

◆ getBuildArtifactObjective()

ILIAS\Setup\Agent::getBuildArtifactObjective ( )

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

Exceptions
InvalidArgumentExceptionif Config does not match the Agent.

Implemented in ILIAS\Setup\AgentCollection, ILIAS\Setup\Agent\NullAgent, ilResourceStorageSetupAgent, ilTreeSetupAgent, ilUICoreSetupAgent, ILIAS\LDAP\Setup\LDAPSetupAgent, ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent, ilCourseObjectiveSetupAgent, and ilTestQuestionPoolSetupAgent.

Referenced by ILIAS\Setup\AgentCollection\getBuildArtifactObjective().

+ Here is the caller graph for this function:

◆ getInstallObjective()

ILIAS\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..

Implemented in ILIAS\Setup\AgentCollection, ILIAS\Setup\Agent\NullAgent, ilTreeSetupAgent, ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent, ilCourseObjectiveSetupAgent, ilTestQuestionPoolSetupAgent, ilResourceStorageSetupAgent, and ilUICoreSetupAgent.

Referenced by ILIAS\Setup\AgentCollection\getInstallObjective().

+ Here is the caller graph for this function:

◆ getMigrations()

ILIAS\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[]

Implemented in ILIAS\Setup\Agent\NullAgent, ilResourceStorageSetupAgent, ilUICoreSetupAgent, ilTreeSetupAgent, ILIAS\LDAP\Setup\LDAPSetupAgent, ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent, and ilTestQuestionPoolSetupAgent.

Referenced by ILIAS\Setup\AgentCollection\getStatusObjective().

+ Here is the caller graph for this function:

◆ getNamedObjectives()

ILIAS\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>

Implemented in ILIAS\Setup\AgentCollection, ILIAS\Setup\Agent\NullAgent, ilUICoreSetupAgent, ilTreeSetupAgent, and ILIAS\EmployeeTalk\Setup\ilEmployeeTalkSetupAgent.

◆ getStatusObjective()

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

Get the objective to be achieved when status is requested.

Make sure that this runs in a reasonable time and also uses a reasonable amount of ressources, since the command fed by this objective is meant to be called by monitoring systems in short intervalls. So no expansive queries, complicated calculations or long lasting network requests.

This is supposed to inform about any kind of metrics regarding the component.

Implemented in ILIAS\Setup\AgentCollection.

Referenced by ILIAS\Setup\CLI\StatusCommand\getMetrics(), and ILIAS\Setup\AgentCollection\getStatusObjective().

+ Here is the caller graph for this function:

◆ getUpdateObjective()

ILIAS\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..

Implemented in ILIAS\Setup\AgentCollection, ILIAS\Setup\Agent\NullAgent, ilResourceStorageSetupAgent, ilTreeSetupAgent, ilUICoreSetupAgent, and ILIAS\Dashboard\Setup\ilDashboardUpdateAgent.

Referenced by ILIAS\Setup\AgentCollection\getUpdateObjective().

+ Here is the caller graph for this function:

◆ hasConfig()


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