org.licas.parsers.network

## Class SoaParserPasswords

- java.lang.Object
- - org.licas.parsers.network.SoaParserPasswords

-     public class SoaParserPasswords
      extends java.lang.Object

  This class can be used to parse the passwords list stored for the local server services.
  Author:
    Kieran Greer

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getAdminDoc(java.lang.String serviceID)` Get the service admin doc file path.
    `java.lang.String` | `getAdminKey(java.lang.String serviceID)` Get the service admin key.
    `java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>>` | `getAllPasswords()` Get the list of all password values for each service.
    `java.lang.String` | `getPassword(java.lang.String serviceID)` Get the service password.
    `boolean` | `getStartThread(java.lang.String serviceID)` Get the service start thread state.
    `protected java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>>` | `parse(org.licas_xml.abs.Element passwordsElem)` Parse the passwords description to add all service passwords.
    `protected org.licas_xml.abs.Element` | `serialize(java.lang.String password, java.lang.String adminKey)` Serialise all passwords for all services on the server into XML.

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

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

- - ### Constructor Detail

    - #### SoaParserPasswords

          public SoaParserPasswords()

      Create a new instance of SoaParserPasswords.

  - ### Method Detail

    - #### serialize

          protected org.licas_xml.abs.Element serialize(java.lang.String password,
                                                        java.lang.String adminKey)
                                                 throws java.lang.Exception

      Serialise all passwords for all services on the server into XML.
      Parameters:
        `password` - the password to access the server.
        `adminKey` - the admin key for the server.
      Returns:
        an XML description of all passwords for all services.
      Throws:
        `java.lang.Exception` - any error.

    - #### parse

          protected java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> parse(org.licas_xml.abs.Element passwordsElem)
                                                                                             throws java.lang.Exception

      Parse the passwords description to add all service passwords.
      Parameters:
        `passwordsElem` - the root passwords element.
      Returns:
        the passwords stored for each service. Keys are the service ids of type full URI String and values are password-related values of type a ArrayList of Objects, for service state, password and admin key.
      Throws:
        `java.lang.Exception` - any error.

    - #### getStartThread

          public boolean getStartThread(java.lang.String serviceID)
                                 throws java.lang.Exception

      Get the service start thread state.
      Parameters:
        `serviceID` - the id of the service to retrieve.
      Returns:
        true if start the thread, false otherwise.
      Throws:
        `java.lang.Exception` - any error.

    - #### getPassword

          public java.lang.String getPassword(java.lang.String serviceID)
                                       throws java.lang.Exception

      Get the service password.
      Parameters:
        `serviceID` - the id of the service to retrieve.
      Returns:
        the password or null if one does not exist.
      Throws:
        `java.lang.Exception` - any error.

    - #### getAdminKey

          public java.lang.String getAdminKey(java.lang.String serviceID)
                                       throws java.lang.Exception

      Get the service admin key.
      Parameters:
        `serviceID` - the id of the service to retrieve.
      Returns:
        the admin key or null if one does not exist.
      Throws:
        `java.lang.Exception` - any error.

    - #### getAdminDoc

          public java.lang.String getAdminDoc(java.lang.String serviceID)
                                       throws java.lang.Exception

      Get the service admin doc file path.
      Parameters:
        `serviceID` - the id of the service to retrieve.
      Returns:
        the admin doc file path or null if one does not exist.
      Throws:
        `java.lang.Exception` - any error.

    - #### getAllPasswords

          public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> getAllPasswords()

      Get the list of all password values for each service.
      Returns:
        the value of allPasswords.