diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/prov/engine/IProfileRegistry.java')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/prov/engine/IProfileRegistry.java | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/prov/engine/IProfileRegistry.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/prov/engine/IProfileRegistry.java new file mode 100644 index 000000000..504ae8651 --- /dev/null +++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/prov/engine/IProfileRegistry.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.equinox.prov.engine; + +/** + * This encapsulates the access to the profile registry. + * It deals with persistence in a transparent way. + */ +public interface IProfileRegistry { + public static final String SELF = "_SELF_"; //$NON-NLS-1$ + + /** + * Return the profile in the registry that has the given id. If it does not exist, + * then return <code>null</code>. + * + * @param id the profile identifier + * @return the profile or <code>null</code> + */ + Profile getProfile(String id); + + /** + * Return an array of profiles known to this registry. If there are none, then + * return an empty array. + * + * @return the array of profiles + */ + Profile[] getProfiles(); + + /** + * Add the given profile to this profile registry. + * + * @param toAdd the profile to add + * @throws IllegalArgumentException if a profile + * with the same id is already present in the registry. + */ + void addProfile(Profile toAdd) throws IllegalArgumentException; + + /** + * Remove the given profile from this profile registry. + * + * @param toRemove the profile to remove + */ + void removeProfile(Profile toRemove); + +} |