Package org.eclipse.equinox.p2.repository.artifact.spi

# Class ArtifactDescriptor

java.lang.Object
org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor

All Implemented Interfaces:
  `IMemberProvider`, `IArtifactDescriptor`

public class ArtifactDescriptor extends Object implements IArtifactDescriptor, IMemberProvider
This represents information about a given artifact stored on a particular byte server.

Since:
  2.0

## Field Summary

Fields
Modifier and Type
Field
Description
`protected IArtifactKey`
`key`
`static final String`
`MEMBER_ARTIFACT_KEY`
`static final String`
`MEMBER_PROCESSING_STEPS`
`static final String`
`MEMBER_PROPERTIES`
`static final String`
`MEMBER_REPOSITORY`
`protected IProcessingStepDescriptor[]`
`processingSteps`
`protected Map<String,String>`
`properties`

### Fields inherited from interface org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor

`ARTIFACT_CHECKSUM, ARTIFACT_MD5, ARTIFACT_SIZE, DOWNLOAD_CHECKSUM, DOWNLOAD_CONTENTTYPE, DOWNLOAD_MD5, DOWNLOAD_SIZE, FORMAT, FORMAT_PACKED, TYPE_ZIP`

## Constructor Summary

Constructors
Constructor
Description
`ArtifactDescriptor(IArtifactKey key)`
Returns a new artifact descriptor that uses the provided artifact key
`ArtifactDescriptor(IArtifactDescriptor base)`
Creates a new artifact descriptor with the same key, properties, repository, and processing steps as the provided base descriptor.

## Method Summary

Modifier and Type
Method
Description
`void`
`addProperties(Map<String,String> additionalProperties)`
`boolean`
`equals(Object obj)`
`IArtifactKey`
`getArtifactKey()`
Return the key for the artifact described by this descriptor.
`Object`
`getMember(String memberName)`
Returns the value for the specified member.
`IProcessingStepDescriptor[]`
`getProcessingSteps()`
Return the list of processing steps associated with this descriptor.
`Map<String,String>`
`getProperties()`
Returns a read-only collection of the properties of the artifact descriptor.
`String`
`getProperty(String propertyKey)`
Return the value of the given property in this descriptor `null` is returned if no such property exists
`IArtifactRepository`
`getRepository()`
Return the artifact repository that holds the artifact described by this descriptor.
`int`
`hashCode()`
`void`
`setProcessingSteps(IProcessingStepDescriptor[] value)`
`void`
`setProperty(String key, String value)`
`void`
`setRepository(IArtifactRepository value)`
`String`
`toString()`

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

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

## Field Details

### MEMBER_ARTIFACT_KEY

public static final String MEMBER_ARTIFACT_KEY

See Also:
  - Constant Field Values

### MEMBER_PROCESSING_STEPS

public static final String MEMBER_PROCESSING_STEPS

See Also:
  - Constant Field Values

### MEMBER_PROPERTIES

public static final String MEMBER_PROPERTIES

See Also:
  - Constant Field Values

### MEMBER_REPOSITORY

public static final String MEMBER_REPOSITORY

See Also:
  - Constant Field Values

### key

protected IArtifactKey key

### processingSteps

protected IProcessingStepDescriptor[] processingSteps

### properties

protected Map<String,String> properties

## Constructor Details

### ArtifactDescriptor

public ArtifactDescriptor(IArtifactDescriptor base)
Creates a new artifact descriptor with the same key, properties, repository, and processing steps as the provided base descriptor.

Parameters:
  `base` - the descriptor to use as a template for this new descriptor

### ArtifactDescriptor

public ArtifactDescriptor(IArtifactKey key)
Returns a new artifact descriptor that uses the provided artifact key

Parameters:
  `key` - The artifact key corresponding to this descriptor

## Method Details

### getArtifactKey

public IArtifactKey getArtifactKey()
Description copied from interface: `IArtifactDescriptor`
Return the key for the artifact described by this descriptor.

Specified by:
  `getArtifactKey` in interface `IArtifactDescriptor`
Returns:
  the key associated with this descriptor

### getProperty

public String getProperty(String propertyKey)
Description copied from interface: `IArtifactDescriptor`
Return the value of the given property in this descriptor `null` is returned if no such property exists

Specified by:
  `getProperty` in interface `IArtifactDescriptor`
Parameters:
  `propertyKey` - the property key to look for
Returns:
  the value of the given property or `null`

### setProperty

public void setProperty(String key, String value)

### addProperties

public void addProperties(Map<String,String> additionalProperties)

### getProperties

public Map<String,String> getProperties()
Returns a read-only collection of the properties of the artifact descriptor.

Specified by:
  `getProperties` in interface `IArtifactDescriptor`
Returns:
  the properties of this artifact descriptor.

### getProcessingSteps

public IProcessingStepDescriptor[] getProcessingSteps()
Description copied from interface: `IArtifactDescriptor`
Return the list of processing steps associated with this descriptor. An empty set of steps implies that this descriptor describes a complete copy of the artifact in its native form. If one or more steps are present, they may be performed when the artifact is transferred from the repository that contains it.

Specified by:
  `getProcessingSteps` in interface `IArtifactDescriptor`
Returns:
  the list of processing steps for this descriptor

### setProcessingSteps

public void setProcessingSteps(IProcessingStepDescriptor[] value)

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### getRepository

public IArtifactRepository getRepository()
Description copied from interface: `IArtifactDescriptor`
Return the artifact repository that holds the artifact described by this descriptor. `null` is returned if this descriptor is not held in a repository.

Specified by:
  `getRepository` in interface `IArtifactDescriptor`
Returns:
  the repository holding this artifact or `null` if none.

### setRepository

public void setRepository(IArtifactRepository value)

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### getMember

public Object getMember(String memberName)
Description copied from interface: `IMemberProvider`
Returns the value for the specified member. Implementers can rely on that the `memberName` is a string that has been internalized using `String.intern()`.

Specified by:
  `getMember` in interface `IMemberProvider`
Parameters:
  `memberName` - The name of the member
Returns:
  The member value.