org.licas.def.search

## Interface AutoMetaSearchDef

- All Known Implementing Classes:
    AutoMetaSearch

      public interface AutoMetaSearchDef

  This is an interface for including your own autonomic manager query service.
  Author:
    Kieran Greer

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.licas_xml.abs.Element` | `autoSearch(java.lang.String queryEngine, int callTimeout, org.licas_xml.abs.Element request, ServiceLinks serverLinks)` Allow the server to perform queries over all of the registered autonomic managers, to find matching information.
    `java.util.HashMap<java.lang.String,java.lang.String>` | `getServiceClasses()` Get the class types for all services that are stored.
    `java.util.ArrayList<java.lang.String>` | `getServiceNames()` Get all child service names.
    `java.util.ArrayList<java.lang.String>` | `getServiceNames(java.util.ArrayList<java.lang.String> thisServiceTypes, boolean reciprocal)` Return all child service names for a list of service types.
    `java.util.ArrayList<java.lang.String>` | `getServiceTypes()` Return all service types for all stored services.

- - ### Method Detail

    - #### getServiceNames

          java.util.ArrayList<java.lang.String> getServiceNames()

      Get all child service names.
      Returns:
        all service uuids, of type String.

    - #### getServiceNames

          java.util.ArrayList<java.lang.String> getServiceNames(java.util.ArrayList<java.lang.String> thisServiceTypes,
                                                                boolean reciprocal)
                                                         throws LicasException

      Return all child service names for a list of service types.
      Parameters:
        `thisServiceTypes` - the service types list.
        `reciprocal` - is false return all service names of the service types, if true return all service names of all other types.
      Returns:
        the service names for the service types list.
      Throws:
        `LicasException` - if the service types input is `null`.

    - #### getServiceTypes

          java.util.ArrayList<java.lang.String> getServiceTypes()

      Return all service types for all stored services.
      Returns:
        all service types.

    - #### getServiceClasses

          java.util.HashMap<java.lang.String,java.lang.String> getServiceClasses()

      Get the class types for all services that are stored.
      Returns:
        the service handles with the class types for the services of this component.

    - #### autoSearch

          org.licas_xml.abs.Element autoSearch(java.lang.String queryEngine,
                                               int callTimeout,
                                               org.licas_xml.abs.Element request,
                                               ServiceLinks serverLinks)
                                        throws java.lang.Exception

      Allow the server to perform queries over all of the registered autonomic managers, to find matching information. To be recognised by the default classes, the root `request` element should have the tag name of `QueryConst`.`QUERYMODEL`, or 'Query_Model'. This should then contain a description of the query request. For this default model, the XML request that is passed in needs to be parsed by a `QueryParser` parser into a `QueryModel` object, of the 'licas_text' package. This is what the default classes will then evaluate. The documentation describes the different fields in more detail.
      Parameters:
        `queryEngine` - the query engine type. Required for a distributed query.
        `callTimeout` - maximum time allowed for the call (in milliseconds).
        `request` - the query request.
        `serverLinks` - for links with other servers. These will also be queried.
      Returns:
        any suitable matches to the request. These are stored inside of an element for each related service, with attributes to describe the service uuid and type.
      Throws:
        `java.lang.Exception` - any error.