Class MetadataFactory.InstallableUnitDescription

java.lang.Object
org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription
Direct Known Subclasses:
MetadataFactory.InstallableUnitFragmentDescription, MetadataFactory.InstallableUnitPatchDescription
Enclosing class:
MetadataFactory

public static class MetadataFactory.InstallableUnitDescription extends Object
A description containing information about an installable unit. Once created, installable units are immutable. This description class allows a client to build up the state for an installable unit incrementally, and then finally produce the resulting immutable unit.
  • Field Details

    • PROP_TYPE_GROUP

      public static final String PROP_TYPE_GROUP
      A property key (value "org.eclipse.equinox.p2.type.patch") for a boolean property indicating that an installable unit is a group.
      See Also:
    • PROP_TYPE_PATCH

      public static final String PROP_TYPE_PATCH
      A property key (value "org.eclipse.equinox.p2.type.patch") for a boolean property indicating that an installable unit is a patch.
      See Also:
    • PROP_TYPE_FRAGMENT

      public static final String PROP_TYPE_FRAGMENT
      A property key (value "org.eclipse.equinox.p2.type.fragment") for a boolean property indicating that an installable unit is a fragment.
      See Also:
    • PROP_TYPE_CATEGORY

      public static final String PROP_TYPE_CATEGORY
      A property key (value "org.eclipse.equinox.p2.type.category") for a boolean property indicating that an installable unit is a category.
      See Also:
    • PROP_TYPE_PRODUCT

      public static final String PROP_TYPE_PRODUCT
      A property key (value "org.eclipse.equinox.p2.type.product") for a boolean property indicating that an installable unit is the root IU of a product.
      Since:
      2.2
      See Also:
  • Constructor Details

    • InstallableUnitDescription

      public InstallableUnitDescription()
  • Method Details

    • addProvidedCapabilities

      public void addProvidedCapabilities(Collection<IProvidedCapability> additional)
      Add the specified capabilities to the installable unit.
      Parameters:
      additional - the capabilities to add.
    • addRequiredCapabilities

      @Deprecated public void addRequiredCapabilities(Collection<IRequirement> additional)
      Deprecated.
      Use addRequirements(additional) instead
    • addRequirements

      public void addRequirements(Collection<IRequirement> additional)
      Add the specified requirements to the installable unit.
      Parameters:
      additional - the requirements to add
    • addTouchpointData

      public void addTouchpointData(ITouchpointData data)
    • getId

      public String getId()
      Returns the id of the installable unit.
    • getProvidedCapabilities

      public Collection<IProvidedCapability> getProvidedCapabilities()
      Return a collection of all the capabilities specified on this installable unit.
    • getRequiredCapabilities

      @Deprecated public List<IRequirement> getRequiredCapabilities()
      Deprecated.
      Use getRequirements() instead
    • getRequirements

      public List<IRequirement> getRequirements()
      Return a collection of the requirements specified on this installable unit.
    • getMetaRequiredCapabilities

      @Deprecated public Collection<IRequirement> getMetaRequiredCapabilities()
      Deprecated.
      Use getMetaRequirements() instead
    • getMetaRequirements

      public Collection<IRequirement> getMetaRequirements()
      Return a collection of the meta requirements specified on this installable unit.
    • getTouchpointData

      public Collection<ITouchpointData> getTouchpointData()
      Returns the current touchpoint data on this installable unit description. The touchpoint data may change if further data is added to the description.
      Returns:
      The current touchpoint data on this description
    • getVersion

      public Version getVersion()
      Return the versiono on this installable unit description.
    • getUpdateDescriptor

      public IUpdateDescriptor getUpdateDescriptor()
      Returns the UpdateDescriptor for this IU
      Since:
      2.1
    • setArtifacts

      public void setArtifacts(IArtifactKey[] value)
      Set the artifact keys for the installable unit. Previous values will be overwritten.
      Parameters:
      value - the artifacts to the used.
    • setCapabilities

      public void setCapabilities(IProvidedCapability[] exportedCapabilities)
      Set the capabilities for the installable unit. Previous values will be overwritten.
      Parameters:
      exportedCapabilities - the capabilities to be used.
    • setCopyright

      public void setCopyright(ICopyright copyright)
      Set the copyright for the installable unit. Previous values will be overwritten.
      Parameters:
      copyright - the copyright to be used.
    • setFilter

      public void setFilter(IMatchExpression<IInstallableUnit> filter)
    • setFilter

      public void setFilter(String filter)
    • setId

      public void setId(String id)
      Set the id of the installable unit.
    • setLicenses

      public void setLicenses(ILicense[] licenses)
      Set the licenses for the installable unit. Previous values will be overwritten.
    • setProperty

      public void setProperty(String key, String value)
      Set a property with a specified value for this installable unit.
      Parameters:
      key - key with which the specified value is to be associated
      value - value to be associated with the specified key
    • setRequiredCapabilities

      @Deprecated public void setRequiredCapabilities(IRequirement[] requirements)
      Deprecated.
      Use setRequirements(requirements) instead
    • setRequirements

      public void setRequirements(IRequirement[] requirements)
      Set the requirements for the installable unit. Previous values will be overwritten.
      Parameters:
      requirements - the requirements to be used.
    • setMetaRequiredCapabilities

      @Deprecated public void setMetaRequiredCapabilities(IRequirement[] metaRequirements)
      Deprecated.
      Use setMetaRequirements(requirements) instead
    • setMetaRequirements

      public void setMetaRequirements(IRequirement[] metaRequirements)
      Set the meta requirements for the installable unit. Previous values will be overwritten.
      Parameters:
      metaRequirements - the meta requirements to be used.
    • setSingleton

      public void setSingleton(boolean singleton)
      Change the singleton status of the installable unit.
    • setTouchpointType

      public void setTouchpointType(ITouchpointType type)
      Set the touchpoint type for the installable unit.
    • setUpdateDescriptor

      public void setUpdateDescriptor(IUpdateDescriptor updateInfo)
      Set the update descriptor for the installable unit.
    • setVersion

      public void setVersion(Version newVersion)
      Set the version of this installable unit.
      Parameters:
      newVersion - version to be set on the installable unit.