Package org.eclipse.equinox.p2.engine

# Interface IProfile

All Superinterfaces:
  `IQueryable<IInstallableUnit>`

public interface IProfile extends IQueryable<IInstallableUnit>
Represents the state of a profile in a profile registry at a given moment in time. Note this object contains only a snapshot of a particular profile state, and will never be updated if subsequent changes are made to this profile. A client should never retain an `IProfile` instance, but rather retain the profile id and obtain the current state of the profile from the profile registry only when required.

Since:
  2.0
Restriction:
  This interface is not intended to be implemented by clients.
Restriction:
  This interface is not intended to be extended by clients.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`LOCK_NONE`
Constant used to indicate that an installable unit is not locked in anyway.
`static final int`
`LOCK_UNINSTALL`
Constant used to indicate that an installable unit is locked so that it may not be uninstalled.
`static final int`
`LOCK_UPDATE`
Constant used to indicate that an installable unit is locked so that it may not be updated.
`static final String`
`PROP_CACHE`
Profile property constant indicating the bundle pool cache location.
`static final String`
`PROP_CONFIGURATION_FOLDER`
Profile property constant indicating the configuration folder for the profile.
`static final String`
`PROP_DESCRIPTION`
Profile property constant for a string property indicating a user visible short textual description of this profile.
`static final String`
`PROP_ENVIRONMENTS`
Profile property constant indicating the list of environments (e.g., OS, WS, ...) in which a profile can operate.
`static final String`
`PROP_INSTALL_FEATURES`
Profile property constant for a boolean property indicating if update features should be installed in this profile
`static final String`
`PROP_INSTALL_FOLDER`
Profile property constant indicating the install folder for the profile.
`static final String`
`PROP_LAUNCHER_CONFIGURATION`
Profile property constant indicating the location of the launcher configuration file for the profile.
`static final String`
`PROP_NAME`
Profile property constant for a string property indicating a user visible name of this profile.
`static final String`
`PROP_NL`
Profile property constant indicating the installed language(s) for the profile.
`static final String`
`PROP_PROFILE_LOCKED_IU`
A property key (value `"org.eclipse.equinox.p2.type.lock"`) for an integer property indicating how an installable unit is locked in its profile.
`static final String`
`PROP_PROFILE_ROOT_IU`
A property key (value `"org.eclipse.equinox.p2.type.root"`) for a boolean property indicating whether an installable unit should be considered a root of the install.
`static final String`
`PROP_ROAMING`
Profile property constant for a boolean property indicating if the profiling is roaming.
`static final String`
`PROP_SHARED_CACHE`
Profile property constant indicating a shared read-only bundle pool cache location.
`static final String`
`PROP_STATS_PARAMETERS`
Profile property constant for additional parameters of the downloading stats(e.g., package=jee&os=linux).
`static final String`
`STATE_PROP_HIDDEN`
Profile state meta property key.
`static final String`
`STATE_PROP_SHARED_INSTALL`
Profile state metadata property key used to represent the state of the user profile when running in shared install.
`static final String`
`STATE_PROP_TAG`
Profile state metadata property key used to associate with a profile state a user readable name.
`static final String`
`STATE_SHARED_INSTALL_VALUE_BEFOREFLUSH`
Value to represent a user profile before it is being flushed because the base had changed.
`static final String`
`STATE_SHARED_INSTALL_VALUE_INITIAL`
Value to represent a user profile the first time it is created.
`static final String`
`STATE_SHARED_INSTALL_VALUE_NEW`
Value to represent the new user profile created once the base profile has been flushed.

## Method Summary

Modifier and Type
Method
Description
`IQueryResult<IInstallableUnit>`
`available(IQuery<IInstallableUnit> query, IProgressMonitor monitor)`
Returns the installable units in this profile that match the given query.
`Map<String,String>`
`getInstallableUnitProperties(IInstallableUnit iu)`
Returns an unmodifiable map of all profile properties associated with the given installable unit in this profile.
`String`
`getInstallableUnitProperty(IInstallableUnit iu, String key)`
Returns the profile property associated with the given installable unit.
`String`
`getProfileId()`
Returns the id of this profile, unique within a given profile registry
`Map<String,String>`
`getProperties()`
Returns an unmodifiable map of all profile properties.
`String`
`getProperty(String key)`
Returns the profile property associated with the given key, or `null` if this property is not present
`IProvisioningAgent`
`getProvisioningAgent()`
Returns the provisioning agent that manages this profile
`long`
`getTimestamp()`
Returns a timestamp describing when this profile snapshot was created.

