|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IProfileRegistry
This encapsulates the access to the profile registry. It deals with persistence in a transparent way.
Field Summary | |
---|---|
static String |
SELF
A special profile id representing the profile of the currently running system. |
static String |
SERVICE_NAME
Service name constant for the profile registry service. |
Method Summary | |
---|---|
IProfile |
addProfile(String id)
Add the given profile to this profile registry. |
IProfile |
addProfile(String id,
Map<String,String> properties)
Add the given profile to this profile registry. |
boolean |
containsProfile(String profileId)
Returns whether this profile registry contains a profile with the given id. |
IProfile |
getProfile(String id)
Return the profile in the registry that has the given id. |
IProfile |
getProfile(String id,
long timestamp)
Return the profile in the registry that has the given id and timestamp. |
IProfile[] |
getProfiles()
Return an array of profiles known to this registry. |
boolean |
isCurrent(IProfile profile)
Check if the given profile from this profile registry is up-to-date. |
long[] |
listProfileTimestamps(String id)
Return an array of timestamps in ascending order for the profile id in question. |
void |
removeProfile(String id)
Remove the given profile from this profile registry. |
void |
removeProfile(String id,
long timestamp)
Remove the given profile snapshot from this profile registry. |
Field Detail |
---|
static final String SELF
getProfile(String)
to obtain
the profile of the currently running system. Note that a given profile registry
may not have a defined self profile, for example if the running system doesn't
have a profile, or resides in a different profile registry.
static final String SERVICE_NAME
Method Detail |
---|
IProfile getProfile(String id)
null
.
id
- the profile identifier
null
IProfile getProfile(String id, long timestamp)
null
.
id
- the profile identifiertimestamp
- the profile's timestamp
null
long[] listProfileTimestamps(String id)
id
- the id of the profile to list timestamps for
IProfile[] getProfiles()
IProfile addProfile(String id) throws ProvisionException
id
- the profile id
ProvisionException
- if a profile
with the same id is already present in the registry.IProfile addProfile(String id, Map<String,String> properties) throws ProvisionException
id
- the profile idproperties
- the profile properties
ProvisionException
- if a profile
with the same id is already present in the registry.boolean containsProfile(String profileId)
profileId
- The id of the profile to search for
true
if this registry contains a profile with the given id,
and false
otherwise.void removeProfile(String id, long timestamp) throws ProvisionException
id
- the profile to removetimestamp
- the timestamp of the profile to remove
ProvisionException
- if the profile with the specified id and timestamp is the current profile.void removeProfile(String id)
id
- the profile to removeboolean isCurrent(IProfile profile)
profile
- the profile to check
|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.