org.licas.parsers.network

## Class SoaParserLinks

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

-     public class SoaParserLinks
      extends java.lang.Object

  This class can be used to parse only the linking structures of the local server services.
  Author:
    Kieran Greer

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `parse(org.licas_xml.abs.Element linksElem, java.lang.String password, java.lang.String adminKey)` Parse the XML description of the links and add them to the related service.
    `protected void` | `parseLinks(java.lang.String serviceUuid, org.licas_xml.abs.Element linkElem, java.lang.String password, java.lang.String adminKey)` Parse the links element to add the defined links.
    `org.licas_xml.abs.Element` | `serialize(java.lang.String password, java.lang.String adminKey, java.util.ArrayList serviceIDs)` Serialise the whole network into XML.

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

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

- - ### Constructor Detail

    - #### SoaParserLinks

          public SoaParserLinks(SoaParserPasswords thePasswordsParser)

      Create a new instance of SoaParserLinks.
      Parameters:
        `thePasswordsParser` - the passwords parser. This should have already been used to parse the passwords, when they are retrieved only in this class.

  - ### Method Detail

    - #### serialize

          public org.licas_xml.abs.Element serialize(java.lang.String password,
                                                     java.lang.String adminKey,
                                                     java.util.ArrayList serviceIDs)
                                              throws java.lang.Exception

      Serialise the whole network into XML.
      Parameters:
        `password` - the password to access the server.
        `adminKey` - the admin key for the server.
        `serviceIDs` - list of IDs of base services running on the network.
      Returns:
        an XML description of the linking structure for all services in the network.
      Throws:
        `java.lang.Exception` - any error.

    - #### parse

          public void parse(org.licas_xml.abs.Element linksElem,
                            java.lang.String password,
                            java.lang.String adminKey)
                     throws java.lang.Exception

      Parse the XML description of the links and add them to the related service.
      Parameters:
        `linksElem` - the XML description of all links for all services on the network.
        `password` - the password to access the server.
        `adminKey` - the server admin key.
      Throws:
        `java.lang.Exception` - any error.

    - #### parseLinks

          protected void parseLinks(java.lang.String serviceUuid,
                                    org.licas_xml.abs.Element linkElem,
                                    java.lang.String password,
                                    java.lang.String adminKey)
                             throws java.lang.Exception

      Parse the links element to add the defined links.
      Parameters:
        `serviceUuid` - the uuid of the service to add links to.
        `linkElem` - The XML description of the links.
        `password` - the server password.
        `adminKey` - the server admin key.
      Throws:
        `java.lang.Exception` - any error.