Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBJ Hargrave2011-08-18 22:17:11 +0000
committerBJ Hargrave2011-08-26 20:55:58 +0000
commit333d47af764554c89d87271dcd789df6e5545c79 (patch)
tree89c07bf83667a974da019dc67a9bf48e35c282f1 /bundles/org.eclipse.osgi/osgi/src/org/osgi/framework
parent68303d7f1db96374cbf7a62932e4885b85f7d89e (diff)
downloadrt.equinox.framework-333d47af764554c89d87271dcd789df6e5545c79.tar.gz
rt.equinox.framework-333d47af764554c89d87271dcd789df6e5545c79.tar.xz
rt.equinox.framework-333d47af764554c89d87271dcd789df6e5545c79.zip
OSGi refactored new resource types into new
org.osgi.framework.resource package. The framework is updated for this new package and the type refactoring.
Diffstat (limited to 'bundles/org.eclipse.osgi/osgi/src/org/osgi/framework')
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/Capability.java (renamed from bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/Capability.java)7
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/Requirement.java (renamed from bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/Requirement.java)21
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/Resource.java (renamed from bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/Resource.java)22
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/ResourceConstants.java (renamed from bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/ResourceConstants.java)11
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/Wire.java (renamed from bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/Wire.java)5
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java36
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java51
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java2
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java14
-rw-r--r--bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java3
10 files changed, 78 insertions, 94 deletions
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/Capability.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/Capability.java
index c524c9c9b..fcfdb2d4f 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/Capability.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/Capability.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2011). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2011). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.osgi.framework.wiring;
+package org.osgi.framework.resource;
import java.util.Map;
@@ -22,8 +22,7 @@ import java.util.Map;
* A capability that has been declared from a {@link Resource}.
*
* @ThreadSafe
- * @Immutable
- * @version $Id: a37df4f0d0a54593fab0a3ddec451f0b1342d4f3 $
+ * @version $Id: f230000a3da509b0bff654795c4b694ec86f601c $
*/
public interface Capability {
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/Requirement.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/Requirement.java
index 1debc0e23..b0e6b734b 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/Requirement.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/Requirement.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2010, 2011). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2011). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.osgi.framework.wiring;
+package org.osgi.framework.resource;
import java.util.Map;
@@ -24,9 +24,7 @@ import org.osgi.framework.Constants;
* A requirement that has been declared from a {@link Resource} .
*
* @ThreadSafe
- * @Immutable
- *
- * @version $Id: a085f0fb285b6a0d72203440ffdb1c9e6a236f49 $
+ * @version $Id: 34bfa17b8e9a55493390d6df96f2dcb026c74185 $
*/
public interface Requirement {
/**
@@ -88,20 +86,17 @@ public interface Requirement {
* <li>The filter specified by the {@link Constants#FILTER_DIRECTIVE filter}
* directive of this requirement matches the
* {@link Capability#getAttributes() attributes of the specified capability}.
- * <li>The {@link #getDirectives() requirement directives} and the
- * {@link Capability#getDirectives() capability directives} that apply to
- * the name space are satisfied.
+ * <li>The standard capability {@link Capability#getDirectives() directives}
+ * that influence matching and that apply to the name space are satisfied.
+ * See the capability {@link ResourceConstants#CAPABILITY_MANDATORY_DIRECTIVE
+ * mandatory} directive.
* </ul>
*
*
* @param capability
* The capability to match to this requirement.
* @return {@code true} if the specified capability matches this this
- * requirement. {@link #getNamespace() name space} as this
- * requirement and the filter for this requirement matches the
- * {@link BundleCapability#getAttributes() attributes of the
- * specified capability}; {@code false} otherwise.
+ * requirement; {@code false} otherwise.
*/
- // TODO much debate on the placement and need for this method.
boolean matches(Capability capability);
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/Resource.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/Resource.java
index af4db8211..855fc5e59 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/Resource.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/Resource.java
@@ -1,4 +1,20 @@
-package org.osgi.framework.wiring;
+/*
+ * Copyright (c) OSGi Alliance (2011). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.framework.resource;
import java.util.List;
@@ -9,9 +25,7 @@ import java.util.List;
* A resources can be wired together via capabilities and requirements.
*
* @ThreadSafe
- * @Immutable
- *
- * @version $Id: ab65b58b724ec74515bb8c5bad355658efc2460d $
+ * @version $Id: 047a96acb364265b1cd15a14c74bb5e44da19062 $
*/
public interface Resource {
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/ResourceConstants.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/ResourceConstants.java
index 0da0bf3d6..b7d100710 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/ResourceConstants.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/ResourceConstants.java
@@ -13,10 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.osgi.framework.wiring;
+
+package org.osgi.framework.resource;
import org.osgi.framework.Constants;
import org.osgi.framework.Version;
+import org.osgi.framework.wiring.BundleRevision;
+import org.osgi.framework.wiring.BundleWiring;
/**
* Defines standard names for the attributes, directives and name spaces for
@@ -26,7 +29,8 @@ import org.osgi.framework.Version;
* The values associated with these keys are of type {@code String}, unless
* otherwise indicated.
*
- * @version $Id$
+ * @Immutable
+ * @version $Id: 7b7e18d49b0e34e527a70641eed790d808800287 $
*/
public final class ResourceConstants {
@@ -350,7 +354,8 @@ public final class ResourceConstants {
* in the {@link #REQUIREMENT_FILTER_DIRECTIVE filter} of a requirement in
* order for the capability to match the requirement. This directive must
* only be used for capabilities with the {@link #WIRING_PACKAGE_NAMESPACE
- * package} name space.
+ * package}, {@link #WIRING_BUNDLE_NAMESPACE bundle}, or
+ * {@link #WIRING_HOST_NAMESPACE host} name space.
*/
public final static String CAPABILITY_MANDATORY_DIRECTIVE = "mandatory";
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/Wire.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/Wire.java
index 77badd1b8..a18a12b59 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/Wire.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/resource/Wire.java
@@ -14,14 +14,13 @@
* limitations under the License.
*/
-package org.osgi.framework.wiring;
+package org.osgi.framework.resource;
/**
* A wire connecting a {@link Capability} to a {@link Requirement}.
*
* @ThreadSafe
- * @Immutable
- * @version $Id: ca06f75ac2d214182c5e5112f84334efd9d083fd $
+ * @version $Id: e1d43aa8b1d29bcd6d840397b18d6af0b3ae6824 $
*/
public interface Wire {
/**
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java
index b44d6318d..522b96c85 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleCapability.java
@@ -18,6 +18,7 @@ package org.osgi.framework.wiring;
import java.util.Map;
+import org.osgi.framework.resource.Capability;
/**
* A capability that has been declared from a {@link BundleRevision bundle
@@ -25,40 +26,29 @@ import java.util.Map;
*
* @ThreadSafe
* @noimplement
- * @version $Id: 6bbc1e645f927531d40fb245c95f5d26ad189db3 $
+ * @version $Id: 61284c6e75b7e3e5931565fe35a31e237e112abb $
*/
-public interface BundleCapability extends Capability{
+public interface BundleCapability extends Capability {
+
/**
- * Returns the name space of this capability.
+ * Returns the bundle revision declaring this capability.
*
- * @return The name space of this capability.
+ * @return The bundle revision declaring this capability.
*/
- String getNamespace();
+ BundleRevision getRevision();
/**
- * Returns the directives of this capability.
- *
- * @return An unmodifiable map of directive names to directive values for
- * this capability, or an empty map if this capability has no
- * directives.
+ * {@inheritDoc}
*/
- Map<String, String> getDirectives();
+ String getNamespace();
/**
- * Returns the attributes of this capability.
- *
- * @return An unmodifiable map of attribute names to attribute values for
- * this capability, or an empty map if this capability has no
- * attributes.
+ * {@inheritDoc}
*/
- Map<String, Object> getAttributes();
+ Map<String, String> getDirectives();
/**
- * Returns the bundle revision declaring this capability.
- *
- * @return The bundle revision declaring this capability.
+ * {@inheritDoc}
*/
- BundleRevision getRevision();
-
- BundleRevision getResource();
+ Map<String, Object> getAttributes();
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java
index 884ef3ded..bdc4e8fe4 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRequirement.java
@@ -18,6 +18,7 @@ package org.osgi.framework.wiring;
import java.util.Map;
+import org.osgi.framework.resource.Requirement;
/**
* A requirement that has been declared from a {@link BundleRevision bundle
@@ -25,34 +26,9 @@ import java.util.Map;
*
* @ThreadSafe
* @noimplement
- * @version $Id: 3ee254a3c0d5516b56affaa66544c892f3d522cb $
+ * @version $Id: f23f399ad55648e71eb2055792b00560d18cb8b1 $
*/
-public interface BundleRequirement extends Requirement{
- /**
- * Returns the name space of this requirement.
- *
- * @return The name space of this requirement.
- */
- String getNamespace();
-
- /**
- * Returns the directives of this requirement.
- *
- * @return An unmodifiable map of directive names to directive values for
- * this requirement, or an empty map if this requirement has no
- * directives.
- */
- Map<String, String> getDirectives();
-
- /**
- * Returns the attributes of this requirement.
- *
- * @return An unmodifiable map of attribute names to attribute values for
- * this requirement, or an empty map if this requirement has no
- * attributes.
- */
- Map<String, Object> getAttributes();
-
+public interface BundleRequirement extends Requirement {
/**
* Returns the bundle revision declaring this requirement.
*
@@ -61,11 +37,6 @@ public interface BundleRequirement extends Requirement{
BundleRevision getRevision();
/**
- * {@inheritDoc}
- */
- BundleRevision getResource();
-
- /**
* Returns whether the specified capability matches this requirement.
*
* @param capability The capability to match to this requirement.
@@ -76,4 +47,20 @@ public interface BundleRequirement extends Requirement{
* specified capability}; {@code false} otherwise.
*/
boolean matches(BundleCapability capability);
+
+ /**
+ * {@inheritDoc}
+ */
+ String getNamespace();
+
+ /**
+ * {@inheritDoc}
+ */
+ Map<String, String> getDirectives();
+
+ /**
+ * {@inheritDoc}
+ */
+ Map<String, Object> getAttributes();
+
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java
index 17a54c1ef..eb5184a37 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleRevision.java
@@ -22,6 +22,8 @@ import org.osgi.framework.Bundle;
import org.osgi.framework.BundleReference;
import org.osgi.framework.Constants;
import org.osgi.framework.Version;
+import org.osgi.framework.resource.Resource;
+import org.osgi.framework.resource.ResourceConstants;
/**
* Bundle Revision. When a bundle is installed and each time a bundle is
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java
index d2bbd3b97..2efde3006 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWire.java
@@ -16,13 +16,15 @@
package org.osgi.framework.wiring;
+import org.osgi.framework.resource.Wire;
+
/**
* A wire connecting a {@link BundleCapability} to a {@link BundleRequirement}.
*
* @ThreadSafe
* @noimplement
- * @version $Id: aca8642cea91995d0b178129cba1131ed327c7e7 $
+ * @version $Id: 6dc92f05a3786642510e2f126c5e751c73cf8c3e $
*/
public interface BundleWire extends Wire {
/**
@@ -70,14 +72,4 @@ public interface BundleWire extends Wire {
* returned.
*/
BundleWiring getRequirerWiring();
-
- /**
- * {@inheritDoc}
- */
- BundleRevision getProvider();
-
- /**
- * {@inheritDoc}
- */
- BundleRevision getRequirer();
}
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java
index 52c24852d..d32350234 100644
--- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java
+++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/wiring/BundleWiring.java
@@ -22,6 +22,7 @@ import java.util.List;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleReference;
+import org.osgi.framework.resource.ResourceConstants;
/**
* A wiring for a bundle. Each time a bundle is resolved, a new bundle wiring
@@ -47,7 +48,7 @@ import org.osgi.framework.BundleReference;
*
* @ThreadSafe
* @noimplement
- * @version $Id: 58b8ec3bb9649387d4ccba1070f034f217d06ea2 $
+ * @version $Id: ca8336db29d70e54bf0e9ba516a618f041040b97 $
*/
public interface BundleWiring extends BundleReference {
/**

Back to the top