QueryPath
Date: 2014-06-04

org.gcube.vremanagement.resourcebroker.impl.support.queries

## Enum QueryPath

- java.lang.Object
- - java.lang.Enum<QueryPath>
  - - org.gcube.vremanagement.resourcebroker.impl.support.queries.QueryPath

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<QueryPath>

      public enum QueryPath
      extends java.lang.Enum<QueryPath>

  Author:
    Daniele Strollo (ISTI-CNR)

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `COUNT_RI_ON_DYNAMIC_ALIVE_GHN` Returns the set of GHNs and the number of RI allocated on them.
    `COUNT_RI_ON_DYNAMIC_ALIVE_GHN_BY_ID` Returns the information of a GHN and the number of RI allocated on it.
    `GET_GHN_FOR_RI` Given a RI unique ID retrieves the GHN ID on which it is running.
    `GET_SERVICE_REQS` Given a quintuple representing a package to deploy of the form:

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.io.InputStream` | `getFileName()`
    `static QueryPath` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static QueryPath[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### COUNT_RI_ON_DYNAMIC_ALIVE_GHN

          public static final QueryPath COUNT_RI_ON_DYNAMIC_ALIVE_GHN

      Returns the set of GHNs and the number of RI allocated on them. Here the GHNs are filtered by type 'Dynamic' and is returned the number of minuted elapsed from last update (to check if they are still alive).

      Params: MAXWAIT an integer representing the max minutes elapsed from the last update that have to be considered, the other GHNs will be excluded.

           Returns tuples of elements of the form:

           <RIONGHN>
                  <ID>b82e4460-1d85-11df-8246-af2e4af0f652</ID>
                  <AllocatedRI>4</AllocatedRI>
                  <LastUpdate>2010-02-23T15:08:05+01:00</LastUpdate>
                  <UpdateMinutesElapsed>2</UpdateMinutesElapsed>
           </RIONGHN>

    - #### COUNT_RI_ON_DYNAMIC_ALIVE_GHN_BY_ID

          public static final QueryPath COUNT_RI_ON_DYNAMIC_ALIVE_GHN_BY_ID

      Returns the information of a GHN and the number of RI allocated on it.

           Params:

            MAXWAIT an integer representing the max minutes elapsed from
                  the last update that have to be considered, the other GHNs will be excluded.

            PARAM_GHNID the ID of GHN.

           Returns a tuple (if exists) of the form:

           <RIONGHN>
                  <GHNID>b82e4460-1d85-11df-8246-af2e4af0f652</GHNID>
                  <AllocatedRI>4</AllocatedRI>
                  <LastUpdate>2010-02-23T15:08:05+01:00</LastUpdate>
                  <UpdateMinutesElapsed>2</UpdateMinutesElapsed>
           </RIONGHN>

    - #### GET_GHN_FOR_RI

          public static final QueryPath GET_GHN_FOR_RI

      Given a RI unique ID retrieves the GHN ID on which it is running. Requires a parameter .

           Params:

                  RI_ID corresponding to the unique ID of retrieved RunningInstance.

           Returns a tuple (if exists) of the form:

           <RunningInstance>
                  <RiID>ffc03e80-1fa8-11df-a7f2-82c9a6c0f9ae</RiID>
                  <GHNID>da5e2300-126a-11df-9d89-bc30db7399aa</GHNID>
           </RunningInstance>

    - #### GET_SERVICE_REQS

          public static final QueryPath GET_SERVICE_REQS

      Given a quintuple representing a package to deploy of the form:

                  <Package reuse="true">
                          <ServiceClass>PkgServiceClass</ServiceClass>
                          <ServiceName>PkgServiceName</ServiceName>
                          <ServiceVersion>PkgServiceVersion</ServiceVersion>
                          <PackageName>PkgPackageName</PackageName>
                          <PackageVersion>PkgPackageVersion</PackageVersion>
                  </Package>

      it retrieves from the IS the list of all service corresponding to these.

      Parameters:

      - SERVICE_CLASS
      - SERVICE_NAME
      - PKG_NAME
      - PKG_CLASS

  - ### Method Detail

    - #### values

          public static QueryPath[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (QueryPath c : QueryPath.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static QueryPath valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### getFileName

          public java.io.InputStream getFileName()