Package com.orchestranetworks.module

# Interface ModuleContextOnRepositoryStartup

public interface ModuleContextOnRepositoryStartup
Context for the registration of a module, invoked at the initialization of the EBX® repository.

Since:
  5.7.1
See Also:
  - Module registration
  - `ModuleRegistration.handleRepositoryStartup(ModuleContextOnRepositoryStartup)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addExternalJavaScriptResource(String anExternalResourceURL)`
  Registers a JavaScript resource external to the current module to be included in every page.
  `void`
  `addExternalStyleSheetResource(String anExternalResourceURL)`
  Registers a Cascading Style Sheet (CSS) resource external to the current module to be included in every page.
  `void`
  `addPackagedJavaScriptResource(String aResourceName)`
  Registers a JavaScript resource packaged in the current module to be included in every page.
  `void`
  `addPackagedStyleSheetResource(String aResourceName)`
  Registers a Cascading Style Sheet (CSS) resource packaged in the current module to be included in every page.
  `Session`
  `createSystemUserSession(String aTrackingInformationComplementOrNull)`
  Creates a session executing as the "system user".
  `LoggingCategory`
  `getLoggingCategory()`
  Returns the logging category associated with the current module.
  `String`
  `getModuleName()`
  Returns the current module name.
  `Repository`
  `getRepository()`
  Returns the current repository.

- ## Method Details

  - ### getModuleName

    String getModuleName()
    Returns the current module name.

  - ### getRepository

    Repository getRepository()
    Returns the current repository.

  - ### createSystemUserSession

    Session createSystemUserSession(String aTrackingInformationComplementOrNull)
    Creates a session executing as the "system user".

    This means that this session will have all privileges.

    Parameters:
      `aTrackingInformationComplementOrNull` - the tracking information complement is added to a specific tracking information.
    Since:
      5.9.0

  - ### getLoggingCategory

    LoggingCategory getLoggingCategory()
    Returns the logging category associated with the current module.

    Returned logger is always initialized, so it can be stored for further reuse.

  - ### addPackagedJavaScriptResource

    void addPackagedJavaScriptResource(String aResourceName)
    Registers a JavaScript resource packaged in the current module to be included in every page.

    This resource must be located in the module, at `www/common/jscripts/{aResourceName}` (or `www/{locale}/jscripts/{aResourceName}` if the resource has to be localized).

    If the JavaScript to be used is specific to some components, it is recommended to use the method `UIDependencyRegisterer.addJavaScriptDependency(String)` instead.

    See Also:
      - `ResourceType.JSCRIPT`
      - Packaged resources

  - ### addExternalJavaScriptResource

    void addExternalJavaScriptResource(String anExternalResourceURL)
    Registers a JavaScript resource external to the current module to be included in every page.

    If several modules include the same external resource, it will be added only once.

    If the JavaScript to be used is specific to some components, it is recommended to use the method `UIDependencyRegisterer.addJavaScriptDependency(String)` instead.

  - ### addPackagedStyleSheetResource

    void addPackagedStyleSheetResource(String aResourceName)
    Registers a Cascading Style Sheet (CSS) resource packaged in the current module to be included in every page.

    This resource must be located in the module, at `www/common/stylesheets/{aResourceName}` (or `www/{locale}/stylesheets/{aResourceName}` if the resource has to be localized).

    See Also:
      - `ResourceType.STYLESHEET`
      - Packaged resources

  - ### addExternalStyleSheetResource

    void addExternalStyleSheetResource(String anExternalResourceURL)
    Registers a Cascading Style Sheet (CSS) resource external to the current module to be included in every page.

    If several modules include the same external resource, it will be added only once.