org.licas

## Class ServiceAdminHandler

- java.lang.Object
- - org.licas.ServiceAdminHandler

-     public class ServiceAdminHandler
      extends java.lang.Object

  This class manages basic creation and parsing for Service Admin objects.
  Author:
    Kieran Greer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServiceAdminHandler()` Create a new instance of ServiceAdminHandler.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.licas_xml.abs.Element` | `createAdminOnlyContractNo()` Create an admin document with only a yes contract section.
    `static org.licas_xml.abs.Element` | `createAdminOnlyContractYes()` Create an admin document with only a yes contract section.
    `static ServiceMeta` | `createFullServiceMeta(java.util.ArrayList<java.lang.String> jarFile, java.lang.String theAdminKey, ServiceAdmin sa)` Create a full metadata description of this service.
    `static ServiceMeta` | `createMetaForRepos(ServiceAdmin sa)` Create a metadata description of the parent service for the server repository.
    `static ServiceMeta` | `createServiceMeta(java.util.ArrayList<java.lang.String> jarFile, java.lang.String theAdminKey, ServiceAdmin sa)` Create a full metadata description of this service.
    `static void` | `parseAdminInfo(org.licas_xml.abs.Element adminXml, ServiceAdmin sa)` Parse the admin info XML to create the service admin info.
    `static void` | `parseAdminXml(org.licas_xml.abs.Element adminXml, ServiceAdmin sa)` Parse the adminXml element to determine what information it contains.

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

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

- - ### Constructor Detail

    - #### ServiceAdminHandler

          public ServiceAdminHandler()

      Create a new instance of ServiceAdminHandler.

  - ### Method Detail

    - #### parseAdminInfo

          public static void parseAdminInfo(org.licas_xml.abs.Element adminXml,
                                            ServiceAdmin sa)
                                     throws java.lang.Exception

      Parse the admin info XML to create the service admin info.
      Parameters:
        `adminXml` - the xml-based description of the service.
        `sa` - the ServiceAdmin the operation is for.
      Throws:
        `java.lang.Exception` - any error.

    - #### parseAdminXml

          public static void parseAdminXml(org.licas_xml.abs.Element adminXml,
                                           ServiceAdmin sa)
                                    throws java.lang.Exception

      Parse the adminXml element to determine what information it contains.
      Parameters:
        `adminXml` - the metadata adminXml.
        `sa` - the ServiceAdmin the operation is for.
      Throws:
        `java.lang.Exception` - any error.

    - #### createServiceMeta

          public static ServiceMeta createServiceMeta(java.util.ArrayList<java.lang.String> jarFile,
                                                      java.lang.String theAdminKey,
                                                      ServiceAdmin sa)
                                               throws java.lang.Exception

      Create a full metadata description of this service. If this is a wrapper for a legacy object, then ask the server for any stored metadata description and use that if available. It may have been created or initialised from one. If it is derived from `Service` then create a new one so that the settings are the most recent. The description describes only this service and no nested services.
      Parameters:
        `jarFile` - list of remote jar files if loaded remotely.
        `theAdminKey` - the unique service key for admin purposes.
        `sa` - the ServiceAdmin the operation is for.
      Returns:
        a metadata description of this service.
      Throws:
        `java.lang.Exception` - any error.

    - #### createFullServiceMeta

          public static ServiceMeta createFullServiceMeta(java.util.ArrayList<java.lang.String> jarFile,
                                                          java.lang.String theAdminKey,
                                                          ServiceAdmin sa)
                                                   throws java.lang.Exception

      Create a full metadata description of this service. The description describes only this service and no nested services.
      Parameters:
        `jarFile` - list of remote jar files if loaded remotely.
        `theAdminKey` - the unique service key for admin purposes.
        `sa` - the ServiceAdmin the operation is for.
      Returns:
        a metadata description of this service.
      Throws:
        `java.lang.Exception` - any error.

    - #### createMetaForRepos

          public static ServiceMeta createMetaForRepos(ServiceAdmin sa)
                                                throws java.lang.Exception

      Create a metadata description of the parent service for the server repository. The description describes only this service and no nested services.
      Parameters:
        `sa` - the ServiceAdmin the operation is for.
      Returns:
        a metadata description of this service.
      Throws:
        `java.lang.Exception` - any error.

    - #### createAdminOnlyContractYes

          public static org.licas_xml.abs.Element createAdminOnlyContractYes()

      Create an admin document with only a yes contract section.
      Returns:
        an xml-based description of the admin document.

    - #### createAdminOnlyContractNo

          public static org.licas_xml.abs.Element createAdminOnlyContractNo()

      Create an admin document with only a yes contract section.
      Returns:
        an xml-based description of the admin document.