### Methods inherited from interface org.eclipse.equinox.p2.query.IQueryable

`query`

## Field Details

### LOCK_NONE

static final int LOCK_NONE
Constant used to indicate that an installable unit is not locked in anyway.

See Also:
  - `PROP_PROFILE_LOCKED_IU`
  - Constant Field Values

### LOCK_UNINSTALL

static final int LOCK_UNINSTALL
Constant used to indicate that an installable unit is locked so that it may not be uninstalled.

See Also:
  - `PROP_PROFILE_LOCKED_IU`
  - Constant Field Values

### LOCK_UPDATE

static final int LOCK_UPDATE
Constant used to indicate that an installable unit is locked so that it may not be updated.

See Also:
  - `PROP_PROFILE_LOCKED_IU`
  - Constant Field Values

### PROP_PROFILE_LOCKED_IU

static final String PROP_PROFILE_LOCKED_IU
A property key (value `"org.eclipse.equinox.p2.type.lock"`) for an integer property indicating how an installable unit is locked in its profile. The integer is a bit-mask indicating the different locks defined on the installable unit. The property should be obtained from a profile using IProfile#getInstallableUnitProperty(IInstallableUnit, String).

See Also:
  - `LOCK_UNINSTALL`
  - `LOCK_UPDATE`
  - `LOCK_NONE`
  - Constant Field Values

### PROP_PROFILE_ROOT_IU

static final String PROP_PROFILE_ROOT_IU
A property key (value `"org.eclipse.equinox.p2.type.root"`) for a boolean property indicating whether an installable unit should be considered a root of the install. Typically this means the unit will appear to the end user as a top-level installed item. The property should be obtained from a profile using IProfile#getInstallableUnitProperty(IInstallableUnit, String).

See Also:
  - `LOCK_UNINSTALL`
  - `LOCK_UPDATE`
  - `LOCK_NONE`
  - Constant Field Values

### PROP_INSTALL_FOLDER

static final String PROP_INSTALL_FOLDER
Profile property constant indicating the install folder for the profile.

See Also:
  - Constant Field Values

### PROP_CONFIGURATION_FOLDER

static final String PROP_CONFIGURATION_FOLDER
Profile property constant indicating the configuration folder for the profile.

See Also:
  - Constant Field Values

### PROP_LAUNCHER_CONFIGURATION

static final String PROP_LAUNCHER_CONFIGURATION
Profile property constant indicating the location of the launcher configuration file for the profile.

See Also:
  - Constant Field Values

### PROP_NL

static final String PROP_NL
Profile property constant indicating the installed language(s) for the profile.

See Also:
  - Constant Field Values

### PROP_DESCRIPTION

static final String PROP_DESCRIPTION
Profile property constant for a string property indicating a user visible short textual description of this profile. May be empty or `null`, and generally will be for non-top level install contexts.

See Also:
  - Constant Field Values

### PROP_NAME

static final String PROP_NAME
Profile property constant for a string property indicating a user visible name of this profile. May be empty or `null`, and generally will be for non-top level install contexts.

See Also:
  - Constant Field Values

### PROP_ENVIRONMENTS

static final String PROP_ENVIRONMENTS
Profile property constant indicating the list of environments (e.g., OS, WS, ...) in which a profile can operate. The value of the property is a comma-delimited string of key/value pairs.

See Also:
  - Constant Field Values

### PROP_ROAMING

static final String PROP_ROAMING
Profile property constant for a boolean property indicating if the profiling is roaming. A roaming profile is one whose physical install location varies and is updated whenever it runs.

See Also:
  - Constant Field Values

### PROP_CACHE

static final String PROP_CACHE
Profile property constant indicating the bundle pool cache location.

See Also:
  - Constant Field Values

