com.h3c.sdn.artifact

## Class ManagedArtifact

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

- All Implemented Interfaces:
    Identified, Serializable

      public class ManagedArtifact
      extends BaseModel

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ManagedArtifact(String name, ArtifactType type, String artifactVersion, String uriPath, Date time)` Construct the Managed Artifact.
    `ManagedArtifact(String uid, String name, ArtifactType type, String artifactVersion, String uriPath, Date time)` Construct the Managed Artifact with a unique identification.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getArtifactName()` Returns the name associated with this managed artifact.
    `String` | `getArtifactVersion()` Returns the version associated with this managed artifact.
    `Date` | `getDeploymentTime()` Returns the `Date` associated with the deployment of this managed artifact to the system.
    `String` | `getPlanName()` Returns the name of the OSGi plan which includes this artifact.
    `String` | `getState()` Returns the OSGi state associated with this managed artifact.
    `ArtifactType` | `getType()` Returns the `ArtifactType` associated with this managed artifact.
    `String` | `getUriPath()` Returns the string representing the Uniform Resource Identifier path for this artifact.
    `void` | `setPlanName(String planName)` Sets the name for the plan that this artifact is associated with.
    `void` | `setState(String state)` Sets the managed artifact 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

    - #### ManagedArtifact

          public ManagedArtifact(String name,
                         ArtifactType type,
                         String artifactVersion,
                         String uriPath,
                         Date time)

      Construct the Managed Artifact. An unique identification will be generated.
      Parameters:
        `name` - the symbolic name of the artifact
        `type` - the type of artifact
        `artifactVersion` - the version of the artifact
        `uriPath` - the URI file path of the artifact
        `time` - the time the artifact was created

    - #### ManagedArtifact

          public ManagedArtifact(String uid,
                         String name,
                         ArtifactType type,
                         String artifactVersion,
                         String uriPath,
                         Date time)

      Construct the Managed Artifact with a unique identification. The supplied unique identification must not be null.
      Parameters:
        `uid` - the externally unique identification of the artifact
        `name` - the symbolic name of the artifact
        `type` - the type of artifact
        `artifactVersion` - the version of the artifact
        `uriPath` - the URI file path of the artifact
        `time` - the time the artifact was created
      Throws:
        `IllegalArgumentException` - if unique identification is null

  - ### Method Detail

    - #### getArtifactName

          public String getArtifactName()

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

    - #### getType

          public ArtifactType getType()

      Returns the `ArtifactType` associated with this managed artifact.
      Returns:
        the `ArtifactType`

    - #### getArtifactVersion

          public String getArtifactVersion()

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

    - #### getUriPath

          public String getUriPath()

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

    - #### getDeploymentTime

          public Date getDeploymentTime()

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

    - #### getState

          public String getState()

      Returns the OSGi state associated with this managed artifact. The state is determined at runtime when requested, and is not backed by persistence.
      Returns:
        the OSGi state of the artifact as a string

    - #### setState

          public void setState(String state)

      Sets the managed artifact to the supplied OSGi state (represented as a string). The OSGi state for a given artifact is provided by the OSGi framework.
      Parameters:
        `state` - the OSGi state for the managed artifact

    - #### getPlanName

          public String getPlanName()

      Returns the name of the OSGi plan which includes this artifact. The name will be null if the artifact is not associated with a given plan. The plan name is determined at runtime when requested, and is not backed by persistence.
      Returns:
        the planName

    - #### setPlanName

          public void setPlanName(String planName)

      Sets the name for the plan that this artifact is associated with. The name value is determined at runtime, and is not backed by persistence.
      Parameters:
        `planName` - the planName to set

Copyright © 2014. All Rights Reserved.