com.h3c.sdn.artifact

## Class ManagedPlan

- java.lang.Object
- - com.h3c.sdn.BaseModel
  - - com.h3c.sdn.artifact.ManagedPlan

- All Implemented Interfaces:
    Identified, Serializable

      public class ManagedPlan
      extends BaseModel

  Representation for an OSGi plan managed by the system.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ManagedPlan(String name, String planVersion, boolean scoped, boolean atomic, String uriPath, Date time)` Construct the Managed Plan.
    `ManagedPlan(String uid, String name, String planVersion, boolean scoped, boolean atomic, String uriPath, Date time)` Construct the Managed Plan with a unique identification.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getComponentNamePrefix()` Returns the prefix that will be added to the OSGi symbolic name of all artifacts defined within this plan.
    `Date` | `getDeploymentTime()` Returns the `Date` associated with the deployment of this managed plan to the system.
    `String` | `getPlanName()` Returns the name associated with this managed plan.
    `String` | `getPlanVersion()` Returns the version associated with this managed plan.
    `String` | `getState()` Returns the OSGi state associated with this managed plan.
    `String` | `getUriPath()` Returns the string representing the Uniform Resource Identifier path for this plan.
    `boolean` | `isAtomic()` Returns `true` if this plan is atomic.
    `boolean` | `isScoped()` Returns `true` if this plan is scoped.
    `void` | `setState(String state)` Sets the managed plan to the supplied OSGi state (represented as a string).

    - ### Methods inherited from class com.h3c.sdn.BaseModel

      `equals, hashCode, toString, uid`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ManagedPlan

          public ManagedPlan(String name,
                     String planVersion,
                     boolean scoped,
                     boolean atomic,
                     String uriPath,
                     Date time)

      Construct the Managed Plan. An unique identification will be generated.
      Parameters:
        `name` - the name of the plan
        `planVersion` - the version of the plan
        `scoped` - `true` if this plan is scoped
        `atomic` - `true` if this plan is atomic
        `uriPath` - the URI file path of the plan
        `time` - the time the plan was created

    - #### ManagedPlan

          public ManagedPlan(String uid,
                     String name,
                     String planVersion,
                     boolean scoped,
                     boolean atomic,
                     String uriPath,
                     Date time)

      Construct the Managed Plan with a unique identification. The supplied unique identification must not be null.
      Parameters:
        `uid` - the externally unique identification of the plan
        `name` - the name of the plan
        `planVersion` - the version of the plan
        `scoped` - `true` if this plan is scoped
        `atomic` - `true` if this plan is atomic
        `uriPath` - the URI file path of the plan
        `time` - the time the plan was created
      Throws:
        `IllegalArgumentException` - if unique identification is null

  - ### Method Detail

    - #### getPlanName

          public String getPlanName()

      Returns the name associated with this managed plan.
      Returns:
        the plan name

    - #### getPlanVersion

          public String getPlanVersion()

      Returns the version associated with this managed plan.
      Returns:
        the version

    - #### isScoped

          public boolean isScoped()

      Returns `true` if this plan is scoped.
      Returns:
        `true` if plan is scoped

    - #### isAtomic

          public boolean isAtomic()

      Returns `true` if this plan is atomic.
      Returns:
        `true` if this plan is atomic

    - #### getUriPath

          public String getUriPath()

      Returns the string representing the Uniform Resource Identifier path for this plan.
      Returns:
        the uriPath

    - #### getDeploymentTime

          public Date getDeploymentTime()

      Returns the `Date` associated with the deployment of this managed plan to the system.
      Returns:
        the `Date` of deployment

    - #### getState

          public String getState()

      Returns the OSGi state associated with this managed plan.
      Returns:
        the OSGi state of the plna as a string

    - #### setState

          public void setState(String state)

      Sets the managed plan to the supplied OSGi state (represented as a string).
      Parameters:
        `state` - the OSGi state for the managed plan

    - #### getComponentNamePrefix

          public String getComponentNamePrefix()

      Returns the prefix that will be added to the OSGi symbolic name of all artifacts defined within this plan. If the plan is defined as a scoped plan, the prefix to be added to the symbolic name of member attributes will include the plan name and version. If the plan is not defined as a scoped plan, this prefix string will be the `StringUtils.EMPTY` string.
      Returns:
        The required OSGi symbolic name prefix for all artifacts defined within this plan

Copyright © 2014. All Rights Reserved.