### PROP_SHARED_CACHE

static final String PROP_SHARED_CACHE
Profile property constant indicating a shared read-only bundle pool cache location.

See Also:
  - Constant Field Values

### PROP_INSTALL_FEATURES

static final String PROP_INSTALL_FEATURES
Profile property constant for a boolean property indicating if update features should be installed in this profile

See Also:
  - Constant Field Values

### STATE_PROP_HIDDEN

static final String STATE_PROP_HIDDEN
Profile state meta property key. Can be used to mark a profile state that should be hidden. The value of the property is not relevant as the property's existence is enough. Although `true` would be a typical value.

Since:
  2.1
See Also:
  - Constant Field Values

### STATE_PROP_TAG

static final String STATE_PROP_TAG
Profile state metadata property key used to associate with a profile state a user readable name.

Since:
  2.1
See Also:
  - Constant Field Values

### STATE_PROP_SHARED_INSTALL

static final String STATE_PROP_SHARED_INSTALL
Profile state metadata property key used to represent the state of the user profile when running in shared install. The value for this property could be: `STATE_SHARED_INSTALL_VALUE_INITIAL`, `STATE_SHARED_INSTALL_VALUE_BEFOREFLUSH` or `STATE_SHARED_INSTALL_VALUE_NEW`

Since:
  2.3
See Also:
  - Constant Field Values

### STATE_SHARED_INSTALL_VALUE_INITIAL

static final String STATE_SHARED_INSTALL_VALUE_INITIAL
Value to represent a user profile the first time it is created.

Since:
  2.3
See Also:
  - Constant Field Values

### STATE_SHARED_INSTALL_VALUE_BEFOREFLUSH

static final String STATE_SHARED_INSTALL_VALUE_BEFOREFLUSH
Value to represent a user profile before it is being flushed because the base had changed.

Since:
  2.3
See Also:
  - Constant Field Values

### STATE_SHARED_INSTALL_VALUE_NEW

static final String STATE_SHARED_INSTALL_VALUE_NEW
Value to represent the new user profile created once the base profile has been flushed.

Since:
  2.3
See Also:
  - Constant Field Values

### PROP_STATS_PARAMETERS

static final String PROP_STATS_PARAMETERS
Profile property constant for additional parameters of the downloading stats(e.g., package=jee&os=linux).

Since:
  2.2
See Also:
  - Constant Field Values

## Method Details

### getProvisioningAgent

IProvisioningAgent getProvisioningAgent()
Returns the provisioning agent that manages this profile

Returns:
  A provisioning agent.

### getProfileId

String getProfileId()
Returns the id of this profile, unique within a given profile registry

Returns:
  the profile id

### getProperty

String getProperty(String key)
Returns the profile property associated with the given key, or `null` if this property is not present

Parameters:
  `key` - The property kid
Returns:
  the property value, or `null`

### getInstallableUnitProperty

String getInstallableUnitProperty(IInstallableUnit iu, String key)
Returns the profile property associated with the given installable unit.

Parameters:
  `iu` - the installable unit to return the property for
  `key` - the property key
Returns:
  the property value, or `null` if no such property is defined

### getProperties

Map<String,String> getProperties()
Returns an unmodifiable map of all profile properties.

Returns:
  a map of all profile properties.

### getInstallableUnitProperties

Map<String,String> getInstallableUnitProperties(IInstallableUnit iu)
Returns an unmodifiable map of all profile properties associated with the given installable unit in this profile.

Parameters:
  `iu` - the installable unit to return profile properties for
Returns:
  an unmodifiable map of installable unit profile properties

### getTimestamp

long getTimestamp()
Returns a timestamp describing when this profile snapshot was created.

Returns:
  A profile timestamp

### available

IQueryResult<IInstallableUnit> available(IQuery<IInstallableUnit> query, IProgressMonitor monitor)
Returns the installable units in this profile that match the given query. In a shared install, this will include both the installable units in the shared base location, and in the current user's private install area.

Parameters:
  `query` - The query to use for matching.
  `monitor` - a progress monitor, or `null` if progress reporting is not desired
Returns:
  The installable units that match the given query