diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-15 06:50:04 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-15 06:50:04 +0000 |
commit | 147ed48e86bb4a13e42df35f1d1d800a7b564f4b (patch) | |
tree | 2412db1dcc7b46a214d2b7b46d21349ac08aa9b8 /branches/sca-android/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/BundleReference.java | |
parent | 512771c8a42d2cde253f6df55ef552f7a0b4f792 (diff) |
Removed more modules as in Oscar's TUSCANY-2440 reduced-set patch. Also removed newer modules added since r643746 and are not required to run the minimum set that we are porting to android. Set svn ignore properties to ignore Manifest files produced by the build.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@695356 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-android/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/BundleReference.java')
-rw-r--r-- | branches/sca-android/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/BundleReference.java | 161 |
1 files changed, 0 insertions, 161 deletions
diff --git a/branches/sca-android/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/BundleReference.java b/branches/sca-android/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/BundleReference.java deleted file mode 100644 index 0bbb8b707a..0000000000 --- a/branches/sca-android/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/BundleReference.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.apache.tuscany.sca.contribution.osgi; - - -/** - * A weak reference to a class, which should be used to register classes - * with an ArtifactResolver and resolve these classes later. - * - * @version $Rev$ $Date$ - */ -public class BundleReference { - - /** - * The bundle. - */ - private Object bundle; - - /** - * The bundle name. - */ - private String bundleName; - - /** - * The bundle version. - */ - private String bundleVersion; - - /** - * The bundle name and version. - */ - private String bundleUniqueName; - - /** - * The bundle relative path. - */ - private String bundleRelativePath; - - /** - * Constructs a new BundleReference. - * - * @param bundle The bundle reference - * @param bundleName The bundle name - * @param bundleVersion The bundle version - * @param bundleRelativePath The relative path for the bundle - */ - public BundleReference(Object bundle, String bundleName, String bundleVersion, String bundleRelativePath) { - this.bundle = bundle; - this.bundleName = bundleName; - this.bundleVersion = bundleVersion; - this.bundleRelativePath = bundleRelativePath; - this.bundleUniqueName = bundleName + "(" + (bundleVersion == null?"0.0.0":bundleVersion) + ")"; - } - - /** - * Constructs a new BundleReference. - * - * @param bundleName The bundle name - * @param bundleVersion The bundle version - */ - public BundleReference(String bundleName, String bundleVersion) { - this.bundleName = bundleName; - this.bundleVersion = bundleVersion; - this.bundleUniqueName = bundleName + "(" + (bundleVersion == null?"0.0.0":bundleVersion) + ")"; - } - - /** - * Get the referenced bundle. - * - * @return The referenced bundle - */ - public Object getBundle() { - return bundle; - } - - /** - * Get the referenced bundle name. - * - * @return The bundle name - */ - public String getBundleName() { - return bundleName; - } - - /** - * Get the referenced bundle version. - * - * @return The bundle version - */ - public String getBundleVersion() { - return bundleVersion; - } - - /** - * Get the referenced bundle name and version. - * - * @return The bundle name - */ - public String getBundleUniqueName() { - return bundleUniqueName; - } - - /** - * Get the relative location of the bundle inside its contribution. - * - * @return The bundle path - */ - public String getBundleRelativePath() { - return bundleRelativePath; - } - - - - /** - * Returns true if the bundle reference is unresolved. - * - * @return Whether or not the bundle has been resolved - */ - public boolean isUnresolved() { - return bundle == null; - } - - @Override - public int hashCode() { - return bundleUniqueName.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (obj == this) { - return true; - } else { - if (obj instanceof BundleReference) { - BundleReference ref = (BundleReference)obj; - return bundleName.equals(ref.bundleName) && - (bundleVersion == null || ref.bundleVersion == null || - bundleVersion.equals(ref.bundleVersion)); - } else { - return false; - } - } - } - -} |