Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2006-02-01 16:01:36 +0000
committerDJ Houghton2006-02-01 16:01:36 +0000
commitee6c7b2fec928d66b3ffe1bca716881fd05adf1d (patch)
tree8fbd003096cb90aaa8deb361763e57912bd33248
parent186cb065a9c17f00928990ee65cb829e3a037b47 (diff)
downloadrt.equinox.bundles-ee6c7b2fec928d66b3ffe1bca716881fd05adf1d.tar.gz
rt.equinox.bundles-ee6c7b2fec928d66b3ffe1bca716881fd05adf1d.tar.xz
rt.equinox.bundles-ee6c7b2fec928d66b3ffe1bca716881fd05adf1d.zip
Bug 125231 - Refactor IBundleGroup and IBundleGroupProvider
-rw-r--r--bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IBundleGroup.java91
-rw-r--r--bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IBundleGroupProvider.java37
2 files changed, 128 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IBundleGroup.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IBundleGroup.java
new file mode 100644
index 000000000..3f5339404
--- /dev/null
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IBundleGroup.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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.core.runtime;
+
+import org.osgi.framework.Bundle;
+
+/**
+ * Bundle groups represent a logical collection of plug-ins (aka bundles). Bundle
+ * groups do not contain their constituents but rather collect them together under
+ * a common label. The main role of a bundle group is to report to the system
+ * (e.g., the About dialog) what bundles have been installed. They are not intended
+ * for use in managing the set of bundles they represent.
+ * <p>
+ * Since the bulk of the branding related information is specific to the consumer,
+ * bundle groups also carry an arbitrary set of properties. The valid set of
+ * key-value pairs and their interpretation defined by the consumer in the
+ * target environment.
+ * </p><p>
+ * The Eclipse UI is the typical consumer of bundle groups and defines various
+ * property keys that it will use, for example, to display About information. See
+ * <code>org.eclipse.ui.branding.IBundleGroupConstants</code>.
+ * </p>
+ * @see IBundleGroupProvider
+ * @since 3.0
+ */
+public interface IBundleGroup {
+
+ /**
+ * Returns the identifier of this bundle group. Bundle groups are uniquely identified by the combination of
+ * their identifier and their version.
+ *
+ * @see #getVersion()
+ * @return the identifier for this bundle group
+ */
+ public String getIdentifier();
+
+ /**
+ * Returns the human-readable name of this bundle group.
+ *
+ * @return the human-readable name
+ */
+ public String getName();
+
+ /**
+ * Returns the version of this bundle group. Bundle group version strings have the same format as
+ * bundle versions (i.e., major.minor.service.qualifier). Bundle groups are uniquely identified
+ * by the combination of their identifier and their version.
+ *
+ * @see #getIdentifier()
+ * @return the string form of this bundle group's version
+ */
+ public String getVersion();
+
+ /**
+ * Returns a text description of this bundle group.
+ *
+ * @return text description of this bundle group
+ */
+ public String getDescription();
+
+ /**
+ * Returns the name of the provider of this bundle group.
+ *
+ * @return the name of the provider or <code>null</code> if none
+ */
+ public String getProviderName();
+
+ /**
+ * Returns a list of all bundles supplied by this bundle group.
+ *
+ * @return the bundles supplied by this bundle group
+ */
+ public Bundle[] getBundles();
+
+ /**
+ * Returns the property of this bundle group with the given key.
+ * <code>null</code> is returned if there is no such key/value pair.
+ *
+ * @param key the name of the property to return
+ * @return the value associated with the given key or <code>null</code> if none
+ */
+ public String getProperty(String key);
+}
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IBundleGroupProvider.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IBundleGroupProvider.java
new file mode 100644
index 000000000..dad6eb5d6
--- /dev/null
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/IBundleGroupProvider.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 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.core.runtime;
+
+/**
+ * Bundle group providers define groups of plug-ins which have been installed in
+ * the current system. Typically, a configuration agent (i.e., plug-in installer) will
+ * define a bundle group provider so that it can report to the system the list
+ * of plug-ins it has installed.
+ *
+ * @see IBundleGroup
+ * @since 3.0
+ */
+public interface IBundleGroupProvider {
+
+ /**
+ * Returns the human-readable name of this bundle group provider.
+ *
+ * @return the name of this bundle group provider
+ */
+ public String getName();
+
+ /**
+ * Returns the bundle groups provided by this provider.
+ *
+ * @return the bundle groups provided by this provider
+ */
+ public IBundleGroup[] getBundleGroups();
+}

Back to the top