PlanBuilderElem
Date: 2014-06-04

org.gcube.vremanagement.resourcebroker.impl.planbuilders

## Class PlanBuilderElem

- java.lang.Object
- - org.gcube.vremanagement.resourcebroker.impl.planbuilders.PlanBuilderElem

-     public class PlanBuilderElem
      extends java.lang.Object

  A class containing all the information needed to a `PlanBuilderTask` to receive the request to make a new plan and for representing the corresponding decision.

  Encapsulates a `org.gcube.vremanagement.resourcebroker.utils.serialization.types.PlanRequest`, a `PlanResponse` and a list of gHN ids (strings). At each stage of decision planning, implemented through `PlanBuilderTask` elements, the elements can be removed from the request (once they are supposed to have reached a satisfying condition to deploy) and the response is incrementally built. The list of selected gHNs is used to avoid multiple usage of the same gHN when overloaded.

  Author:
    Daniele Strollo (ISTI-CNR)
  See Also:
    `PlanBuilderTask`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PlanBuilderElem(PlanRequest request)` Creates a new `PlanBuilderElem`.
    `PlanBuilderElem(PlanRequest request, PlanResponse response)` Creates a new `PlanBuilderElem`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PlanBuilderIdentifier` | `getID()`
    `PlanRequest` | `getRequest()`
    `PlanResponse` | `getResponse()`

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

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

- - ### Constructor Detail

    - #### PlanBuilderElem

          public PlanBuilderElem(PlanRequest request)

      Creates a new `PlanBuilderElem`.
      Parameters:
        `request` - the `org.gcube.vremanagement.resourcebroker.utils.serialization.types.PlanRequest` to handle.

    - #### PlanBuilderElem

          public PlanBuilderElem(PlanRequest request,
                         PlanResponse response)

      Creates a new `PlanBuilderElem`.
      Parameters:
        `request` - the `org.gcube.vremanagement.resourcebroker.utils.serialization.types.PlanRequest` to handle.
        `response` - if null a new one will be assigned.

  - ### Method Detail

    - #### getID

          public final PlanBuilderIdentifier getID()

    - #### getRequest

          public final PlanRequest getRequest()

    - #### getResponse

          public final PlanResponse getResponse()