org.licas

## Class ServiceInitialise

- java.lang.Object
- - org.licas.ServiceInitialise

- All Implemented Interfaces:
    ServiceInitialiseDef
  Direct Known Subclasses:
    DataServiceInitialise

      public class ServiceInitialise
      extends java.lang.Object
      implements ServiceInitialiseDef

  This class performs some additional or final initialisations, after a service has been properly loaded and registered. If it has been created with an admin document for example, the metadata might describe some additional operations that should be carried out, such as loading in some default utility services. This description needs to be converted into the instructions to load in those services, which is what this default implementation will do.
  Author:
    Kieran Greer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Service` | `parentService` The parent service
    `protected PasswordHandler` | `passwordHandler` The parent service's password handler
    `protected ServiceAdmin` | `serviceAdmin` The parent service's admin handler

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServiceInitialise(Service theParentService, ServiceAdmin theServiceAdmin, PasswordHandler thePasswordHandler)` Create a new instance of ServiceInitialise.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `finaliseInitialisation(org.licas_xml.abs.Element serviceXml)` Finalise the initialisation of the service.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### passwordHandler

          protected PasswordHandler passwordHandler

      The parent service's password handler

    - #### serviceAdmin

          protected ServiceAdmin serviceAdmin

      The parent service's admin handler

    - #### parentService

          protected Service parentService

      The parent service

  - ### Constructor Detail

    - #### ServiceInitialise

          public ServiceInitialise(Service theParentService,
                                   ServiceAdmin theServiceAdmin,
                                   PasswordHandler thePasswordHandler)

      Create a new instance of ServiceInitialise.
      Parameters:
        `theParentService` - the parent service.
        `theServiceAdmin` - the parent service's admin handler.
        `thePasswordHandler` - the parent service's password handler.

  - ### Method Detail

    - #### finaliseInitialisation

          public void finaliseInitialisation(org.licas_xml.abs.Element serviceXml)
                                      throws java.lang.Exception

      Finalise the initialisation of the service. If an admin document is passed, this default implementation uses it to create and load a child service onto this one.
      Specified by:
        `finaliseInitialisation` in interface `ServiceInitialiseDef`
      Parameters:
        `serviceXml` - XML description of the service to load.
      Throws:
        `java.lang.Exception` - any error.