You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by al...@apache.org on 2025/04/27 10:35:56 UTC
(aries) branch ARIES-2177-merge-application-utils-to-application-modeller created (now 36e8ee0f1)
This is an automated email from the ASF dual-hosted git repository.
alien11689 pushed a change to branch ARIES-2177-merge-application-utils-to-application-modeller
in repository https://gitbox.apache.org/repos/asf/aries.git
at 36e8ee0f1 ARIES-2177: Merge application.utils to application modeller
This branch includes the following new commits:
new 36e8ee0f1 ARIES-2177: Merge application.utils to application modeller
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(aries) 01/01: ARIES-2177: Merge application.utils to application modeller
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alien11689 pushed a commit to branch ARIES-2177-merge-application-utils-to-application-modeller
in repository https://gitbox.apache.org/repos/asf/aries.git
commit 36e8ee0f1484089050412a5c80efea88d47d3ba0
Author: Dominik Przybysz <al...@gmail.com>
AuthorDate: Sun Apr 27 12:29:42 2025 +0200
ARIES-2177: Merge application.utils to application modeller
---
application/application-modeller/pom.xml | 13 +-
.../impl/ApplicationMetadataFactoryImpl.java | 0
.../application/impl/ApplicationMetadataImpl.java | 0
.../apache/aries/application/impl/ContentImpl.java | 73 +++---
.../application/impl/DeploymentContentImpl.java | 0
.../impl/DeploymentMetadataFactoryImpl.java | 0
.../application/impl/DeploymentMetadataImpl.java | 0
.../application/impl/ServiceDeclarationImpl.java | 0
.../modelling/impl/AbstractParserProxy.java | 31 +--
.../modelling/impl/DeployedBundlesImpl.java | 55 ++--
.../modelling/impl/ExportedBundleImpl.java | 27 +-
.../modelling/impl/ExportedPackageImpl.java | 30 +--
.../modelling/impl/ExportedServiceImpl.java | 53 ++--
.../modelling/impl/ImportedBundleImpl.java | 53 ++--
.../modelling/impl/ImportedPackageImpl.java | 46 ++--
.../modelling/impl/ImportedServiceImpl.java | 62 +++--
.../modelling/impl/ModelledResourceImpl.java | 66 +++--
.../impl/ModelledResourceManagerImpl.java | 21 +-
.../modelling/impl/ParsedServiceElementsImpl.java | 15 +-
.../modelling/internal/BundleBlueprintParser.java | 6 +-
.../internal/PackageRequirementMerger.java | 22 +-
.../modelling/utils/impl/ModellingHelperImpl.java | 18 +-
.../aries/application/utils/AppConstants.java | 7 +-
.../application/utils}/ExportedServiceHelper.java | 2 +-
.../aries/application/utils/FilterUtils.java | 7 +-
.../resources/OSGI-INF/blueprint/app-utils.xml | 0
.../impl/ApplicationMetadataImplTest.java | 1 -
.../impl/DeploymentContentImplTest.java | 0
.../src/test/resources/META-INF/APPLICATION.MF | 0
.../src/test/resources/META-INF/APPLICATION2.MF | 0
.../src/test/resources/META-INF/APPLICATION3.MF | 0
.../src/test/resources/META-INF/APPLICATION4.MF | 0
.../src/test/resources/META-INF/DEPLOYMENT.MF | 0
application/application-utils/LICENSE | 203 ---------------
application/application-utils/NOTICE | 8 -
application/application-utils/pom.xml | 131 ----------
.../utils/ServiceDeclarationFactory.java | 32 ---
.../application/utils/internal/MessageUtil.java | 46 ----
.../utils/management/SimpleBundleInfo.java | 168 ------------
.../aries/application/utils/management/packageinfo | 19 --
.../application/utils/manifest/ContentFactory.java | 48 ----
.../utils/manifest/ManifestDefaultsInjector.java | 283 ---------------------
.../aries/application/utils/manifest/packageinfo | 19 --
.../org/apache/aries/application/utils/packageinfo | 19 --
.../aries/application/utils/runtime/packageinfo | 19 --
.../utils/service/ArrayServiceList.java | 241 ------------------
.../utils/service/ServiceCollection.java | 26 --
.../aries/application/utils/service/packageinfo | 19 --
.../utils/messages/APPUTILSmessages.properties | 21 --
.../utils/manifest/ManifestProcessorTest.java | 153 -----------
.../test/resources/app1/META-INF/APPLICATION.MF | 16 --
.../src/test/resources/app1/META-INF/DEPLOYMENT.MF | 6 -
.../bundles/exploded.jar/META-INF/MANIFEST.MF | 2 -
.../exploded.jar/META-INF/beforeManifest.file | 19 --
.../src/test/resources/zip/file.txt | 19 --
.../src/test/resources/zip/subdir/someFile.txt | 19 --
application/pom.xml | 1 -
subsystem/readme.txt | 1 -
subsystem/subsystem-bundle/pom.xml | 6 -
subsystem/subsystem-core/pom.xml | 6 -
subsystem/subsystem-itests/pom.xml | 17 --
.../aries/subsystem/itests/SubsystemTest.java | 1 -
.../aries/subsystem/itests/util/ContentImpl.java | 5 -
subsystem/subsystem-obr/pom.xml | 6 -
.../obr/internal/RepositoryAdminRepository.java | 7 +-
.../util/felix/OsgiRequirementAdapter.java | 7 +-
66 files changed, 283 insertions(+), 1918 deletions(-)
diff --git a/application/application-modeller/pom.xml b/application/application-modeller/pom.xml
index 0aad52aba..f191c5c9d 100644
--- a/application/application-modeller/pom.xml
+++ b/application/application-modeller/pom.xml
@@ -45,21 +45,21 @@
<properties>
<aries.osgi.private.pkg>
+ org.apache.aries.application.impl,
org.apache.aries.application.modelling.impl;
org.apache.aries.application.modelling.internal;
- org.apache.aries.application.modelling.utils.impl
+ org.apache.aries.application.modelling.utils.impl,
+ org.apache.aries.application.utils
</aries.osgi.private.pkg>
<aries.osgi.export.pkg/>
<aries.osgi.import.pkg>
- org.apache.aries.application.modelling;provide:=true,
- org.apache.aries.application.modelling.utils;provide:=true,
+ org.apache.aries.application*;provide:=true,
*
</aries.osgi.import.pkg>
<lastReleaseVersion>1.0.0</lastReleaseVersion>
<org.apache.aries.versioning.plugin.version>0.3.2-SNAPSHOT</org.apache.aries.versioning.plugin.version>
<org.apache.aries.application.api.version>1.0.1-SNAPSHOT</org.apache.aries.application.api.version>
- <org.apache.aries.application.utils.version>1.0.1-SNAPSHOT</org.apache.aries.application.utils.version>
<org.apache.aries.blueprint.core.version>1.2.0</org.apache.aries.blueprint.core.version>
<org.apache.aries.jndi.api.version>1.0.0</org.apache.aries.jndi.api.version>
<org.apache.aries.testsupport.unit.version>2.0.0-SNAPSHOT</org.apache.aries.testsupport.unit.version>
@@ -116,11 +116,6 @@
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.aries.application</groupId>
- <artifactId>org.apache.aries.application.utils</artifactId>
- <version>${org.apache.aries.application.utils.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.aries.testsupport</groupId>
<artifactId>org.apache.aries.testsupport.unit</artifactId>
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataFactoryImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/impl/ApplicationMetadataFactoryImpl.java
similarity index 100%
rename from application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataFactoryImpl.java
rename to application/application-modeller/src/main/java/org/apache/aries/application/impl/ApplicationMetadataFactoryImpl.java
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/impl/ApplicationMetadataImpl.java
similarity index 100%
rename from application/application-utils/src/main/java/org/apache/aries/application/impl/ApplicationMetadataImpl.java
rename to application/application-modeller/src/main/java/org/apache/aries/application/impl/ApplicationMetadataImpl.java
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/impl/ContentImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/impl/ContentImpl.java
similarity index 93%
rename from application/application-utils/src/main/java/org/apache/aries/application/impl/ContentImpl.java
rename to application/application-modeller/src/main/java/org/apache/aries/application/impl/ContentImpl.java
index fc9b4cab5..606960175 100644
--- a/application/application-utils/src/main/java/org/apache/aries/application/impl/ContentImpl.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/impl/ContentImpl.java
@@ -23,7 +23,6 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.aries.application.Content;
-import org.apache.aries.application.utils.internal.MessageUtil;
import org.apache.aries.util.VersionRange;
import org.apache.aries.util.manifest.ManifestHeaderProcessor;
import org.osgi.framework.Constants;
@@ -40,15 +39,15 @@ public final class ContentImpl implements Content
protected Map<String, String> attributes;
private Map<String, String> directives;
private Map<String, String> nameValueMap;
-
+
/**
- *
+ *
* @param content Application-Content, Import-Package content
*/
public ContentImpl(String content) {
Map<String, Map<String, String>> appContentsMap = ManifestHeaderProcessor.parseImportString(content);
if (appContentsMap.size() != 1) {
- throw new IllegalArgumentException(MessageUtil.getMessage("APPUTILS0004E",content));
+ throw new IllegalArgumentException("APPUTILS0004E: Unable to create ContentImpl object based on content: " + content);
}
for (Map.Entry<String, Map<String, String>> entry : appContentsMap.entrySet()) {
this.contentName = entry.getKey();
@@ -57,23 +56,23 @@ public final class ContentImpl implements Content
break;
}
}
-
- public ContentImpl (String bundleSymbolicName, Version version) {
+
+ public ContentImpl (String bundleSymbolicName, Version version) {
this.contentName = bundleSymbolicName;
this.nameValueMap = new HashMap<String, String>();
nameValueMap.put("version", version.toString());
setup();
}
-
- public ContentImpl (String bundleSymbolicName, VersionRange version) {
+
+ public ContentImpl (String bundleSymbolicName, VersionRange version) {
this.contentName = bundleSymbolicName;
this.nameValueMap = new HashMap<String, String>();
nameValueMap.put("version", version.toString());
setup();
}
/**
- *
- * @param contentName
+ *
+ * @param contentName
* @param nameValueMap
*/
public ContentImpl(String contentName, Map<String, String> nameValueMap) {
@@ -81,24 +80,24 @@ public final class ContentImpl implements Content
this.nameValueMap= nameValueMap;
setup();
}
-
+
public String getContentName() {
return this.contentName;
}
-
+
public Map<String, String> getAttributes() {
return Collections.unmodifiableMap(this.attributes);
}
-
+
public Map<String, String> getDirectives() {
return Collections.unmodifiableMap(this.directives);
}
-
+
public String getAttribute(String key) {
String toReturn = this.attributes.get(key);
return toReturn;
}
-
+
/**
* add key value to the attributes map
* @param key
@@ -107,12 +106,12 @@ public final class ContentImpl implements Content
public void addAttribute(String key, String value) {
this.attributes.put(key, value);
}
-
+
public String getDirective(String key) {
String toReturn = this.directives.get(key);
return toReturn;
}
-
+
public Map<String, String> getNameValueMap() {
Map<String, String> nvm = new HashMap<String, String>();
for (String key : this.nameValueMap.keySet()) {
@@ -120,7 +119,7 @@ public final class ContentImpl implements Content
}
return nvm;
}
-
+
/**
* add key value to the directives map
* @param key
@@ -129,26 +128,26 @@ public final class ContentImpl implements Content
public void addDirective(String key, String value) {
this.directives.put(key, value);
}
-
+
public VersionRange getVersion() {
VersionRange vi = null;
- if (this.attributes.get(Constants.VERSION_ATTRIBUTE) != null
+ if (this.attributes.get(Constants.VERSION_ATTRIBUTE) != null
&& this.attributes.get(Constants.VERSION_ATTRIBUTE).length() > 0) {
vi = ManifestHeaderProcessor.parseVersionRange(this.attributes.get(Constants.VERSION_ATTRIBUTE));
} else {
- // what if version is not specified? let's interpret it as 0.0.0
+ // what if version is not specified? let's interpret it as 0.0.0
vi = ManifestHeaderProcessor.parseVersionRange("0.0.0");
}
return vi;
}
-
+
@Override
public String toString()
{
StringBuilder builder = new StringBuilder();
-
+
builder.append(this.contentName);
-
+
if (!nameValueMap.isEmpty()) {
for (Map.Entry<String, String> entry : nameValueMap.entrySet()) {
builder.append(';');
@@ -158,8 +157,8 @@ public final class ContentImpl implements Content
builder.append('\"');
}
}
-
-
+
+
return builder.toString();
}
@@ -168,46 +167,46 @@ public final class ContentImpl implements Content
{
if (other == this) return true;
if (other == null) return false;
-
+
if (other instanceof ContentImpl) {
ContentImpl otherContent = (ContentImpl)other;
-
+
Map<String,String> attributesWithoutVersion = attributes;
-
+
if (attributes.containsKey("version")) {
attributesWithoutVersion = new HashMap<String, String>(attributes);
attributesWithoutVersion.remove("version");
}
-
+
Map<String, String> otherAttributesWithoutVersion = otherContent.attributes;
-
+
if (otherContent.attributes.containsKey("version")) {
otherAttributesWithoutVersion = new HashMap<String, String>(otherContent.attributes);
otherAttributesWithoutVersion.remove("version");
}
-
- return contentName.equals(otherContent.contentName) &&
+
+ return contentName.equals(otherContent.contentName) &&
attributesWithoutVersion.equals(otherAttributesWithoutVersion) &&
directives.equals(otherContent.directives) &&
getVersion().equals(otherContent.getVersion());
}
-
+
return false;
}
-
+
@Override
public int hashCode()
{
return contentName.hashCode();
}
-
+
/**
* set up directives and attributes
*/
protected void setup() {
this.attributes = new HashMap<String, String>();
this.directives = new HashMap<String, String>();
-
+
for (String key : this.nameValueMap.keySet()) {
if (key.endsWith(":")) {
this.directives.put(key.substring(0, key.length() - 1), this.nameValueMap.get(key));
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/impl/DeploymentContentImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/impl/DeploymentContentImpl.java
similarity index 100%
rename from application/application-utils/src/main/java/org/apache/aries/application/impl/DeploymentContentImpl.java
rename to application/application-modeller/src/main/java/org/apache/aries/application/impl/DeploymentContentImpl.java
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/impl/DeploymentMetadataFactoryImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/impl/DeploymentMetadataFactoryImpl.java
similarity index 100%
rename from application/application-utils/src/main/java/org/apache/aries/application/impl/DeploymentMetadataFactoryImpl.java
rename to application/application-modeller/src/main/java/org/apache/aries/application/impl/DeploymentMetadataFactoryImpl.java
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/impl/DeploymentMetadataImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/impl/DeploymentMetadataImpl.java
similarity index 100%
rename from application/application-utils/src/main/java/org/apache/aries/application/impl/DeploymentMetadataImpl.java
rename to application/application-modeller/src/main/java/org/apache/aries/application/impl/DeploymentMetadataImpl.java
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/impl/ServiceDeclarationImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/impl/ServiceDeclarationImpl.java
similarity index 100%
rename from application/application-utils/src/main/java/org/apache/aries/application/impl/ServiceDeclarationImpl.java
rename to application/application-modeller/src/main/java/org/apache/aries/application/impl/ServiceDeclarationImpl.java
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/AbstractParserProxy.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/AbstractParserProxy.java
index 7228c80af..37ab6524f 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/AbstractParserProxy.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/AbstractParserProxy.java
@@ -18,9 +18,6 @@
*/
package org.apache.aries.application.modelling.impl;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
-
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
@@ -76,39 +73,39 @@ abstract public class AbstractParserProxy implements ParserProxy {
}
public List<? extends WrappedServiceMetadata> parse(List<URL> blueprintsToParse) throws Exception {
- _logger.debug(LOG_ENTRY, "parse", new Object[]{blueprintsToParse});
+ _logger.debug("Method entry: {}, args {}", "parse", new Object[]{blueprintsToParse});
ComponentDefinitionRegistry cdr = parseCDR (blueprintsToParse);
List<? extends WrappedServiceMetadata> result = parseCDRForServices (cdr, true);
- _logger.debug(LOG_EXIT, "parse", new Object[]{result});
+ _logger.debug("Method exit: {}, returning {}", "parse", new Object[]{result});
return result;
}
public List<? extends WrappedServiceMetadata> parse(URL blueprintToParse) throws Exception {
- _logger.debug(LOG_ENTRY, "parse", new Object[]{blueprintToParse});
+ _logger.debug("Method entry: {}, args {}", "parse", new Object[]{blueprintToParse});
List<URL> list = new ArrayList<URL>();
list.add(blueprintToParse);
List<? extends WrappedServiceMetadata> result = parse (list);
- _logger.debug(LOG_EXIT, "parse", new Object[]{result});
+ _logger.debug("Method exit: {}, returning {}", "parse", new Object[]{result});
return result;
}
public List<? extends WrappedServiceMetadata> parse(InputStream blueprintToParse) throws Exception {
- _logger.debug(LOG_ENTRY, "parse", new Object[]{blueprintToParse});
+ _logger.debug("Method entry: {}, args {}", "parse", new Object[]{blueprintToParse});
ComponentDefinitionRegistry cdr = parseCDR (blueprintToParse);
List<? extends WrappedServiceMetadata> result = parseCDRForServices (cdr, true);
- _logger.debug(LOG_EXIT, "parse", new Object[]{result});
+ _logger.debug("Method exit: {}, returning {}", "parse", new Object[]{result});
return result;
}
public ParsedServiceElements parseAllServiceElements(InputStream blueprintToParse) throws Exception {
- _logger.debug(LOG_ENTRY, "parseAllServiceElements", new Object[]{blueprintToParse});
+ _logger.debug("Method entry: {}, args {}", "parseAllServiceElements", new Object[]{blueprintToParse});
ComponentDefinitionRegistry cdr = parseCDR (blueprintToParse);
Collection<ExportedService> services = parseCDRForServices(cdr, false);
Collection<ImportedService> references = parseCDRForReferences (cdr);
ParsedServiceElements result = _modellingManager.getParsedServiceElements(services, references);
- _logger.debug(LOG_EXIT, "parseAllServiceElements", new Object[]{result});
+ _logger.debug("Method exit: {}, returning {}", "parseAllServiceElements", new Object[]{result});
return result;
}
@@ -122,7 +119,7 @@ abstract public class AbstractParserProxy implements ParserProxy {
*/
private List<ExportedService> parseCDRForServices (ComponentDefinitionRegistry cdr,
boolean suppressAnonymousServices) {
- _logger.debug(LOG_ENTRY, "parseCDRForServices", new Object[]{cdr, suppressAnonymousServices});
+ _logger.debug("Method entry: {}, args {}", "parseCDRForServices", new Object[]{cdr, suppressAnonymousServices});
List<ExportedService> result = new ArrayList<ExportedService>();
for (ComponentMetadata compMetadata : findAllComponents(cdr)) {
if (compMetadata instanceof ServiceMetadata) {
@@ -183,7 +180,7 @@ abstract public class AbstractParserProxy implements ParserProxy {
}
}
}
- _logger.debug(LOG_EXIT, "parseAllServiceElements", new Object[]{result});
+ _logger.debug("Method exit: {}, returning {}", "parseAllServiceElements", new Object[]{result});
return result;
}
private void processMultiValueProperty(Map<String, Object> serviceProps,
@@ -231,7 +228,7 @@ abstract public class AbstractParserProxy implements ParserProxy {
* @throws InvalidAttributeException
*/
private List<ImportedService> parseCDRForReferences (ComponentDefinitionRegistry cdr) throws InvalidAttributeException {
- _logger.debug(LOG_ENTRY, "parseCDRForReferences", new Object[]{cdr});
+ _logger.debug("Method entry: {}, args {}", "parseCDRForReferences", new Object[]{cdr});
List<ImportedService> result = new ArrayList<ImportedService>();
for (ComponentMetadata compMetadata : findAllComponents(cdr)) {
if (compMetadata instanceof ServiceReferenceMetadata) {
@@ -257,7 +254,7 @@ abstract public class AbstractParserProxy implements ParserProxy {
}
}
}
- _logger.debug(LOG_EXIT, "parseCDRForReferences", new Object[]{result});
+ _logger.debug("Method exit: {}, returning {}", "parseCDRForReferences", new Object[]{result});
return result;
}
@@ -360,7 +357,7 @@ abstract public class AbstractParserProxy implements ParserProxy {
* in the model being generated.
*/
protected boolean isBlacklisted (String iface, String blueprintFilter) {
- _logger.debug(LOG_ENTRY, "isBlacklisted", new Object[]{iface, blueprintFilter});
+ _logger.debug("Method entry: {}, args {}", "isBlacklisted", new Object[]{iface, blueprintFilter});
boolean blacklisted = false;
if (iface != null) {
// JPA - detect interface;
@@ -380,7 +377,7 @@ abstract public class AbstractParserProxy implements ParserProxy {
blacklisted |= filter.containsKey(JNDIConstants.JNDI_SERVICENAME);
}
}
- _logger.debug(LOG_EXIT, "isBlacklisted", new Object[]{!blacklisted});
+ _logger.debug("Method exit: {}, returning {}", "isBlacklisted", new Object[]{!blacklisted});
return blacklisted;
}
}
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/DeployedBundlesImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/DeployedBundlesImpl.java
index 29b8ff6d0..d45c415a5 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/DeployedBundlesImpl.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/DeployedBundlesImpl.java
@@ -18,9 +18,6 @@
*/
package org.apache.aries.application.modelling.impl;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -88,7 +85,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
public DeployedBundlesImpl(String assetName, Collection<ImportedBundle> appContentNames,
Collection<ImportedBundle> appUseBundleNames, Collection<ModelledResource> fakeServiceProvidingBundles)
{
- logger.debug(LOG_ENTRY, "DeployedBundles", new Object[]{appContentNames, appUseBundleNames, fakeServiceProvidingBundles});
+ logger.debug("Method entry: {}, args {}", "DeployedBundles", new Object[]{appContentNames, appUseBundleNames, fakeServiceProvidingBundles});
this.assetName = assetName;
@@ -97,7 +94,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
if (fakeServiceProvidingBundles != null) {
fakeDeployedBundles.addAll(fakeServiceProvidingBundles);
}
- logger.debug(LOG_EXIT, "DeployedBundles");
+ logger.debug("Method exit: {}, returning {}", "DeployedBundles");
}
/**
@@ -108,7 +105,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
*/
public void addBundle(ModelledResource modelledBundle)
{
- logger.debug(LOG_ENTRY, "addBundle", new Object[]{modelledBundle});
+ logger.debug("Method entry: {}, args {}", "addBundle", new Object[]{modelledBundle});
// Identify the deployment.mf entries the bundle should be added to by matching
// both the bundle name and resolved version against the name and version range
// defined in application.mf.
@@ -140,7 +137,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
cachedDeployedImportService = null;
cachedExternalRequirements = null;
- logger.debug(LOG_EXIT, "addBundle");
+ logger.debug("Method exit: {}, returning {}", "addBundle");
}
/**
@@ -200,7 +197,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
*/
public String getImportPackage() throws ResolverException
{
- logger.debug(LOG_ENTRY, "getImportPackage");
+ logger.debug("Method entry: {}, args {}", "getImportPackage");
String result = cachedImportPackage;
if (result == null)
@@ -242,7 +239,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
cachedImportPackage = result;
}
- logger.debug(LOG_EXIT, "getImportPackage", result);
+ logger.debug("Method exit: {}, returning {}", "getImportPackage", result);
return result;
}
@@ -256,7 +253,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
*
*/
public String getDeployedImportService() {
- logger.debug(LOG_ENTRY,"getDeployedImportService");
+ logger.debug("Method entry: {}, args {}","getDeployedImportService");
String result = cachedDeployedImportService;
if (result == null)
@@ -288,7 +285,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
result = createManifestString(deployedBundleServiceImports);
cachedDeployedImportService = result;
}
- logger.debug(LOG_EXIT,"getDeployedImportService", result);
+ logger.debug("Method exit: {}, returning {}","getDeployedImportService", result);
return result;
}
@@ -301,7 +298,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
private Collection<ImportedPackage> getExternalPackageRequirements()
throws ResolverException
{
- logger.debug(LOG_ENTRY,"getExternalPackageRequirements");
+ logger.debug("Method entry: {}, args {}","getExternalPackageRequirements");
Collection<ImportedPackage> result = cachedExternalRequirements;
if (result == null)
@@ -350,7 +347,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
ResolverException re = new ResolverException(MessageUtil.getMessage(
"INCOMPATIBLE_PACKAGE_VERSION_REQUIREMENTS", new Object[] { assetName, pkgString }));
re.setUnsatisfiedRequirements(pkgNames);
- logger.debug(LOG_EXIT,"getExternalPackageRequirements", re);
+ logger.debug("Method exit: {}, returning {}","getExternalPackageRequirements", re);
throw re;
}
@@ -358,7 +355,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
result = merger.getMergedRequirements();
cachedExternalRequirements = result;
}
- logger.debug(LOG_EXIT,"getExternalPackageRequirements", result);
+ logger.debug("Method exit: {}, returning {}","getExternalPackageRequirements", result);
return result;
}
@@ -373,7 +370,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
private void validateOtherImports(Collection<ImportedPackage> requirements)
throws ResolverException
{
- logger.debug(LOG_ENTRY, "validateOtherImports", requirements);
+ logger.debug("Method entry: {}, args {}", "validateOtherImports", requirements);
for (ImportedPackage req : requirements)
{
String pkgName = req.getPackageName();
@@ -386,12 +383,12 @@ public final class DeployedBundlesImpl implements DeployedBundles
ResolverException re = new ResolverException(MessageUtil.getMessage(
"INVALID_PACKAGE_REQUIREMENT_ATTRIBUTES", new Object[] { assetName, name, pkgName }));
re.setUnsatisfiedRequirements(Arrays.asList(pkgName));
- logger.debug(LOG_EXIT, "validateOtherImports", re);
+ logger.debug("Method exit: {}, returning {}", "validateOtherImports", re);
throw re;
}
}
}
- logger.debug(LOG_EXIT, "validateOtherImports");
+ logger.debug("Method exit: {}, returning {}", "validateOtherImports");
}
/**
@@ -403,7 +400,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
*/
private ExportedPackage getPackageMatch(ImportedPackage requirement, Collection<ModelledResource> bundles)
{
- logger.debug(LOG_ENTRY, "getPackageMatch", new Object[]{requirement, bundles});
+ logger.debug("Method entry: {}, args {}", "getPackageMatch", new Object[]{requirement, bundles});
ExportedPackage result = null;
outer: for (ModelledResource bundle : bundles)
@@ -416,13 +413,13 @@ public final class DeployedBundlesImpl implements DeployedBundles
}
}
}
- logger.debug(LOG_EXIT, "getPackageMatch", new Object[]{result});
+ logger.debug("Method exit: {}, returning {}", "getPackageMatch", new Object[]{result});
return result;
}
private String createManifestString(Collection<? extends DeploymentMFElement> values)
{
- logger.debug(LOG_ENTRY, "createManifestString", new Object[]{values});
+ logger.debug("Method entry: {}, args {}", "createManifestString", new Object[]{values});
StringBuilder builder = new StringBuilder();
for (DeploymentMFElement value : values)
{
@@ -431,7 +428,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
int length = builder.length();
String result = length > 0 ? builder.substring(0, length - 1) : "";
- logger.debug(LOG_EXIT, "createManifestString", new Object[]{result});
+ logger.debug("Method exit: {}, returning {}", "createManifestString", new Object[]{result});
return result;
}
@@ -450,8 +447,8 @@ public final class DeployedBundlesImpl implements DeployedBundles
*/
public Collection<ModelledResource> getDeployedContent()
{
- logger.debug(LOG_ENTRY, "getDeployedContent");
- logger.debug(LOG_EXIT,"getDeployedContent", deployedContent);
+ logger.debug("Method entry: {}, args {}", "getDeployedContent");
+ logger.debug("Method exit: {}, returning {}","getDeployedContent", deployedContent);
return Collections.unmodifiableCollection(deployedContent);
}
@@ -465,8 +462,8 @@ public final class DeployedBundlesImpl implements DeployedBundles
*/
public Collection<ModelledResource> getDeployedProvisionBundle ()
{
- logger.debug(LOG_ENTRY,"getDeployedProvisionBundle");
- logger.debug(LOG_EXIT, "getDeployedProvisionBundle", deployedContent);
+ logger.debug("Method entry: {}, args {}","getDeployedProvisionBundle");
+ logger.debug("Method exit: {}, returning {}", "getDeployedProvisionBundle", deployedContent);
return Collections.unmodifiableCollection(deployedProvisionBundle);
}
@@ -478,7 +475,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
*/
public Collection<ModelledResource> getRequiredUseBundle() throws ResolverException
{
- logger.debug(LOG_ENTRY, "getRequiredUseBundle");
+ logger.debug("Method entry: {}, args {}", "getRequiredUseBundle");
Collection<ModelledResource> usedUseBundles = cachedRequiredUseBundle;
if (usedUseBundles == null)
@@ -497,7 +494,7 @@ public final class DeployedBundlesImpl implements DeployedBundles
cachedRequiredUseBundle = usedUseBundles;
}
- logger.debug(LOG_EXIT, "getRequiredUseBundle", usedUseBundles);
+ logger.debug("Method exit: {}, returning {}", "getRequiredUseBundle", usedUseBundles);
return usedUseBundles;
}
@@ -505,9 +502,9 @@ public final class DeployedBundlesImpl implements DeployedBundles
* DeployedBundles
*/
public Map<String, String> getExtraHeaders() {
- logger.debug (LOG_ENTRY, "getExtraHeaders");
+ logger.debug ("Method entry: {}, args {}", "getExtraHeaders");
Map<String, String> result = Collections.emptyMap();
- logger.debug (LOG_EXIT, "getExtraHeaders", result);
+ logger.debug ("Method exit: {}, returning {}", "getExtraHeaders", result);
return result;
}
}
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ExportedBundleImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ExportedBundleImpl.java
index 8d24e769f..1744d8902 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ExportedBundleImpl.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ExportedBundleImpl.java
@@ -18,9 +18,6 @@
*/
package org.apache.aries.application.modelling.impl;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
-
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -52,7 +49,7 @@ public class ExportedBundleImpl extends AbstractExportedBundle
* @throws InvalidAttributeException
*/
public ExportedBundleImpl (Attributes attrs) throws InvalidAttributeException {
- logger.debug(LOG_ENTRY, "ExportedBundleImpl", attrs);
+ logger.debug("Method entry: {}, args {}", "ExportedBundleImpl", attrs);
String symbolicName = attrs.getValue(Constants.BUNDLE_SYMBOLICNAME);
Map<String,Map<String, String>> map = ManifestHeaderProcessor.parseImportString(symbolicName);
@@ -62,7 +59,7 @@ public class ExportedBundleImpl extends AbstractExportedBundle
if(map.size() != 1) {
InvalidAttributeException iax = new InvalidAttributeException (MessageUtil.getMessage(
"TOO_MANY_SYM_NAMES", new Object[] {symbolicName}));
- logger.debug(LOG_EXIT, "ExportedBundleImpl", iax);
+ logger.debug("Method exit: {}, returning {}", "ExportedBundleImpl", iax);
throw iax;
}
@@ -81,7 +78,7 @@ public class ExportedBundleImpl extends AbstractExportedBundle
if (symbolicName == null || bmVersion == null) {
InvalidAttributeException iax = new InvalidAttributeException(MessageUtil.getMessage("INCORRECT_MANDATORY_HEADERS",
new Object[] {symbolicName, bmVersion}));
- logger.debug(LOG_EXIT, "ExportedBundleImpl", iax);
+ logger.debug("Method exit: {}, returning {}", "ExportedBundleImpl", iax);
throw iax;
}
@@ -104,7 +101,7 @@ public class ExportedBundleImpl extends AbstractExportedBundle
} else {
_fragHost = null;
}
- logger.debug(LOG_EXIT, "ExportedBundleImpl");
+ logger.debug("Method exit: {}, returning {}", "ExportedBundleImpl");
}
/**
@@ -113,17 +110,17 @@ public class ExportedBundleImpl extends AbstractExportedBundle
* @param fragHost may be null if this bundle is not a fragment
*/
public ExportedBundleImpl(Map<String, String> attributes, ImportedBundle fragHost) {
- logger.debug(LOG_ENTRY, "ExportedBundleImpl", new Object[]{attributes, fragHost});
+ logger.debug("Method entry: {}, args {}", "ExportedBundleImpl", new Object[]{attributes, fragHost});
_attributes = new HashMap<String, Object>(attributes);
_fragHost = fragHost;
- logger.debug(LOG_EXIT, "ExportedBundleImpl", new Object[]{attributes, fragHost});
+ logger.debug("Method exit: {}, returning {}", "ExportedBundleImpl", new Object[]{attributes, fragHost});
}
@Override
public Map<String, Object> getAttributes() {
- logger.debug(LOG_ENTRY, "getAttributes");
- logger.debug(LOG_EXIT, "getAttributes", new Object[]{_attributes});
+ logger.debug("Method entry: {}, args {}", "getAttributes");
+ logger.debug("Method exit: {}, returning {}", "getAttributes", new Object[]{_attributes});
return Collections.unmodifiableMap(_attributes);
}
@@ -136,17 +133,17 @@ public String toString() {
@Override
public ImportedBundle getFragmentHost() {
- logger.debug(LOG_ENTRY, "getFragmentHost");
- logger.debug(LOG_EXIT, "getFragmentHost", new Object[]{_fragHost});
+ logger.debug("Method entry: {}, args {}", "getFragmentHost");
+ logger.debug("Method exit: {}, returning {}", "getFragmentHost", new Object[]{_fragHost});
return _fragHost;
}
@Override
public boolean isFragment() {
- logger.debug(LOG_ENTRY, "isFragment");
+ logger.debug("Method entry: {}, args {}", "isFragment");
boolean result = _fragHost != null;
- logger.debug(LOG_EXIT, "isFragment", new Object[]{result});
+ logger.debug("Method exit: {}, returning {}", "isFragment", new Object[]{result});
return result;
}
}
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ExportedPackageImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ExportedPackageImpl.java
index ca5856d74..6dcb0ac12 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ExportedPackageImpl.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ExportedPackageImpl.java
@@ -18,8 +18,6 @@
*/
package org.apache.aries.application.modelling.impl;
import static org.apache.aries.application.modelling.ResourceType.PACKAGE;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
import java.util.Collections;
import java.util.HashMap;
@@ -52,7 +50,7 @@ public class ExportedPackageImpl implements ExportedPackage
*
*/
public ExportedPackageImpl (ModelledResource mr, String pkg, Map<String, Object> attributes) {
- logger.debug(LOG_ENTRY, "ExportedPackageImpl", new Object[]{mr, pkg, attributes});
+ logger.debug("Method entry: {}, args {}", "ExportedPackageImpl", new Object[]{mr, pkg, attributes});
_attributes = new HashMap<String, Object> (attributes);
_packageName = pkg;
_attributes.put (PACKAGE.toString(), _packageName);
@@ -66,20 +64,20 @@ public class ExportedPackageImpl implements ExportedPackage
_attributes.put (Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE, mr.getSymbolicName());
_attributes.put (Constants.BUNDLE_VERSION_ATTRIBUTE, mr.getVersion());
_bundle = mr;
- logger.debug(LOG_EXIT, "ExportedPackageImpl");
+ logger.debug("Method exit: {}, returning {}", "ExportedPackageImpl");
}
public Map<String, Object> getAttributes() {
- logger.debug(LOG_ENTRY, "getAttributes");
- logger.debug(LOG_EXIT, "getAttributes", _attributes);
+ logger.debug("Method entry: {}, args {}", "getAttributes");
+ logger.debug("Method exit: {}, returning {}", "getAttributes", _attributes);
return Collections.unmodifiableMap(_attributes);
}
public ResourceType getType() {
- logger.debug(LOG_ENTRY, "getType");
- logger.debug(LOG_EXIT, "getType", PACKAGE);
+ logger.debug("Method entry: {}, args {}", "getType");
+ logger.debug("Method exit: {}, returning {}", "getType", PACKAGE);
return PACKAGE;
}
@@ -88,8 +86,8 @@ public class ExportedPackageImpl implements ExportedPackage
* @return package name
*/
public String getPackageName() {
- logger.debug(LOG_ENTRY, "getPackageName");
- logger.debug(LOG_EXIT, "getPackageName", _packageName);
+ logger.debug("Method entry: {}, args {}", "getPackageName");
+ logger.debug("Method exit: {}, returning {}", "getPackageName", _packageName);
return _packageName;
}
@@ -98,8 +96,8 @@ public class ExportedPackageImpl implements ExportedPackage
* @return Version as String, or 0.0.0
*/
public String getVersion() {
- logger.debug(LOG_ENTRY, "getVersion");
- logger.debug(LOG_EXIT, "getVersion", _version);
+ logger.debug("Method entry: {}, args {}", "getVersion");
+ logger.debug("Method exit: {}, returning {}", "getVersion", _version);
return _version;
}
@@ -108,7 +106,7 @@ public class ExportedPackageImpl implements ExportedPackage
* Use-Bundle style package import. We do NOT lock down package versions, only bundle versions.
*/
public String toDeploymentString() {
- logger.debug(LOG_ENTRY, "toDeploymentString");
+ logger.debug("Method entry: {}, args {}", "toDeploymentString");
StringBuilder sb = new StringBuilder(_packageName);
for (Map.Entry<String, Object> entry : _attributes.entrySet()) {
String key = entry.getKey();
@@ -137,13 +135,13 @@ public class ExportedPackageImpl implements ExportedPackage
}
}
String result = sb.toString();
- logger.debug(LOG_EXIT, "toDeploymentString", result);
+ logger.debug("Method exit: {}, returning {}", "toDeploymentString", result);
return result;
}
public ModelledResource getBundle() {
- logger.debug(LOG_ENTRY, "getBundle");
- logger.debug(LOG_EXIT, "getBundle", _bundle);
+ logger.debug("Method entry: {}, args {}", "getBundle");
+ logger.debug("Method exit: {}, returning {}", "getBundle", _bundle);
return _bundle;
}
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ExportedServiceImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ExportedServiceImpl.java
index 6b793367e..dd261c3ff 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ExportedServiceImpl.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ExportedServiceImpl.java
@@ -18,9 +18,6 @@
*/
package org.apache.aries.application.modelling.impl;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
-
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
@@ -32,7 +29,7 @@ import org.apache.aries.application.modelling.ExportedService;
import org.apache.aries.application.modelling.ModellingConstants;
import org.apache.aries.application.modelling.ResourceType;
import org.apache.aries.application.modelling.WrappedServiceMetadata;
-import org.apache.aries.application.utils.service.ExportedServiceHelper;
+import org.apache.aries.application.utils.ExportedServiceHelper;
import org.osgi.framework.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -62,7 +59,7 @@ public class ExportedServiceImpl implements ExportedService
Map<String, Object> serviceProperties )
{
- logger.debug(LOG_ENTRY,"ExportedServiceImpl", new Object[]{name, ranking, ifaces});
+ logger.debug("Method entry: {}, args {}","ExportedServiceImpl", new Object[]{name, ranking, ifaces});
_interfaces = new TreeSet<String>(ifaces);
if (!"".equals(name)) {
_name = name;
@@ -88,7 +85,7 @@ public class ExportedServiceImpl implements ExportedService
_attributes.put(Constants.OBJECTCLASS, sb.toString());
_attributes.put (Constants.SERVICE_RANKING, String.valueOf(_ranking));
_attributes.put(ModellingConstants.OBR_SERVICE, ModellingConstants.OBR_SERVICE);
- logger.debug(LOG_EXIT,"ExportedServiceImpl");
+ logger.debug("Method exit: {}, returning {}","ExportedServiceImpl");
}
/**
@@ -99,7 +96,7 @@ public class ExportedServiceImpl implements ExportedService
*/
@Deprecated
public ExportedServiceImpl (String ifaceName, Map<String, String> attrs) {
- logger.debug(LOG_ENTRY,"ExportedServiceImpl", new Object[]{ ifaceName, attrs});
+ logger.debug("Method entry: {}, args {}","ExportedServiceImpl", new Object[]{ ifaceName, attrs});
_interfaces = new TreeSet<String> (Arrays.asList(ifaceName));
_ranking = 0;
_attributes = new HashMap<String, Object> (attrs);
@@ -108,73 +105,73 @@ public class ExportedServiceImpl implements ExportedService
_attributes.put(ModellingConstants.OBR_SERVICE, ModellingConstants.OBR_SERVICE);
_serviceProperties = new HashMap<String, Object>();
_name = null;
- logger.debug(LOG_EXIT,"ExportedServiceImpl");
+ logger.debug("Method exit: {}, returning {}","ExportedServiceImpl");
}
public Map<String, Object> getAttributes() {
- logger.debug(LOG_ENTRY,"getAttributes");
- logger.debug(LOG_EXIT, "getAttributes", _attributes);
+ logger.debug("Method entry: {}, args {}","getAttributes");
+ logger.debug("Method exit: {}, returning {}", "getAttributes", _attributes);
return Collections.unmodifiableMap(_attributes);
}
public ResourceType getType() {
- logger.debug(LOG_ENTRY,"getType");
- logger.debug(LOG_EXIT, "getType", ResourceType.SERVICE);
+ logger.debug("Method entry: {}, args {}","getType");
+ logger.debug("Method exit: {}, returning {}", "getType", ResourceType.SERVICE);
return ResourceType.SERVICE;
}
public Collection<String> getInterfaces() {
- logger.debug(LOG_ENTRY,"getInterfaces");
- logger.debug(LOG_EXIT, "getInterfaces", _interfaces);
+ logger.debug("Method entry: {}, args {}","getInterfaces");
+ logger.debug("Method exit: {}, returning {}", "getInterfaces", _interfaces);
return Collections.unmodifiableCollection(_interfaces);
}
public String getName() {
- logger.debug(LOG_ENTRY,"getName");
- logger.debug(LOG_EXIT, "getName", _name);
+ logger.debug("Method entry: {}, args {}","getName");
+ logger.debug("Method exit: {}, returning {}", "getName", _name);
return _name;
}
public int getRanking() {
- logger.debug(LOG_ENTRY,"getRanking");
- logger.debug(LOG_EXIT, "getRanking", _ranking);
+ logger.debug("Method entry: {}, args {}","getRanking");
+ logger.debug("Method exit: {}, returning {}", "getRanking", _ranking);
return _ranking;
}
public Map<String, Object> getServiceProperties() {
- logger.debug(LOG_ENTRY,"getServiceProperties");
- logger.debug(LOG_EXIT, "getServiceProperties", _serviceProperties);
+ logger.debug("Method entry: {}, args {}","getServiceProperties");
+ logger.debug("Method exit: {}, returning {}", "getServiceProperties", _serviceProperties);
return Collections.unmodifiableMap(_serviceProperties);
}
public int compareTo(WrappedServiceMetadata o) {
- logger.debug(LOG_ENTRY, "compareTo", o);
+ logger.debug("Method entry: {}, args {}", "compareTo", o);
int result = ExportedServiceHelper.portableExportedServiceCompareTo(this, o);
- logger.debug(LOG_EXIT,"compareTo", result);
+ logger.debug("Method exit: {}, returning {}","compareTo", result);
return result;
}
@Override
public boolean equals (Object o) {
- logger.debug(LOG_ENTRY, "equals", o);
+ logger.debug("Method entry: {}, args {}", "equals", o);
boolean eq = ExportedServiceHelper.portableExportedServiceEquals(this, o);
- logger.debug(LOG_EXIT, "equals", eq);
+ logger.debug("Method exit: {}, returning {}", "equals", eq);
return eq;
}
@Override
public int hashCode() {
- logger.debug(LOG_ENTRY, "hashCode");
+ logger.debug("Method entry: {}, args {}", "hashCode");
int result = ExportedServiceHelper.portableExportedServiceHashCode(this);
- logger.debug(LOG_EXIT, "hashCode", result);
+ logger.debug("Method exit: {}, returning {}", "hashCode", result);
return result;
}
@@ -188,11 +185,11 @@ public class ExportedServiceImpl implements ExportedService
public boolean identicalOrDiffersOnlyByName(WrappedServiceMetadata wsmi) {
- logger.debug(LOG_ENTRY,"identicalOrDiffersOnlyByName", wsmi);
+ logger.debug("Method entry: {}, args {}","identicalOrDiffersOnlyByName", wsmi);
boolean result = ExportedServiceHelper.
portableExportedServiceIdenticalOrDiffersOnlyByName(this, wsmi);
- logger.debug(LOG_EXIT, "identicalOrDiffersOnlyByName", result);
+ logger.debug("Method exit: {}, returning {}", "identicalOrDiffersOnlyByName", result);
return result;
}
}
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedBundleImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedBundleImpl.java
index c8f719ed4..a91e28cd4 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedBundleImpl.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedBundleImpl.java
@@ -18,9 +18,6 @@
*/
package org.apache.aries.application.modelling.impl;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
-
import java.util.Dictionary;
import java.util.HashMap;
import java.util.Hashtable;
@@ -61,7 +58,7 @@ public class ImportedBundleImpl implements ImportedBundle {
*/
public ImportedBundleImpl(String filterString, Map<String, String> attributes) throws InvalidAttributeException
{
- logger.debug(LOG_ENTRY, "ImportedBundleImpl", new Object[]{filterString, attributes});
+ logger.debug("Method entry: {}, args {}", "ImportedBundleImpl", new Object[]{filterString, attributes});
_attributes = new HashMap<String, String> (attributes);
String versionRange = _attributes.remove(Constants.BUNDLE_VERSION_ATTRIBUTE);
if(versionRange == null) {
@@ -75,10 +72,10 @@ public class ImportedBundleImpl implements ImportedBundle {
_filter = FrameworkUtil.createFilter(FilterUtils.removeMandatoryFilterToken(_filterString));
} catch (InvalidSyntaxException isx) {
InvalidAttributeException iax = new InvalidAttributeException(isx);
- logger.debug(LOG_EXIT, "ImportedBundleImpl", new Object[]{iax});
+ logger.debug("Method exit: {}, returning {}", "ImportedBundleImpl", new Object[]{iax});
throw iax;
}
- logger.debug(LOG_EXIT, "ImportedBundleImpl");
+ logger.debug("Method exit: {}, returning {}", "ImportedBundleImpl");
}
/**
@@ -88,7 +85,7 @@ public class ImportedBundleImpl implements ImportedBundle {
* @throws InvalidAttributeException
*/
public ImportedBundleImpl (String bundleName, String versionRange) throws InvalidAttributeException {
- logger.debug(LOG_ENTRY, "ImportedBundleImpl", new Object[] {bundleName, versionRange});
+ logger.debug("Method entry: {}, args {}", "ImportedBundleImpl", new Object[] {bundleName, versionRange});
_attributes = new HashMap<String, String> ();
_attributes.put (ModellingConstants.OBR_SYMBOLIC_NAME, bundleName);
_attributes.put (Constants.VERSION_ATTRIBUTE, versionRange);
@@ -97,52 +94,52 @@ public class ImportedBundleImpl implements ImportedBundle {
_filter = FrameworkUtil.createFilter(FilterUtils.removeMandatoryFilterToken(_filterString));
} catch (InvalidSyntaxException isx) {
InvalidAttributeException iax = new InvalidAttributeException(isx);
- logger.debug(LOG_ENTRY, "ImportedBundleImpl", new Object[] {iax});
+ logger.debug("Method entry: {}, args {}", "ImportedBundleImpl", new Object[] {iax});
throw iax;
}
- logger.debug(LOG_EXIT, "ImportedBundleImpl");
+ logger.debug("Method exit: {}, returning {}", "ImportedBundleImpl");
}
public String getAttributeFilter() {
- logger.debug(LOG_ENTRY, "getAttributeFilter");
- logger.debug(LOG_EXIT, "getAttributeFilter", new Object[] {_filterString});
+ logger.debug("Method entry: {}, args {}", "getAttributeFilter");
+ logger.debug("Method exit: {}, returning {}", "getAttributeFilter", new Object[] {_filterString});
return _filterString;
}
public ResourceType getType() {
- logger.debug(LOG_ENTRY, "getType");
- logger.debug(LOG_EXIT, "getType", new Object[] {ResourceType.BUNDLE});
+ logger.debug("Method entry: {}, args {}", "getType");
+ logger.debug("Method exit: {}, returning {}", "getType", new Object[] {ResourceType.BUNDLE});
return ResourceType.BUNDLE;
}
public boolean isMultiple() {
- logger.debug(LOG_ENTRY, "isMultiple");
- logger.debug(LOG_EXIT, "isMultiple", new Object[] {false});
+ logger.debug("Method entry: {}, args {}", "isMultiple");
+ logger.debug("Method exit: {}, returning {}", "isMultiple", new Object[] {false});
return false;
}
public boolean isOptional() {
- logger.debug(LOG_ENTRY, "isOptional");
+ logger.debug("Method entry: {}, args {}", "isOptional");
boolean optional = false;
if (_attributes.containsKey(Constants.RESOLUTION_DIRECTIVE + ":")) {
if (Constants.RESOLUTION_OPTIONAL.equals(_attributes.get(Constants.RESOLUTION_DIRECTIVE + ":"))) {
optional = true;
}
}
- logger.debug(LOG_EXIT, "isOptional", optional);
+ logger.debug("Method exit: {}, returning {}", "isOptional", optional);
return optional;
}
public boolean isSatisfied(Provider capability) {
- logger.debug(LOG_ENTRY, "isSatisfied", capability);
+ logger.debug("Method entry: {}, args {}", "isSatisfied", capability);
if (capability.getType() != ResourceType.BUNDLE
&& capability.getType() != ResourceType.COMPOSITE) {
- logger.debug(LOG_EXIT, "isSatisfied", false);
+ logger.debug("Method exit: {}, returning {}", "isSatisfied", false);
return false;
}
Dictionary<String, Object> dict = new Hashtable<String, Object> (capability.getAttributes());
@@ -152,7 +149,7 @@ public class ImportedBundleImpl implements ImportedBundle {
}
boolean allPresent = ModellingHelperImpl.areMandatoryAttributesPresent_(_attributes, capability);
boolean result = allPresent && _filter.match(dict);
- logger.debug(LOG_EXIT, "isSatisfied", result);
+ logger.debug("Method exit: {}, returning {}", "isSatisfied", result);
return result;
}
@@ -161,10 +158,10 @@ public class ImportedBundleImpl implements ImportedBundle {
* @return Imported version range, as a string
*/
public String getVersionRange() {
- logger.debug(LOG_ENTRY, "getVersionRange");
+ logger.debug("Method entry: {}, args {}", "getVersionRange");
String range = _attributes.get(Constants.VERSION_ATTRIBUTE);
String result = (range == null) ? Version.emptyVersion.toString() : range;
- logger.debug(LOG_EXIT, "getVersionRange", result);
+ logger.debug("Method exit: {}, returning {}", "getVersionRange", result);
return result;
}
@@ -173,9 +170,9 @@ public class ImportedBundleImpl implements ImportedBundle {
* @return symbolic name
*/
public String getSymbolicName() {
- logger.debug(LOG_ENTRY, "getSymbolicName");
+ logger.debug("Method entry: {}, args {}", "getSymbolicName");
String result = _attributes.get(ModellingConstants.OBR_SYMBOLIC_NAME);
- logger.debug(LOG_EXIT, "getSymbolicName", result);
+ logger.debug("Method exit: {}, returning {}", "getSymbolicName", result);
return result;
}
@@ -185,7 +182,7 @@ public class ImportedBundleImpl implements ImportedBundle {
@Override
public boolean equals(Object o)
{
- logger.debug(LOG_ENTRY, "equals", o);
+ logger.debug("Method entry: {}, args {}", "equals", o);
boolean result = false;
if (o == this)
{
@@ -197,16 +194,16 @@ public class ImportedBundleImpl implements ImportedBundle {
result = (getSymbolicName().equals(ib.getSymbolicName())
&& getVersionRange().equals(ib.getVersionRange()));
}
- logger.debug(LOG_EXIT, "equals", result);
+ logger.debug("Method exit: {}, returning {}", "equals", result);
return result;
}
@Override
public int hashCode()
{
- logger.debug(LOG_ENTRY, "hashCode");
+ logger.debug("Method entry: {}, args {}", "hashCode");
int hashCode = getSymbolicName().hashCode() + 31 * getVersionRange().hashCode();
- logger.debug(LOG_ENTRY, "hashCode", hashCode);
+ logger.debug("Method entry: {}, args {}", "hashCode", hashCode);
return hashCode;
}
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedPackageImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedPackageImpl.java
index 681c2c101..60e53d947 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedPackageImpl.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedPackageImpl.java
@@ -20,8 +20,6 @@ package org.apache.aries.application.modelling.impl;
import static org.apache.aries.application.modelling.ModellingConstants.OPTIONAL_KEY;
import static org.apache.aries.application.modelling.ResourceType.PACKAGE;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
import java.util.Collections;
import java.util.Dictionary;
@@ -65,7 +63,7 @@ public class ImportedPackageImpl implements ImportedPackage
* @throws InvalidAttributeException
*/
public ImportedPackageImpl (String pkg, Map<String, String> attributes) throws InvalidAttributeException {
- logger.debug(LOG_ENTRY, "ImportedPackageImpl", new Object[] {pkg, attributes});
+ logger.debug("Method entry: {}, args {}", "ImportedPackageImpl", new Object[] {pkg, attributes});
_package = pkg;
String versionRange = null;
if (attributes != null) {
@@ -87,10 +85,10 @@ public class ImportedPackageImpl implements ImportedPackage
try {
_filter = FrameworkUtil.createFilter(FilterUtils.removeMandatoryFilterToken(_filterString));
} catch (InvalidSyntaxException isx) {
- logger.debug(LOG_EXIT, "ImportedPackageImpl", new Object[] {isx});
+ logger.debug("Method exit: {}, returning {}", "ImportedPackageImpl", new Object[] {isx});
throw new InvalidAttributeException(isx);
}
- logger.debug(LOG_EXIT, "ImportedPackageImpl");
+ logger.debug("Method exit: {}, returning {}", "ImportedPackageImpl");
}
/**
@@ -98,8 +96,8 @@ public class ImportedPackageImpl implements ImportedPackage
* @return attributes
*/
public Map<String, String> getAttributes() {
- logger.debug(LOG_ENTRY, "getAttributes");
- logger.debug(LOG_EXIT, "getAttributes", new Object[] {_attributes});
+ logger.debug("Method entry: {}, args {}", "getAttributes");
+ logger.debug("Method exit: {}, returning {}", "getAttributes", new Object[] {_attributes});
return Collections.unmodifiableMap(_attributes);
}
@@ -108,8 +106,8 @@ public class ImportedPackageImpl implements ImportedPackage
* @return package name
*/
public String getPackageName() {
- logger.debug(LOG_ENTRY, "getPackageName");
- logger.debug(LOG_EXIT, "getPackageName", new Object[] {_package});
+ logger.debug("Method entry: {}, args {}", "getPackageName");
+ logger.debug("Method exit: {}, returning {}", "getPackageName", new Object[] {_package});
return _package;
}
@@ -118,44 +116,44 @@ public class ImportedPackageImpl implements ImportedPackage
* @return version range
*/
public String getVersionRange() {
- logger.debug(LOG_ENTRY, "getVersionRange");
- logger.debug(LOG_EXIT, "getVersionRange", new Object[] {_versionRange});
+ logger.debug("Method entry: {}, args {}", "getVersionRange");
+ logger.debug("Method exit: {}, returning {}", "getVersionRange", new Object[] {_versionRange});
return _versionRange;
}
public String getAttributeFilter() {
- logger.debug(LOG_ENTRY, "getAttributeFilter");
- logger.debug(LOG_EXIT, "getAttributeFilter", new Object[] {_filterString});
+ logger.debug("Method entry: {}, args {}", "getAttributeFilter");
+ logger.debug("Method exit: {}, returning {}", "getAttributeFilter", new Object[] {_filterString});
return _filterString;
}
public ResourceType getType() {
- logger.debug(LOG_ENTRY, "getType");
- logger.debug(LOG_EXIT, "getType", new Object[] {PACKAGE});
+ logger.debug("Method entry: {}, args {}", "getType");
+ logger.debug("Method exit: {}, returning {}", "getType", new Object[] {PACKAGE});
return PACKAGE;
}
public boolean isMultiple() {
- logger.debug(LOG_ENTRY, "isMultiple");
- logger.debug(LOG_EXIT, "isMultiple", new Object[] {false});
+ logger.debug("Method entry: {}, args {}", "isMultiple");
+ logger.debug("Method exit: {}, returning {}", "isMultiple", new Object[] {false});
return false; // cannot import a given package more than once
}
public boolean isOptional() {
- logger.debug(LOG_ENTRY, "isOptional");
- logger.debug(LOG_EXIT, "isOptional", new Object[] {_optional});
+ logger.debug("Method entry: {}, args {}", "isOptional");
+ logger.debug("Method exit: {}, returning {}", "isOptional", new Object[] {_optional});
return _optional;
}
public boolean isSatisfied(Provider capability) {
- logger.debug(LOG_ENTRY, "isSatisfied", new Object[]{capability});
+ logger.debug("Method entry: {}, args {}", "isSatisfied", new Object[]{capability});
if (capability.getType() != PACKAGE) {
- logger.debug(LOG_EXIT, "isSatisfied", new Object[] {false});
+ logger.debug("Method exit: {}, returning {}", "isSatisfied", new Object[] {false});
return false;
}
Dictionary<String, Object> dict = new Hashtable<String, Object> (capability.getAttributes());
@@ -166,7 +164,7 @@ public class ImportedPackageImpl implements ImportedPackage
boolean allPresent = ModellingHelperImpl.areMandatoryAttributesPresent_(_attributes, capability);
boolean result = allPresent && _filter.match(dict);
- logger.debug(LOG_EXIT, "isSatisfied", new Object[] {result});
+ logger.debug("Method exit: {}, returning {}", "isSatisfied", new Object[] {result});
return result;
}
@@ -180,7 +178,7 @@ public class ImportedPackageImpl implements ImportedPackage
*/
@SuppressWarnings("deprecation")
public String toDeploymentString() {
- logger.debug(LOG_ENTRY, "toDeploymentString");
+ logger.debug("Method entry: {}, args {}", "toDeploymentString");
StringBuilder sb = new StringBuilder(_package);
// Note that the RESOLUTION_DIRECTIVE is set in this map, so it will be
// output automatically. p41 of the OSGi Core Spec v4.2 includes an example
@@ -199,7 +197,7 @@ public class ImportedPackageImpl implements ImportedPackage
}
}
String result = sb.toString();
- logger.debug(LOG_EXIT, "toDeploymentString", new Object[]{result});
+ logger.debug("Method exit: {}, returning {}", "toDeploymentString", new Object[]{result});
return result;
}
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedServiceImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedServiceImpl.java
index 949aa5633..9869ac8e6 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedServiceImpl.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedServiceImpl.java
@@ -19,8 +19,6 @@
package org.apache.aries.application.modelling.impl;
import static org.apache.aries.application.modelling.ResourceType.SERVICE;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
import java.util.Dictionary;
import java.util.HashMap;
@@ -90,7 +88,7 @@ public class ImportedServiceImpl implements ImportedService
}
private Filter generateAttributeFilter (Map<String, String> attrsToPopulate) throws InvalidAttributeException {
- logger.debug(LOG_ENTRY, "generateAttributeFilter", new Object[]{attrsToPopulate});
+ logger.debug("Method entry: {}, args {}", "generateAttributeFilter", new Object[]{attrsToPopulate});
Filter result = null;
try {
@@ -123,10 +121,10 @@ public class ImportedServiceImpl implements ImportedService
"A syntax error occurred attempting to parse the blueprint filter string '"
+ _blueprintFilter + "' for element with id " + _id + ": "
+ isx.getLocalizedMessage(), isx);
- logger.debug(LOG_EXIT, "generateAttributeFilter", new Object[]{isx});
+ logger.debug("Method exit: {}, returning {}", "generateAttributeFilter", new Object[]{isx});
throw iax;
}
- logger.debug(LOG_EXIT, "generateAttributeFilter", new Object[]{result});
+ logger.debug("Method exit: {}, returning {}", "generateAttributeFilter", new Object[]{result});
return result;
}
@@ -156,39 +154,39 @@ public class ImportedServiceImpl implements ImportedService
}
public String getFilter() {
- logger.debug(LOG_ENTRY, "getFilter");
- logger.debug(LOG_EXIT, "getFilter", _blueprintFilter);
+ logger.debug("Method entry: {}, args {}", "getFilter");
+ logger.debug("Method exit: {}, returning {}", "getFilter", _blueprintFilter);
return _blueprintFilter;
}
public ResourceType getType() {
- logger.debug(LOG_ENTRY, "getType");
- logger.debug(LOG_EXIT, "getType", SERVICE);
+ logger.debug("Method entry: {}, args {}", "getType");
+ logger.debug("Method exit: {}, returning {}", "getType", SERVICE);
return SERVICE;
}
public boolean isMultiple() {
- logger.debug(LOG_ENTRY, "isMultiple");
- logger.debug(LOG_EXIT, "isMultiple", _isMultiple);
+ logger.debug("Method entry: {}, args {}", "isMultiple");
+ logger.debug("Method exit: {}, returning {}", "isMultiple", _isMultiple);
return _isMultiple;
}
public boolean isOptional() {
- logger.debug(LOG_ENTRY, "isOptional");
- logger.debug(LOG_EXIT, "isOptional", _optional);
+ logger.debug("Method entry: {}, args {}", "isOptional");
+ logger.debug("Method exit: {}, returning {}", "isOptional", _optional);
return _optional;
}
public boolean isSatisfied(Provider capability) {
- logger.debug(LOG_ENTRY, "isSatisfied", capability);
+ logger.debug("Method entry: {}, args {}", "isSatisfied", capability);
if (capability.getType() != SERVICE) {
- logger.debug(LOG_EXIT, "isSatisfied", false);
+ logger.debug("Method exit: {}, returning {}", "isSatisfied", false);
return false;
}
Dictionary<String, Object> dict = new Hashtable<String, Object> (capability.getAttributes());
@@ -201,47 +199,47 @@ public class ImportedServiceImpl implements ImportedService
}
if (_attributeFilter == null) {
- logger.debug(LOG_EXIT, "isSatisfied", true);
+ logger.debug("Method exit: {}, returning {}", "isSatisfied", true);
return true;
}
boolean allPresent = ModellingHelperImpl.areMandatoryAttributesPresent_(_attributes, capability);
boolean result = allPresent && _attributeFilter.match(dict);
- logger.debug(LOG_EXIT, "isSatisfied", result);
+ logger.debug("Method exit: {}, returning {}", "isSatisfied", result);
return result;
}
public String getComponentName() {
- logger.debug(LOG_ENTRY, "getComponentName");
- logger.debug(LOG_EXIT, "getComponentName", _componentName);
+ logger.debug("Method entry: {}, args {}", "getComponentName");
+ logger.debug("Method exit: {}, returning {}", "getComponentName", _componentName);
return _componentName;
}
public String getId() {
- logger.debug(LOG_ENTRY, "getId");
- logger.debug(LOG_EXIT, "getId", _id);
+ logger.debug("Method entry: {}, args {}", "getId");
+ logger.debug("Method exit: {}, returning {}", "getId", _id);
return _id;
}
public String getInterface() {
- logger.debug(LOG_ENTRY, "getInterface");
- logger.debug(LOG_EXIT, "getInterface", _iface);
+ logger.debug("Method entry: {}, args {}", "getInterface");
+ logger.debug("Method exit: {}, returning {}", "getInterface", _iface);
return _iface;
}
public boolean isList() {
- logger.debug(LOG_ENTRY, "isList");
+ logger.debug("Method entry: {}, args {}", "isList");
boolean result = isMultiple();
- logger.debug(LOG_EXIT, "isList", result);
+ logger.debug("Method exit: {}, returning {}", "isList", result);
return result;
}
public String getAttributeFilter() {
- logger.debug(LOG_ENTRY, "getAttributeFilter");
- logger.debug(LOG_EXIT, "getAttributeFilter", _attribFilterString);
+ logger.debug("Method entry: {}, args {}", "getAttributeFilter");
+ logger.debug("Method exit: {}, returning {}", "getAttributeFilter", _attribFilterString);
return _attribFilterString;
}
@@ -272,10 +270,10 @@ public class ImportedServiceImpl implements ImportedService
@Override
public String toString() {
- logger.debug(LOG_ENTRY, "toString");
+ logger.debug("Method entry: {}, args {}", "toString");
if (_toString != null) {
- logger.debug(LOG_EXIT, "toString", _toString);
+ logger.debug("Method exit: {}, returning {}", "toString", _toString);
return _toString;
}
StringBuffer buf = new StringBuffer("<reference>");
@@ -287,7 +285,7 @@ public class ImportedServiceImpl implements ImportedService
// We don't have a method for writing filters in a canonical form
buf.append("<filter>" + _blueprintFilter + "</filter>");
_toString = buf.toString();
- logger.debug(LOG_EXIT, "toString", _toString);
+ logger.debug("Method exit: {}, returning {}", "toString", _toString);
return _toString;
}
@@ -295,13 +293,13 @@ public class ImportedServiceImpl implements ImportedService
* A String suitable for use in DeployedImport-Service
*/
public String toDeploymentString() {
- logger.debug(LOG_ENTRY, "toDeploymentString");
+ logger.debug("Method entry: {}, args {}", "toDeploymentString");
String baseFilter = getAttributeFilter();
// We may have one or more (service=service) elements that must be removed.
String reducedFilter = SERVICE_EQUALS_SERVICE.matcher(baseFilter).replaceAll("");
// now trim off mandatory:<*service occurrences
String result = FilterUtils.removeMandatoryFilterToken(reducedFilter);
- logger.debug(LOG_EXIT, "toDeploymentString", result);
+ logger.debug("Method exit: {}, returning {}", "toDeploymentString", result);
return result;
}
}
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ModelledResourceImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ModelledResourceImpl.java
index 0fda99f87..fab4fe6f0 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ModelledResourceImpl.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ModelledResourceImpl.java
@@ -18,8 +18,6 @@
*/
package org.apache.aries.application.modelling.impl;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
import static org.osgi.framework.Constants.BUNDLE_VERSION_ATTRIBUTE;
import static org.osgi.framework.Constants.DYNAMICIMPORT_PACKAGE;
import static org.osgi.framework.Constants.EXPORT_PACKAGE;
@@ -101,8 +99,8 @@ public class ModelledResourceImpl implements ModelledResource
Collection<ExportedService> exportedServices) throws InvalidAttributeException
{
this (fileURI, bundleAttributes, resourceType, exportedBundle, importedServices, exportedServices);
- logger.debug(LOG_ENTRY, "ModelledResourceImpl", new Object[]{fileURI, bundleAttributes, importedServices, exportedServices});
- logger.debug(LOG_EXIT, "ModelledResourceImpl");
+ logger.debug("Method entry: {}, args {}", "ModelledResourceImpl", new Object[]{fileURI, bundleAttributes, importedServices, exportedServices});
+ logger.debug("Method exit: {}, returning {}", "ModelledResourceImpl");
}
/**
@@ -119,8 +117,8 @@ public class ModelledResourceImpl implements ModelledResource
Collection<ExportedService> exportedServices) throws InvalidAttributeException
{
this (fileURI, bundleAttributes, ResourceType.BUNDLE, null, importedServices, exportedServices );
- logger.debug(LOG_ENTRY, "ModelledResourceImpl", new Object[]{fileURI, bundleAttributes, importedServices, exportedServices});
- logger.debug(LOG_EXIT, "ModelledResourceImpl");
+ logger.debug("Method entry: {}, args {}", "ModelledResourceImpl", new Object[]{fileURI, bundleAttributes, importedServices, exportedServices});
+ logger.debug("Method exit: {}, returning {}", "ModelledResourceImpl");
}
public ModelledResourceImpl (String fileURI, Attributes bundleAttributes,
@@ -129,7 +127,7 @@ public class ModelledResourceImpl implements ModelledResource
Collection<ExportedService> exportedServices
) throws InvalidAttributeException
{
- logger.debug(LOG_ENTRY, "ModelledResourceImpl", new Object[]{fileURI, bundleAttributes, importedServices, exportedServices,
+ logger.debug("Method entry: {}, args {}", "ModelledResourceImpl", new Object[]{fileURI, bundleAttributes, importedServices, exportedServices,
resourceType});
if (exportedBundle == null) {
@@ -234,70 +232,70 @@ public class ModelledResourceImpl implements ModelledResource
}
}
}
- logger.debug(LOG_EXIT, "ModelledResourceImpl");
+ logger.debug("Method exit: {}, returning {}", "ModelledResourceImpl");
}
public String getLocation() {
- logger.debug(LOG_ENTRY, "getLocation");
- logger.debug(LOG_EXIT, "getLocation", _fileURI);
+ logger.debug("Method entry: {}, args {}", "getLocation");
+ logger.debug("Method exit: {}, returning {}", "getLocation", _fileURI);
return _fileURI;
}
public ExportedBundle getExportedBundle() {
- logger.debug(LOG_ENTRY, "getExportedBundle");
- logger.debug(LOG_EXIT, "getExportedBundle", _exportedBundle);
+ logger.debug("Method entry: {}, args {}", "getExportedBundle");
+ logger.debug("Method exit: {}, returning {}", "getExportedBundle", _exportedBundle);
return _exportedBundle;
}
public Collection<ExportedPackage> getExportedPackages() {
- logger.debug(LOG_ENTRY, "getExportedPackages");
- logger.debug(LOG_EXIT, "getExportedPackages", _exportedPackages);
+ logger.debug("Method entry: {}, args {}", "getExportedPackages");
+ logger.debug("Method exit: {}, returning {}", "getExportedPackages", _exportedPackages);
return Collections.unmodifiableCollection(_exportedPackages);
}
public Collection<ImportedPackage> getImportedPackages() {
- logger.debug(LOG_ENTRY, "getImportedPackages");
- logger.debug(LOG_EXIT, "getImportedPackages", _importedPackages);
+ logger.debug("Method entry: {}, args {}", "getImportedPackages");
+ logger.debug("Method exit: {}, returning {}", "getImportedPackages", _importedPackages);
return Collections.unmodifiableCollection(_importedPackages);
}
public Collection<ExportedService> getExportedServices() {
- logger.debug(LOG_ENTRY, "getExportedServices");
- logger.debug(LOG_EXIT, "getExportedServices", _exportedServices);
+ logger.debug("Method entry: {}, args {}", "getExportedServices");
+ logger.debug("Method exit: {}, returning {}", "getExportedServices", _exportedServices);
return Collections.unmodifiableCollection(_exportedServices);
}
public Collection<ImportedService> getImportedServices() {
- logger.debug(LOG_ENTRY, "getImportedServices");
- logger.debug(LOG_EXIT, "getImportedServices", _exportedServices);
+ logger.debug("Method entry: {}, args {}", "getImportedServices");
+ logger.debug("Method exit: {}, returning {}", "getImportedServices", _exportedServices);
return Collections.unmodifiableCollection(_importedServices);
}
public String getSymbolicName() {
- logger.debug(LOG_ENTRY, "getSymbolicName");
+ logger.debug("Method entry: {}, args {}", "getSymbolicName");
String result = _exportedBundle.getSymbolicName();
- logger.debug(LOG_EXIT, "getSymbolicName", result);
+ logger.debug("Method exit: {}, returning {}", "getSymbolicName", result);
return result;
}
public String getVersion() {
- logger.debug(LOG_ENTRY, "getVersion");
+ logger.debug("Method entry: {}, args {}", "getVersion");
String result = _exportedBundle.getVersion();
- logger.debug(LOG_EXIT, "getVersion", result);
+ logger.debug("Method exit: {}, returning {}", "getVersion", result);
return result;
}
public String toDeploymentString() {
- logger.debug(LOG_ENTRY, "toDeploymentString");
+ logger.debug("Method entry: {}, args {}", "toDeploymentString");
String result = _exportedBundle.toDeploymentString();
- logger.debug(LOG_EXIT, "toDeploymentString", result);
+ logger.debug("Method exit: {}, returning {}", "toDeploymentString", result);
return result;
}
public ResourceType getType() {
- logger.debug(LOG_ENTRY, "getType");
- logger.debug(LOG_EXIT, "getType", ResourceType.BUNDLE);
+ logger.debug("Method entry: {}, args {}", "getType");
+ logger.debug("Method exit: {}, returning {}", "getType", ResourceType.BUNDLE);
return _resourceType;
}
@@ -307,24 +305,24 @@ public class ModelledResourceImpl implements ModelledResource
public Collection<ImportedBundle> getRequiredBundles() {
- logger.debug(LOG_ENTRY, "getRequiredBundles");
- logger.debug(LOG_EXIT, "getRequiredBundles", _requiredBundles);
+ logger.debug("Method entry: {}, args {}", "getRequiredBundles");
+ logger.debug("Method exit: {}, returning {}", "getRequiredBundles", _requiredBundles);
return Collections.unmodifiableCollection(_requiredBundles);
}
public ImportedBundle getFragmentHost() {
- logger.debug(LOG_ENTRY, "getFragmentHost");
+ logger.debug("Method entry: {}, args {}", "getFragmentHost");
ImportedBundle result = _exportedBundle.getFragmentHost();
- logger.debug(LOG_EXIT, "getFragmentHost", result);
+ logger.debug("Method exit: {}, returning {}", "getFragmentHost", result);
return result;
}
public boolean isFragment() {
- logger.debug(LOG_ENTRY, "isFragment");
+ logger.debug("Method entry: {}, args {}", "isFragment");
boolean result = _exportedBundle.isFragment();
- logger.debug(LOG_EXIT, "isFragment", result);
+ logger.debug("Method exit: {}, returning {}", "isFragment", result);
return result;
}
}
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ModelledResourceManagerImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ModelledResourceManagerImpl.java
index 57af5aac3..06f411ac4 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ModelledResourceManagerImpl.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ModelledResourceManagerImpl.java
@@ -18,9 +18,6 @@
* */
package org.apache.aries.application.modelling.impl;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
-
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
@@ -128,7 +125,7 @@ public class ModelledResourceManagerImpl implements ModelledResourceManager {
}
private ParsedServiceElements getBlueprintServiceElements (BundleManifest bundleMf, Iterable<InputStream> blueprints) throws ModellerException {
- _logger.debug(LOG_ENTRY,"getServiceElements", new Object[] {bundleMf, blueprints} );
+ _logger.debug("Method entry: {}, args {}","getServiceElements", new Object[] {bundleMf, blueprints} );
Set<ExportedService> services = new HashSet<ExportedService>();
Set<ImportedService> references = new HashSet<ImportedService>();
@@ -144,11 +141,11 @@ public class ModelledResourceManagerImpl implements ModelledResourceManager {
}
} catch (Exception e) {
ModellerException m = new ModellerException(e);
- _logger.debug(LOG_EXIT, "getServiceElements", m);
+ _logger.debug("Method exit: {}, returning {}", "getServiceElements", m);
throw m;
}
ParsedServiceElements result = _modellingManager.getParsedServiceElements(services, references);
- _logger.debug(LOG_EXIT, "getServiceElements", result);
+ _logger.debug("Method exit: {}, returning {}", "getServiceElements", result);
return result;
}
@@ -175,7 +172,7 @@ public class ModelledResourceManagerImpl implements ModelledResourceManager {
}
public ModelledResource getModelledResource(String uri, IDirectory bundle) throws ModellerException{
- _logger.debug(LOG_ENTRY, "getModelledResource", new Object[]{uri, bundle});
+ _logger.debug("Method entry: {}, args {}", "getModelledResource", new Object[]{uri, bundle});
if (bundle != null) {
BundleManifest bm = BundleManifest.fromBundle(bundle);
@@ -184,7 +181,7 @@ public class ModelledResourceManagerImpl implements ModelledResourceManager {
} else {
// The bundle does not exist
ModellerException me = new ModellerException(MessageUtil.getMessage("INVALID_BUNDLE_LOCATION", bundle));
- _logger.debug(LOG_EXIT, "getModelledResource", me);
+ _logger.debug("Method exit: {}, returning {}", "getModelledResource", me);
throw me;
}
@@ -197,10 +194,10 @@ public class ModelledResourceManagerImpl implements ModelledResourceManager {
mbi = _modellingManager.getModelledResource(uri, attributes, pse.getReferences(), pse.getServices());
} catch (InvalidAttributeException iae) {
ModellerException me = new ModellerException(iae);
- _logger.debug(LOG_EXIT, "getModelledResource", me);
+ _logger.debug("Method exit: {}, returning {}", "getModelledResource", me);
throw me;
}
- _logger.debug(LOG_EXIT, "getModelledResource", mbi);
+ _logger.debug("Method exit: {}, returning {}", "getModelledResource", mbi);
return mbi;
}
@@ -216,7 +213,7 @@ public class ModelledResourceManagerImpl implements ModelledResourceManager {
*/
private Iterable<InputStream> findBlueprints(BundleManifest bundleMf, IDirectory bundle) throws IOException
{
- _logger.debug(LOG_ENTRY, "findBlueprints", bundle);
+ _logger.debug("Method entry: {}, args {}", "findBlueprints", bundle);
Collection<IFile> blueprints = new ArrayList<IFile>();
BundleBlueprintParser bpParser = new BundleBlueprintParser(bundleMf);
@@ -264,7 +261,7 @@ public class ModelledResourceManagerImpl implements ModelledResourceManager {
throw e;
}
- _logger.debug(LOG_EXIT, "findBlueprints", result);
+ _logger.debug("Method exit: {}, returning {}", "findBlueprints", result);
return result;
}
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ParsedServiceElementsImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ParsedServiceElementsImpl.java
index 5268d34e2..5649281df 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ParsedServiceElementsImpl.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ParsedServiceElementsImpl.java
@@ -19,9 +19,6 @@
package org.apache.aries.application.modelling.impl;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
-
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
@@ -52,10 +49,10 @@ public final class ParsedServiceElementsImpl implements ParsedServiceElements
*/
public ParsedServiceElementsImpl ( Collection<ExportedService> services,
Collection<ImportedService> references) {
- logger.debug(LOG_ENTRY, "ParsedServiceElementsImpl", new Object[]{services, references});
+ logger.debug("Method entry: {}, args {}", "ParsedServiceElementsImpl", new Object[]{services, references});
_services = new HashSet<ExportedService>(services);
_references = new HashSet<ImportedService>(references);
- logger.debug(LOG_ENTRY, "ParsedServiceElementsImpl");
+ logger.debug("Method entry: {}, args {}", "ParsedServiceElementsImpl");
}
/**
@@ -63,8 +60,8 @@ public final class ParsedServiceElementsImpl implements ParsedServiceElements
* @return imported services
*/
public Collection<ImportedService> getReferences() {
- logger.debug(LOG_ENTRY, "getReferences");
- logger.debug(LOG_EXIT, "getReferences", _references);
+ logger.debug("Method entry: {}, args {}", "getReferences");
+ logger.debug("Method exit: {}, returning {}", "getReferences", _references);
return Collections.unmodifiableCollection(_references);
}
@@ -73,8 +70,8 @@ public final class ParsedServiceElementsImpl implements ParsedServiceElements
* @return exported services
*/
public Collection<ExportedService> getServices() {
- logger.debug(LOG_ENTRY, "getServices");
- logger.debug(LOG_EXIT, "getServices", _services);
+ logger.debug("Method entry: {}, args {}", "getServices");
+ logger.debug("Method exit: {}, returning {}", "getServices", _services);
return Collections.unmodifiableCollection(_services);
}
}
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/internal/BundleBlueprintParser.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/internal/BundleBlueprintParser.java
index 7a70ba699..eab7aa972 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/internal/BundleBlueprintParser.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/internal/BundleBlueprintParser.java
@@ -28,8 +28,6 @@ import org.apache.aries.util.manifest.ManifestHeaderProcessor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static org.apache.aries.application.utils.AppConstants.*;
-
/**
* A bundle may contain a Bundle-Blueprint: header as per p649 of the v4 spec. If present,
* this denotes where to look for blueprint xml files. We could use Bundle.findEntries()
@@ -183,7 +181,7 @@ public class BundleBlueprintParser {
* @return true if this is a blueprint file according to the Bundle-Blueprint header
*/
public boolean isBPFile (String directory, String filename) {
- logger.debug(LOG_ENTRY, "isBPFile", new Object[] {directory, filename});
+ logger.debug("Method entry: {}, args {}", "isBPFile", new Object[] {directory, filename});
boolean result=false;
for (Path path: _paths) {
@@ -193,7 +191,7 @@ public class BundleBlueprintParser {
}
}
- logger.debug(LOG_EXIT, "isBPFile", result);
+ logger.debug("Method exit: {}, returning {}", "isBPFile", result);
return result;
}
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/internal/PackageRequirementMerger.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/internal/PackageRequirementMerger.java
index 912ac451d..1fbc0d2c0 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/internal/PackageRequirementMerger.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/internal/PackageRequirementMerger.java
@@ -17,8 +17,6 @@
* under the License.
*/
package org.apache.aries.application.modelling.internal;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
import java.util.Collection;
import java.util.Collections;
@@ -53,12 +51,12 @@ public final class PackageRequirementMerger
*/
public PackageRequirementMerger(Collection<ImportedPackage> requirements)
{
- logger.debug(LOG_ENTRY, "PackageRequirementMerger", requirements);
+ logger.debug("Method entry: {}, args {}", "PackageRequirementMerger", requirements);
if (requirements == null)
{
NullPointerException npe = new NullPointerException();
- logger.debug(LOG_EXIT, "PackageRequirementMerger", npe);
+ logger.debug("Method exit: {}, returning {}", "PackageRequirementMerger", npe);
throw npe;
}
@@ -85,7 +83,7 @@ public final class PackageRequirementMerger
}
mergedRequirements = (invalidRequirements.isEmpty() ? reqMap.values() : null);
- logger.debug(LOG_EXIT,"PackageRequirementMerger");
+ logger.debug("Method exit: {}, returning {}","PackageRequirementMerger");
}
/**
@@ -94,9 +92,9 @@ public final class PackageRequirementMerger
*/
public boolean isMergeSuccessful()
{
- logger.debug(LOG_ENTRY, "isMergeSuccessful");
+ logger.debug("Method entry: {}, args {}", "isMergeSuccessful");
boolean result = mergedRequirements != null;
- logger.debug(LOG_EXIT, "isMergeSuccessful", result);
+ logger.debug("Method exit: {}, returning {}", "isMergeSuccessful", result);
return result;
}
@@ -112,14 +110,14 @@ public final class PackageRequirementMerger
*/
public Collection<ImportedPackage> getMergedRequirements()
{
- logger.debug(LOG_ENTRY, "getMergedRequirements");
+ logger.debug("Method entry: {}, args {}", "getMergedRequirements");
if (mergedRequirements == null)
{
IllegalStateException ise = new IllegalStateException();
- logger.debug(LOG_EXIT, "getMergedRequirements", ise);
+ logger.debug("Method exit: {}, returning {}", "getMergedRequirements", ise);
throw ise;
}
- logger.debug(LOG_EXIT, "getMergedRequirements", mergedRequirements);
+ logger.debug("Method exit: {}, returning {}", "getMergedRequirements", mergedRequirements);
return Collections.unmodifiableCollection(mergedRequirements);
}
@@ -130,8 +128,8 @@ public final class PackageRequirementMerger
*/
public Set<String> getInvalidRequirements()
{
- logger.debug(LOG_ENTRY, "getInvalidRequirements");
- logger.debug(LOG_EXIT, "getInvalidRequirements", invalidRequirements);
+ logger.debug("Method entry: {}, args {}", "getInvalidRequirements");
+ logger.debug("Method exit: {}, returning {}", "getInvalidRequirements", invalidRequirements);
return Collections.unmodifiableSet(invalidRequirements);
}
diff --git a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/utils/impl/ModellingHelperImpl.java b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/utils/impl/ModellingHelperImpl.java
index 39ed7b760..c79bd5144 100644
--- a/application/application-modeller/src/main/java/org/apache/aries/application/modelling/utils/impl/ModellingHelperImpl.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/modelling/utils/impl/ModellingHelperImpl.java
@@ -19,8 +19,6 @@
package org.apache.aries.application.modelling.utils.impl;
import static org.apache.aries.application.modelling.ModellingConstants.OPTIONAL_KEY;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
import static org.osgi.framework.Constants.BUNDLE_VERSION_ATTRIBUTE;
import static org.osgi.framework.Constants.VERSION_ATTRIBUTE;
@@ -70,18 +68,18 @@ public class ModellingHelperImpl implements ModellingHelper {
Collection<ImportedBundle> appUseBundleNames,
Collection<ModelledResource> fakeServiceProvidingBundles)
{
- logger.debug(LOG_ENTRY, "createDeployedBundles", new Object[]{assetName,
+ logger.debug("Method entry: {}, args {}", "createDeployedBundles", new Object[]{assetName,
appContentNames, appUseBundleNames, fakeServiceProvidingBundles});
DeployedBundles result = new DeployedBundlesImpl (assetName,
appContentNames, appUseBundleNames, fakeServiceProvidingBundles);
- logger.debug(LOG_EXIT, "createDeployedBundles", result);
+ logger.debug("Method exit: {}, returning {}", "createDeployedBundles", result);
return result;
}
// These underlying static methods are directly accessible
// from other classes within the bundle
public static boolean areMandatoryAttributesPresent_(Map<String,String> consumerAttributes, Provider p) {
- logger.debug(LOG_ENTRY, "areMandatoryAttributesPresent_", new Object[]{consumerAttributes, p});
+ logger.debug("Method entry: {}, args {}", "areMandatoryAttributesPresent_", new Object[]{consumerAttributes, p});
boolean allPresent = true;
String mandatory = (String) p.getAttributes().get(Constants.MANDATORY_DIRECTIVE + ":");
@@ -94,14 +92,14 @@ public class ModellingHelperImpl implements ModellingHelper {
break;
}
}
- logger.debug(LOG_EXIT, "areMandatoryAttributesPresent_", allPresent);
+ logger.debug("Method exit: {}, returning {}", "areMandatoryAttributesPresent_", allPresent);
return allPresent;
}
public static ImportedBundle buildFragmentHost_(String fragmentHostHeader) throws InvalidAttributeException {
- logger.debug(LOG_ENTRY, "buildFragmentHost_", new Object[]{fragmentHostHeader});
+ logger.debug("Method entry: {}, args {}", "buildFragmentHost_", new Object[]{fragmentHostHeader});
if(fragmentHostHeader == null) {
return null;
@@ -124,13 +122,13 @@ public class ModellingHelperImpl implements ModellingHelper {
String filter = ManifestHeaderProcessor.generateFilter(attribs);
ImportedBundle result = new ImportedBundleImpl(filter, attribs);
- logger.debug(LOG_EXIT, "buildFragmentHost_", result);
+ logger.debug("Method exit: {}, returning {}", "buildFragmentHost_", result);
return result;
}
public static ImportedPackage intersectPackage_ (ImportedPackage p1, ImportedPackage p2) {
- logger.debug(LOG_ENTRY, "intersectPackage_", new Object[]{p1, p2});
+ logger.debug("Method entry: {}, args {}", "intersectPackage_", new Object[]{p1, p2});
ImportedPackage result = null;
if (p1.getPackageName().equals(p2.getPackageName()))
{
@@ -196,7 +194,7 @@ public class ModellingHelperImpl implements ModellingHelper {
}
}
}
- logger.debug(LOG_EXIT, "intersectPackage_", result);
+ logger.debug("Method exit: {}, returning {}", "intersectPackage_", result);
return result;
}
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/AppConstants.java b/application/application-modeller/src/main/java/org/apache/aries/application/utils/AppConstants.java
similarity index 95%
rename from application/application-utils/src/main/java/org/apache/aries/application/utils/AppConstants.java
rename to application/application-modeller/src/main/java/org/apache/aries/application/utils/AppConstants.java
index 3fcec7205..c3dcb63ba 100644
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/AppConstants.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/utils/AppConstants.java
@@ -79,10 +79,5 @@ public interface AppConstants {
String DEPLOYMENTSERVICE_IMPORT = "DeployedService-Import";
String PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP="provision.exclude.local.repository";
- /**
- * Logging insert strings
- */
- String LOG_ENTRY = "Method entry: {}, args {}";
- String LOG_EXIT = "Method exit: {}, returning {}";
- String LOG_EXCEPTION = "Caught exception";
+ String LOG_EXCEPTION = "Caught exception";
}
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/service/ExportedServiceHelper.java b/application/application-modeller/src/main/java/org/apache/aries/application/utils/ExportedServiceHelper.java
similarity index 95%
rename from application/application-utils/src/main/java/org/apache/aries/application/utils/service/ExportedServiceHelper.java
rename to application/application-modeller/src/main/java/org/apache/aries/application/utils/ExportedServiceHelper.java
index ee9a873e7..ebad6c4d8 100644
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/service/ExportedServiceHelper.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/utils/ExportedServiceHelper.java
@@ -1,4 +1,4 @@
-package org.apache.aries.application.utils.service;
+package org.apache.aries.application.utils;
import java.util.ArrayList;
import java.util.Collections;
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/FilterUtils.java b/application/application-modeller/src/main/java/org/apache/aries/application/utils/FilterUtils.java
similarity index 87%
rename from application/application-utils/src/main/java/org/apache/aries/application/utils/FilterUtils.java
rename to application/application-modeller/src/main/java/org/apache/aries/application/utils/FilterUtils.java
index 3877928ae..000b8ce12 100644
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/FilterUtils.java
+++ b/application/application-modeller/src/main/java/org/apache/aries/application/utils/FilterUtils.java
@@ -18,9 +18,6 @@
*/
package org.apache.aries.application.utils;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
-
import java.util.regex.Pattern;
import org.slf4j.Logger;
@@ -38,7 +35,7 @@ public class FilterUtils
* @return A filter with the mandatory stanzas removed or null if a null filter is supplied
*/
public static String removeMandatoryFilterToken(String filter) {
- logger.debug(LOG_ENTRY, "areMandatoryAttributesPresent", new Object[]{filter});
+ logger.debug("Method entry: {}, args {}", "areMandatoryAttributesPresent", new Object[]{filter});
if(filter != null) {
filter = regexp.matcher(filter).replaceAll("");
@@ -57,7 +54,7 @@ public class FilterUtils
filter = filter.substring(2, filter.length() - 1);
}
}
- logger.debug(LOG_EXIT, "removeMandatoryFilterToken", filter);
+ logger.debug("Method exit: {}, returning {}", "removeMandatoryFilterToken", filter);
return filter;
}
}
diff --git a/application/application-utils/src/main/resources/OSGI-INF/blueprint/app-utils.xml b/application/application-modeller/src/main/resources/OSGI-INF/blueprint/app-utils.xml
similarity index 100%
rename from application/application-utils/src/main/resources/OSGI-INF/blueprint/app-utils.xml
rename to application/application-modeller/src/main/resources/OSGI-INF/blueprint/app-utils.xml
diff --git a/application/application-utils/src/test/java/org/apache/aries/application/impl/ApplicationMetadataImplTest.java b/application/application-modeller/src/test/java/org/apache/aries/application/impl/ApplicationMetadataImplTest.java
similarity index 97%
rename from application/application-utils/src/test/java/org/apache/aries/application/impl/ApplicationMetadataImplTest.java
rename to application/application-modeller/src/test/java/org/apache/aries/application/impl/ApplicationMetadataImplTest.java
index ab97de2b0..7ecc88324 100644
--- a/application/application-utils/src/test/java/org/apache/aries/application/impl/ApplicationMetadataImplTest.java
+++ b/application/application-modeller/src/test/java/org/apache/aries/application/impl/ApplicationMetadataImplTest.java
@@ -31,7 +31,6 @@ import org.apache.aries.application.ApplicationMetadata;
import org.apache.aries.application.ApplicationMetadataFactory;
import org.apache.aries.application.Content;
import org.apache.aries.application.ServiceDeclaration;
-import org.apache.aries.application.impl.ApplicationMetadataFactoryImpl;
import org.junit.Test;
import org.osgi.framework.Version;
diff --git a/application/application-utils/src/test/java/org/apache/aries/application/impl/DeploymentContentImplTest.java b/application/application-modeller/src/test/java/org/apache/aries/application/impl/DeploymentContentImplTest.java
similarity index 100%
rename from application/application-utils/src/test/java/org/apache/aries/application/impl/DeploymentContentImplTest.java
rename to application/application-modeller/src/test/java/org/apache/aries/application/impl/DeploymentContentImplTest.java
diff --git a/application/application-utils/src/test/resources/META-INF/APPLICATION.MF b/application/application-modeller/src/test/resources/META-INF/APPLICATION.MF
similarity index 100%
rename from application/application-utils/src/test/resources/META-INF/APPLICATION.MF
rename to application/application-modeller/src/test/resources/META-INF/APPLICATION.MF
diff --git a/application/application-utils/src/test/resources/META-INF/APPLICATION2.MF b/application/application-modeller/src/test/resources/META-INF/APPLICATION2.MF
similarity index 100%
rename from application/application-utils/src/test/resources/META-INF/APPLICATION2.MF
rename to application/application-modeller/src/test/resources/META-INF/APPLICATION2.MF
diff --git a/application/application-utils/src/test/resources/META-INF/APPLICATION3.MF b/application/application-modeller/src/test/resources/META-INF/APPLICATION3.MF
similarity index 100%
rename from application/application-utils/src/test/resources/META-INF/APPLICATION3.MF
rename to application/application-modeller/src/test/resources/META-INF/APPLICATION3.MF
diff --git a/application/application-utils/src/test/resources/META-INF/APPLICATION4.MF b/application/application-modeller/src/test/resources/META-INF/APPLICATION4.MF
similarity index 100%
rename from application/application-utils/src/test/resources/META-INF/APPLICATION4.MF
rename to application/application-modeller/src/test/resources/META-INF/APPLICATION4.MF
diff --git a/application/application-utils/src/test/resources/META-INF/DEPLOYMENT.MF b/application/application-modeller/src/test/resources/META-INF/DEPLOYMENT.MF
similarity index 100%
rename from application/application-utils/src/test/resources/META-INF/DEPLOYMENT.MF
rename to application/application-modeller/src/test/resources/META-INF/DEPLOYMENT.MF
diff --git a/application/application-utils/LICENSE b/application/application-utils/LICENSE
deleted file mode 100644
index 6b0b1270f..000000000
--- a/application/application-utils/LICENSE
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
-
diff --git a/application/application-utils/NOTICE b/application/application-utils/NOTICE
deleted file mode 100644
index 424644d05..000000000
--- a/application/application-utils/NOTICE
+++ /dev/null
@@ -1,8 +0,0 @@
-
-Apache Aries
-Copyright 2009-2011 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-
diff --git a/application/application-utils/pom.xml b/application/application-utils/pom.xml
deleted file mode 100644
index 9d99f3525..000000000
--- a/application/application-utils/pom.xml
+++ /dev/null
@@ -1,131 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.aries</groupId>
- <artifactId>parent</artifactId>
- <version>3.0.0</version>
- <relativePath>../../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.apache.aries.application</groupId>
- <artifactId>org.apache.aries.application.utils</artifactId>
- <packaging>bundle</packaging>
- <name>Apache Aries Application Utils</name>
- <version>1.0.1-SNAPSHOT</version>
- <description>
- Utilities for working with Aries Applications.
- </description>
-
- <scm>
- <connection>scm:git:https://gitbox.apache.org/repos/asf/aries.git</connection>
- <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/aries.git</developerConnection>
- <url>https://gitbox.apache.org/repos/asf?p=aries.git;a=summary</url>
- </scm>
-
- <properties>
- <!-- Export package versions are maintained in packageinfo files -->
- <aries.osgi.export.pkg>
- org.apache.aries.application.utils;
- org.apache.aries.application.utils.filesystem;
- org.apache.aries.application.utils.manifest;
- org.apache.aries.application.utils.management;
- org.apache.aries.application.utils.service;
- org.apache.aries.application.utils.runtime
- </aries.osgi.export.pkg>
- <aries.osgi.import.pkg>
- org.osgi.service.blueprint;resolution:=optional,
- org.apache.aries.application;provide:=true,
- *
- </aries.osgi.import.pkg>
- <aries.osgi.private.pkg>
- org.apache.aries.application.impl;
- org.apache.aries.application.utils.internal;
- org.apache.aries.application.utils.filesystem.impl
- </aries.osgi.private.pkg>
- <lastReleaseVersion>1.0.0</lastReleaseVersion>
- <org.apache.aries.versioning.plugin.version>0.3.2-SNAPSHOT</org.apache.aries.versioning.plugin.version>
-
- <org.apache.aries.application.api.version>1.0.1-SNAPSHOT</org.apache.aries.application.api.version>
- <org.apache.aries.util.version>1.2.0-SNAPSHOT</org.apache.aries.util.version>
- <osgi.core.version>4.3.1</osgi.core.version>
- </properties>
-
- <dependencies>
- <!--Dependency on other Application bundles -->
- <dependency>
- <groupId>org.apache.aries.application</groupId>
- <artifactId>org.apache.aries.application.api</artifactId>
- <version>${org.apache.aries.application.api.version}</version>
- </dependency>
-
- <!-- Dependency on other Aries module bundles -->
- <dependency>
- <groupId>org.apache.aries</groupId>
- <artifactId>org.apache.aries.util</artifactId>
- <version>${org.apache.aries.util.version}</version>
- </dependency>
-
- <!--External dependencies. Versions may be specified in default parent -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>osgi.core</artifactId>
- <version>${osgi.core.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.aries.versioning</groupId>
- <artifactId>org.apache.aries.versioning.plugin</artifactId>
- <executions>
- <execution>
- <id>default-verify</id>
- <phase>verify</phase>
- <goals>
- <goal>version-check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/ServiceDeclarationFactory.java b/application/application-utils/src/main/java/org/apache/aries/application/utils/ServiceDeclarationFactory.java
deleted file mode 100644
index 3f49b7a1d..000000000
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/ServiceDeclarationFactory.java
+++ /dev/null
@@ -1,32 +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 WARRANTIESOR 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.aries.application.utils;
-
-import org.apache.aries.application.ServiceDeclaration;
-import org.apache.aries.application.impl.ServiceDeclarationImpl;
-import org.osgi.framework.InvalidSyntaxException;
-
-public class ServiceDeclarationFactory {
-
- public static ServiceDeclaration getServiceDeclaration (String s) throws InvalidSyntaxException
- {
- return new ServiceDeclarationImpl(s);
- }
-}
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/internal/MessageUtil.java b/application/application-utils/src/main/java/org/apache/aries/application/utils/internal/MessageUtil.java
deleted file mode 100644
index 24534c3b6..000000000
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/internal/MessageUtil.java
+++ /dev/null
@@ -1,46 +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 WARRANTIESOR 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.aries.application.utils.internal;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-public class MessageUtil
-{
- /** The resource bundle for blueprint messages */
- private final static ResourceBundle messages = ResourceBundle.getBundle("org.apache.aries.application.utils.messages.APPUTILSmessages");
-
- /**
- * Resolve a message from the bundle, including any necessary formatting.
- *
- * @param key the message key.
- * @param inserts any required message inserts.
- * @return the message translated into the server local.
- */
- public static final String getMessage(String key, Object ... inserts)
- {
- String msg = messages.getString(key);
-
- if (inserts.length > 0)
- msg = MessageFormat.format(msg, inserts);
-
- return msg;
- }
-}
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/management/SimpleBundleInfo.java b/application/application-utils/src/main/java/org/apache/aries/application/utils/management/SimpleBundleInfo.java
deleted file mode 100644
index 3bb4a32cf..000000000
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/management/SimpleBundleInfo.java
+++ /dev/null
@@ -1,168 +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 WARRANTIESOR 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.aries.application.utils.management;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-import java.util.jar.Attributes;
-
-import org.apache.aries.application.Content;
-import org.apache.aries.application.impl.ContentImpl;
-import org.apache.aries.application.management.BundleInfo;
-import org.apache.aries.util.manifest.BundleManifest;
-import org.apache.aries.util.manifest.ManifestHeaderProcessor;
-import org.osgi.framework.Constants;
-import org.osgi.framework.Version;
-
-public final class SimpleBundleInfo implements BundleInfo {
- private Content _contentName;
- private Version _version;
- private Attributes _attributes;
- private Set<Content> _exportPackages = null;
- private Set<Content> _importPackages = null;
- private Set<Content> _exportServices = null;
- private Set<Content> _importServices = null;
- private Set<Content> _requireBundle = null;
-
- private String _location;
-
- public SimpleBundleInfo(BundleManifest bm, String location) {
- _contentName = new ContentImpl(
- bm.getSymbolicName(),
- ManifestHeaderProcessor.parseBundleSymbolicName(bm.getSymbolicName()).getAttributes());
- _version = bm.getVersion();
- _attributes = bm.getRawAttributes();
- _location = location;
- }
-
- public Set<Content> getExportPackage() {
- if (_exportPackages == null) {
- _exportPackages = getContentSetFromHeader (_attributes, Constants.EXPORT_PACKAGE);
- }
- return _exportPackages;
- }
-
- public Set<Content> getExportService() {
- if (_exportServices == null) {
- _exportServices = getContentSetFromHeader (_attributes, Constants.EXPORT_SERVICE);
- }
- return _exportServices;
- }
-
- public Map<String, String> getHeaders() {
- Map<String, String> result = new HashMap<String, String>();
- for (Entry<Object, Object> h: _attributes.entrySet()) {
- Attributes.Name name = (Attributes.Name) h.getKey();
- String value = (String) h.getValue();
- result.put(name.toString(), value);
- }
- return result;
- }
-
- public Set<Content> getImportPackage() {
- if (_importPackages == null) {
- _importPackages = getContentSetFromHeader (_attributes, Constants.IMPORT_PACKAGE);
- }
- return _importPackages;
- }
-
- public Set<Content> getImportService() {
- if (_importServices == null) {
- _importServices = getContentSetFromHeader (_attributes, Constants.IMPORT_SERVICE);
- }
- return _importServices;
- }
-
- public String getLocation() {
- return _location;
- }
-
- public String getSymbolicName() {
- return _contentName.getContentName();
- }
-
- public Version getVersion() {
- return _version;
- }
-
- private Set<Content> getContentSetFromHeader (Attributes attributes, String key) {
- String header = _attributes.getValue(key);
- List<String> splitHeader = ManifestHeaderProcessor.split(header, ",");
- HashSet<Content> result = new HashSet<Content>();
- for (String s: splitHeader) {
- Content c = new ContentImpl(s);
- result.add(c);
- }
- return result;
- }
-
- public Map<String, String> getBundleAttributes()
- {
- return _contentName.getAttributes();
- }
-
- public Map<String, String> getBundleDirectives()
- {
- return _contentName.getDirectives();
- }
-
- public Set<Content> getRequireBundle()
- {
- if (_requireBundle == null) {
- _requireBundle = getContentSetFromHeader(_attributes, Constants.REQUIRE_BUNDLE);
- }
-
- return _requireBundle;
- }
-
- /**
- * Equality is just based on the location. If you install a bundle from the same location string
- * you get the same Bundle, even if the underlying bundle had a different symbolic name/version.
- * This seems reasonable and quick.
- */
- public boolean equals(Object other)
- {
- if (other == null) return false;
- if (other == this) return true;
- if (other instanceof SimpleBundleInfo) {
- return _location.equals(((SimpleBundleInfo)other)._location);
- }
-
- return false;
- }
-
- public int hashCode()
- {
- return _location.hashCode();
- }
-
- public String toString()
- {
- return _contentName.getContentName() + "_" + getVersion();
- }
- public Attributes getRawAttributes()
- {
-
- return _attributes;
- }
-}
\ No newline at end of file
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/management/packageinfo b/application/application-utils/src/main/java/org/apache/aries/application/utils/management/packageinfo
deleted file mode 100644
index c72722a25..000000000
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/management/packageinfo
+++ /dev/null
@@ -1,19 +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.
-#
-version 1.0.0
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/manifest/ContentFactory.java b/application/application-utils/src/main/java/org/apache/aries/application/utils/manifest/ContentFactory.java
deleted file mode 100644
index f99c3d188..000000000
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/manifest/ContentFactory.java
+++ /dev/null
@@ -1,48 +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.aries.application.utils.manifest;
-
-import java.util.Map;
-
-import org.apache.aries.application.Content;
-import org.apache.aries.application.impl.ContentImpl;
-import org.apache.aries.util.manifest.ManifestHeaderProcessor;
-
-
-public class ContentFactory {
- /**
- * Parse a content object
- * @param bundleSymbolicName bundle symbolic name
- * @param versionRange version range in the String format
- * @return Content object
- */
- public static Content parseContent(String bundleSymbolicName, String versionRange) {
- return new ContentImpl(bundleSymbolicName, ManifestHeaderProcessor.parseVersionRange(versionRange));
- }
-
- /**
- * Parse a content
- * @param contentName The content name
- * @param nameValueMap The map containing the content attributes/directives
- * @return a content object
- */
- public static Content parseContent(String contentName, Map<String, String> nameValueMap) {
- return new ContentImpl(contentName, nameValueMap);
- }
-}
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/manifest/ManifestDefaultsInjector.java b/application/application-utils/src/main/java/org/apache/aries/application/utils/manifest/ManifestDefaultsInjector.java
deleted file mode 100644
index 6dbbdea9e..000000000
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/manifest/ManifestDefaultsInjector.java
+++ /dev/null
@@ -1,283 +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 WARRANTIESOR 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.aries.application.utils.manifest;
-
-import java.io.File;
-import java.util.Map;
-import java.util.jar.Manifest;
-
-import org.apache.aries.application.utils.AppConstants;
-import org.apache.aries.util.filesystem.FileSystem;
-import org.apache.aries.util.filesystem.IDirectory;
-import org.apache.aries.util.filesystem.IFile;
-import org.apache.aries.util.manifest.BundleManifest;
-import org.apache.aries.util.manifest.ManifestProcessor;
-import org.osgi.framework.Version;
-
-public class ManifestDefaultsInjector
-{
- /**
- * Quick adapter to update a Manifest, using content of a Zip File.
- * <p>
- * This is really a wrapper of updateManifest(Manifest,String,IDirectory), with the
- * IDirectory being being created from the Zip File. This method avoids other Bundles
- * requiring IDirectory solely for calling updateManifest.
- * <p>
- * @param mf Manifest to be updated
- * @param appName The name to use for this app, if the name contains
- * a '_' char then the portion after the '_' is used, if possible, as
- * the application version.
- * @param zip Content to use for application.
- * @return true if manifest modified, false otherwise.
- */
- public static boolean updateManifest(Manifest mf, String appName, File zip){
- IDirectory appPathIDir = FileSystem.getFSRoot(zip);
- boolean result = updateManifest(mf, appName, appPathIDir);
- return result;
- }
-
- /**
- * Tests the supplied manifest for the presence of expected
- * attributes, and where missing, adds them, and defaults
- * their values appropriately.
- *
- * @param mf The manifest to test & update if needed.
- * @param appName The name to use for this app, if the name contains
- * a '_' char then the portion after the '_' is used, if possible, as
- * the application version.
- * @param appDir The IDirectory to scan to build application content
- * property
- * @return true if manifest modified, false otherwise.
- */
- public static boolean updateManifest(Manifest mf, String appName, IDirectory appDir){
- Map<String, String> props = ManifestProcessor.readManifestIntoMap(mf);
- String extracted[] = extractAppNameAndVersionFromNameIfPossible(appName);
- String name = extracted[0];
- String version = extracted[1];
-
- boolean updated = false;
- updated |= defaultAppSymbolicName(mf, props, name);
- updated |= defaultAppName(mf, props, name);
- updated |= defaultVersion(mf, props, version);
- updated |= defaultAppScope(mf, props, name, version);
- updated |= defaultAppContent(mf, props, appDir);
-
- return updated;
- }
-
- /**
- * Takes a compound name_version string, and returns the Name & Version information.
- * <p>
- * @param name Contains name data related to this app. Expected format is name_version
- * @return Array of String, index 0 is appName, index 1 is Version.
- * <br> Name will be the appname retrieved from the 'name' argument, Version will be the
- * version if found and valid, otherwise will be defaulted.
- */
- private static String[] extractAppNameAndVersionFromNameIfPossible(String name){
- String retval[] = new String[2];
- String appName = name;
- String defaultedVersion;
-
- int index = name.indexOf('_');
-
- if (index != -1) {
- appName = name.substring(0, index);
- defaultedVersion = name.substring(index + 1);
-
- try {
- new Version(defaultedVersion);
- } catch (IllegalArgumentException e) {
- // this is not an error condition
- defaultedVersion = AppConstants.DEFAULT_VERSION;
- }
- } else {
- defaultedVersion = AppConstants.DEFAULT_VERSION;
- }
-
- retval[0] = appName;
- retval[1] = defaultedVersion;
-
- return retval;
- }
-
- /**
- * Sets the app symbolic name into the manifest, if not already present.
- *
- * @param mf manifest to update
- * @param props parsed manifest used to test if already present.
- * @param appName used for name if missing
- * @return true if manifest is modified, false otherwise.
- */
- private static boolean defaultAppSymbolicName(Manifest mf, Map<String, String> props, String appName){
- boolean updated = false;
- if (!props.containsKey(AppConstants.APPLICATION_SYMBOLIC_NAME)) {
- mf.getMainAttributes().putValue(AppConstants.APPLICATION_SYMBOLIC_NAME, appName);
- updated = true;
- }
- return updated;
- }
-
- /**
- * Sets the app name into the manifest, if not already present.
- *
- * @param mf manifest to update
- * @param props parsed manifest used to test if already present.
- * @param appName used for name if missing
- * @return true if manifest is modified, false otherwise.
- */
- private static boolean defaultAppName(Manifest mf, Map<String, String> props, String appName){
- boolean updated = false;
- if (!props.containsKey(AppConstants.APPLICATION_NAME)) {
- mf.getMainAttributes().putValue(AppConstants.APPLICATION_NAME, appName);
- updated = true;
- }
- return updated;
- }
-
- /**
- * Sets the app version into the manifest, if not already present.
- *
- * @param mf manifest to update
- * @param props parsed manifest used to test if already present.
- * @param appVersion used for version if missing
- * @return true if manifest is modified, false otherwise.
- */
- private static boolean defaultVersion(Manifest mf, Map<String, String> props, String appVersion){
- boolean updated = false;
- if (!props.containsKey(AppConstants.APPLICATION_VERSION)) {
- mf.getMainAttributes().putValue(AppConstants.APPLICATION_VERSION, appVersion);
- updated = true;
- }
- return updated;
- }
-
- /**
- * Sets the app scope into the manifest, if not already present.
- *
- * @param mf manifest to update
- * @param props parsed manifest used to test if already present.
- * @param name used to build appScope if app symbolic name not set.
- * @param version used to build appScope if app version missing.
- * @return true if manifest is modified, false otherwise.
- */
- private static boolean defaultAppScope(Manifest mf, Map<String, String> props, String name, String version){
- boolean updated = false;
- if (!props.containsKey(AppConstants.APPLICATION_SCOPE)) {
-
- String appSymbolicName;
- if (props.containsKey(AppConstants.APPLICATION_SYMBOLIC_NAME)) {
- appSymbolicName = props.get(AppConstants.APPLICATION_SYMBOLIC_NAME);
- } else {
- appSymbolicName = name;
- }
-
- String appVersion;
- if (props.containsKey(AppConstants.APPLICATION_VERSION)) {
- appVersion = props.get(AppConstants.APPLICATION_VERSION);
- } else {
- appVersion = version;
- }
-
- String appScope = appSymbolicName + '_' + appVersion;
- mf.getMainAttributes().putValue(AppConstants.APPLICATION_SCOPE, appScope);
- updated = true;
- }
- return updated;
- }
-
- /**
- * Sets the app content into the manifest, if not already present.
- * <p>
- * This method will NOT set the appcontent if it is unable to build it.
- * This is important, as the absence of appcontent is used by some callers
- * to test if a manifest contains all required content.
- *
- * @param mf manifest to update
- * @param props parsed manifest used to test if already present.
- * @param appDir used to build app content if missing.
- * @return true if manifest is modified, false otherwise.
- */
- private static boolean defaultAppContent(Manifest mf, Map<String, String> props, IDirectory appDir){
- boolean updated = false;
- if (!props.containsKey(AppConstants.APPLICATION_CONTENT)) {
- String appContent = calculateAppContent(appDir);
- if (appContent != null) {
- mf.getMainAttributes().putValue(AppConstants.APPLICATION_CONTENT, appContent);
- updated = true;
- }
- }
- return updated;
- }
-
- /**
- * Processes an IDirectory to find targets that require adding to the application content attrib.
- *
- * @param appDir The IDirectory to scan
- * @return AppContent string, or null if no content was found.
- */
- private static String calculateAppContent(IDirectory appDir){
- StringBuilder builder = new StringBuilder();
- for (IFile file : appDir) {
- processPossibleBundle(file, builder);
- }
- String returnVal = null;
- if (builder.length() > 0) {
- builder.deleteCharAt(builder.length() - 1);
- returnVal = builder.toString();
- }
- return returnVal;
- }
-
- /**
- * This method works out if the given IFile represents an OSGi bundle and if
- * it is then we append a matching rule to the String builder.
- *
- * @param file to file to check.
- * @param builder the builder to append to.
- */
- private static void processPossibleBundle(IFile file, StringBuilder builder)
- {
- if (file.isDirectory() || (file.isFile() && (file.getName().endsWith(".jar") || file.getName().endsWith(".war")))) {
- BundleManifest bundleMf = BundleManifest.fromBundle(file);
- if (bundleMf != null) {
- String manifestVersion = bundleMf.getManifestVersion();
- String name = bundleMf.getSymbolicName();
- String version = bundleMf.getVersion().toString();
-
- // if the bundle manifest version is 2 AND a symbolic name is specified we have a valid bundle
- if ("2".equals(manifestVersion) && name != null) {
-
- builder.append(name);
-
- // bundle version is not a required manifest header
- if (version != null) {
- builder.append(";version=\"[");
- builder.append(version);
- builder.append(',');
- builder.append(version);
- builder.append("]\"");
- }
-
- // the last comma will be removed once all content has been added
- builder.append(",");
- }
- }
- }
- }
-}
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/manifest/packageinfo b/application/application-utils/src/main/java/org/apache/aries/application/utils/manifest/packageinfo
deleted file mode 100644
index c72722a25..000000000
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/manifest/packageinfo
+++ /dev/null
@@ -1,19 +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.
-#
-version 1.0.0
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/packageinfo b/application/application-utils/src/main/java/org/apache/aries/application/utils/packageinfo
deleted file mode 100644
index c72722a25..000000000
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/packageinfo
+++ /dev/null
@@ -1,19 +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.
-#
-version 1.0.0
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/runtime/packageinfo b/application/application-utils/src/main/java/org/apache/aries/application/utils/runtime/packageinfo
deleted file mode 100644
index c72722a25..000000000
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/runtime/packageinfo
+++ /dev/null
@@ -1,19 +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.
-#
-version 1.0.0
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/service/ArrayServiceList.java b/application/application-utils/src/main/java/org/apache/aries/application/utils/service/ArrayServiceList.java
deleted file mode 100644
index 6b8ade1d3..000000000
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/service/ArrayServiceList.java
+++ /dev/null
@@ -1,241 +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 WARRANTIESOR 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.aries.application.utils.service;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-public class ArrayServiceList<E> implements ServiceCollection<E>, List<E>
-{
- private List<E> list = new ArrayList<E>();
- private List<ServiceReference> refList = new ArrayList<ServiceReference>();
- private BundleContext context;
-
- public ArrayServiceList(BundleContext ctx)
- {
- context = ctx;
- }
-
- public boolean add(E o)
- {
- throw new UnsupportedOperationException("The operation add is not supported. Use addService with a service reference.");
- }
-
- public void add(int index, E element)
- {
- throw new UnsupportedOperationException("The operation add is not supported. Use addService with a service reference.");
- }
-
- public boolean addAll(Collection<? extends E> c)
- {
- throw new UnsupportedOperationException("The operation addAll is not supported. Use addService with a service reference.");
- }
-
- public boolean addAll(int index, Collection<? extends E> c)
- {
- throw new UnsupportedOperationException("The operation addAll is not supported. Use addService with a service reference.");
- }
-
- public synchronized void clear()
- {
- list.clear();
-
- for (ServiceReference ref : refList) {
- context.ungetService(ref);
- }
-
- refList.clear();
- }
-
- public boolean contains(Object o)
- {
- return list.contains(o);
- }
-
- public boolean containsAll(Collection<?> c)
- {
- return list.containsAll(c);
- }
-
- public E get(int index)
- {
- return list.get(index);
- }
-
- public int indexOf(Object o)
- {
- return list.indexOf(o);
- }
-
- public boolean isEmpty()
- {
- return list.isEmpty();
- }
-
- public Iterator<E> iterator()
- {
- return listIterator();
- }
-
- public int lastIndexOf(Object o)
- {
- return list.lastIndexOf(o);
- }
-
- public ListIterator<E> listIterator()
- {
- return listIterator(0);
- }
-
- public ListIterator<E> listIterator(int index)
- {
- final ListIterator<E> it = list.listIterator(index);
- final ListIterator<ServiceReference> refIt = refList.listIterator(index);
-
- ListIterator<E> result = new ListIterator<E>() {
- private ServiceReference current;
-
- public void add(E o)
- {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasNext()
- {
- return it.hasNext();
- }
-
- public boolean hasPrevious()
- {
- return it.hasPrevious();
- }
-
- public E next()
- {
- E result = it.next();
- current = refIt.next();
- return result;
- }
-
- public int nextIndex()
- {
- return it.nextIndex();
- }
-
- public E previous()
- {
- E result = it.previous();
- current = refIt.previous();
- return result;
- }
-
- public int previousIndex()
- {
- return it.previousIndex();
- }
-
- public void remove()
- {
- it.remove();
- refIt.remove();
- context.ungetService(current);
- }
-
- public void set(E o)
- {
- throw new UnsupportedOperationException();
- }
- };
- return result;
- }
-
- public synchronized boolean remove(Object o)
- {
- int index = list.indexOf(o);
-
- ServiceReference ref = refList.remove(index);
-
- context.ungetService(ref);
- return list.remove(o);
- }
-
- public synchronized E remove(int index)
- {
- ServiceReference ref = refList.remove(index);
-
- context.ungetService(ref);
- return list.remove(index);
- }
-
- public synchronized boolean removeAll(Collection<?> c)
- {boolean worked = false;
-
- for (Object obj : c) {
- worked |= remove(obj);
- }
- return worked;
- }
-
- public boolean retainAll(Collection<?> c)
- {
- throw new UnsupportedOperationException("The operation retainAll is not supported.");
- }
-
- public E set(int index, E element)
- {
- throw new UnsupportedOperationException("The operation set is not supported.");
- }
-
- public int size()
- {
- return list.size();
- }
-
- public List<E> subList(int fromIndex, int toIndex)
- {
- throw new UnsupportedOperationException("The operation subList is not supported.");
- }
-
- public Object[] toArray()
- {
- return list.toArray();
- }
-
- public Object[] toArray(Object[] a)
- {
- return list.toArray(a);
- }
-
- public synchronized void addService(ServiceReference ref)
- {
- @SuppressWarnings("unchecked")
- E service = (E)context.getService(ref);
-
- if (service != null) {
- list.add(service);
- refList.add(ref);
- }
- }
-}
\ No newline at end of file
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/service/ServiceCollection.java b/application/application-utils/src/main/java/org/apache/aries/application/utils/service/ServiceCollection.java
deleted file mode 100644
index f3a88135d..000000000
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/service/ServiceCollection.java
+++ /dev/null
@@ -1,26 +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 WARRANTIESOR 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.aries.application.utils.service;
-
-import java.util.Collection;
-import org.osgi.framework.ServiceReference;
-
-public interface ServiceCollection<E> extends Collection<E> {
- void addService(ServiceReference ref);
-}
\ No newline at end of file
diff --git a/application/application-utils/src/main/java/org/apache/aries/application/utils/service/packageinfo b/application/application-utils/src/main/java/org/apache/aries/application/utils/service/packageinfo
deleted file mode 100644
index c72722a25..000000000
--- a/application/application-utils/src/main/java/org/apache/aries/application/utils/service/packageinfo
+++ /dev/null
@@ -1,19 +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.
-#
-version 1.0.0
diff --git a/application/application-utils/src/main/resources/org/apache/aries/application/utils/messages/APPUTILSmessages.properties b/application/application-utils/src/main/resources/org/apache/aries/application/utils/messages/APPUTILSmessages.properties
deleted file mode 100644
index 6f9806963..000000000
--- a/application/application-utils/src/main/resources/org/apache/aries/application/utils/messages/APPUTILSmessages.properties
+++ /dev/null
@@ -1,21 +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.
-#
-APPUTILS0004E=APPUTILS0004E: Unable to create ContentImpl object based on content: {0}.
-
-
diff --git a/application/application-utils/src/test/java/org/apache/aries/application/utils/manifest/ManifestProcessorTest.java b/application/application-utils/src/test/java/org/apache/aries/application/utils/manifest/ManifestProcessorTest.java
deleted file mode 100644
index 15bc1cec7..000000000
--- a/application/application-utils/src/test/java/org/apache/aries/application/utils/manifest/ManifestProcessorTest.java
+++ /dev/null
@@ -1,153 +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 WARRANTIESOR 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.aries.application.utils.manifest;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.jar.Manifest;
-
-import org.apache.aries.application.ApplicationMetadata;
-import org.apache.aries.application.Content;
-import org.apache.aries.application.impl.ApplicationMetadataFactoryImpl;
-import org.apache.aries.util.VersionRange;
-import org.apache.aries.util.manifest.ManifestProcessor;
-import org.junit.Test;
-import org.osgi.framework.Version;
-
-public class ManifestProcessorTest
-{
-
- private String appName = "Travel Reservation";
-
- /**
- * Check a simple manifest can be read.
- * @throws Exception
- */
- @Test
- public void testSimpleManifest() throws Exception
- {
- //the values of the manifest
- //intentionally include a couple of long lines
- Map<String, String> pairs = new HashMap<String, String>();
- pairs.put("Manifest-Version", "1.0");
- pairs.put("Application-ManifestVersion", "1.0");
- pairs.put("Application-Name", appName );
- pairs.put("Application-SymbolicName", "com.travel.reservation");
- pairs.put("Application-Version", "1.2");
- pairs.put("Application-Content", "com.travel.reservation.web;version=\"[1.1.0,1.2.0)\",com.travel.reservation.business");
- pairs.put("Export-Package", "com.travel.reservation.api;version=1.2");
- pairs.put("Import-Package", "com.travel.flight.api;version=\"[2.1.1,3.0.0)\",com.travel.rail.api;version=\"[1.0.0,2.0.0)\"");
- pairs.put("Application-Services", "services.xml");
-
- InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/APPLICATION.MF");
- Manifest mf = new Manifest(in);
- Map<String, String> map = ManifestProcessor.readManifestIntoMap(mf);
- assertNotNull(map);
-
- //check all the expected keys and values
- for (String key : pairs.keySet()){
- assertTrue("Key: " + key + " was not found",map.containsKey(key));
- String value = map.get(key);
- assertNotNull("Value was not present for key: " + key ,value);
- assertEquals("Value was not correct for key: " + key ,pairs.get(key),value);
- }
- //check there aren't any extra entries in the map that weren't expected
- assertEquals("The maps did not match",pairs,map);
- }
-
- /**
- * Check metadata can be extracted from a simple manifest.
- */
- @Test
- public void testManifestMetadata() throws Exception
- {
- ApplicationMetadataFactoryImpl manager = new ApplicationMetadataFactoryImpl();
- InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/APPLICATION.MF");
- ApplicationMetadata am = manager.parseApplicationMetadata(in);
- assertNotNull(am);
-
- assertEquals(am.getApplicationName(),appName);
-
- //"com.travel.reservation.web;version=\"[1.1.0,1.2.0)\",com.travel.reservation.business",
- List<Content> contents = am.getApplicationContents();
- for (Content content : contents){
- if ("com.travel.reservation.web".equals(content.getContentName())){
- VersionRange vr = content.getVersion();
- assertEquals(vr.getMinimumVersion(),new Version("1.1.0"));
- assertEquals(vr.getMaximumVersion(),new Version("1.2.0"));
- } else if("com.travel.reservation.business".equals(content.getContentName())){
- VersionRange vr = content.getVersion();
- assertEquals(new Version(0,0,0), vr.getMinimumVersion());
- } else
- fail("Unexepcted content name " + content.getContentName());
- }
- }
-
- /**
- * Check metadata can be extracted from a manifest that uses multiple lines
- * for a single manifest attribute.
- */
- @Test
- public void testManifestMetadataWithMultiLineEntries() throws Exception
- {
- ApplicationMetadataFactoryImpl manager = new ApplicationMetadataFactoryImpl();
-
- InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/APPLICATION2.MF");
-
- ApplicationMetadata am = manager.parseApplicationMetadata(in);
- assertNotNull(am);
-
- assertEquals(am.getApplicationName(),appName);
-
- //"com.travel.reservation.web;version=\"[1.1.0,1.2.0)\",com.travel.reservation.business",
- List<Content> contents = am.getApplicationContents();
- for (Content content : contents){
- if ("com.travel.reservation.web".equals(content.getContentName())){
- VersionRange vr = content.getVersion();
- assertEquals(vr.getMinimumVersion(),new Version("1.1.0"));
- assertEquals(vr.getMaximumVersion(),new Version("1.2.0"));
- } else if("com.travel.reservation.business".equals(content.getContentName())){
- VersionRange vr = content.getVersion();
- assertEquals(new Version(0,0,0), vr.getMinimumVersion());
- } else
- fail("Unexepcted content name " + content.getContentName());
- }
- }
-
- @Test
- public void testManifestWithoutEndingInNewLine() throws Exception
- {
- ApplicationMetadataFactoryImpl manager = new ApplicationMetadataFactoryImpl();
-
- InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/APPLICATION3.MF");
-
- ApplicationMetadata am = manager.parseApplicationMetadata(in);
- assertNotNull(am);
-
- assertEquals("Wrong number of bundles are in the application", 1, am.getApplicationContents().size());
- assertEquals("Wrong bundle name", "org.apache.aries.applications.test.bundle", am.getApplicationContents().get(0).getContentName());
- }
-}
\ No newline at end of file
diff --git a/application/application-utils/src/test/resources/app1/META-INF/APPLICATION.MF b/application/application-utils/src/test/resources/app1/META-INF/APPLICATION.MF
deleted file mode 100644
index a068b48ac..000000000
--- a/application/application-utils/src/test/resources/app1/META-INF/APPLICATION.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Application-ManifestVersion: 1.0
-Application-Name: Travel Reservation
-Application-SymbolicName: com.travel.reservation
-Application-Version: 1.2
-Application-Content: com.travel.reservation.web;version="[1.1.0,1.2.0)",
- com.travel.reservation.business,
- com.travel.reservation.data
-Export-Package: com.travel.reservation.api;version=1.2
-Import-Package: com.travel.flight.api;version="[2.1.1,3.0.0)",
- com.travel.rail.api;version="[1.0.0,2.0.0)",
- com.travel.credit.api;version="[2.1.0,2.1.0]",
- com.travel.hotel.api;version="[1.5.0,2.0.0)"
-Application-Services: services.xml
-
-
diff --git a/application/application-utils/src/test/resources/app1/META-INF/DEPLOYMENT.MF b/application/application-utils/src/test/resources/app1/META-INF/DEPLOYMENT.MF
deleted file mode 100644
index a57d30364..000000000
--- a/application/application-utils/src/test/resources/app1/META-INF/DEPLOYMENT.MF
+++ /dev/null
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-Application-SymbolicName: com.travel.reservation
-Application-Version: 1.2
-Deployed-Content: com.travel.reservation.web;deployed-version="1.1.0",
- com.travel.reservation.business;deployed-version=2.0
- com.travel.reservation.data;deployed-version=2.1.1
diff --git a/application/application-utils/src/test/resources/bundles/exploded.jar/META-INF/MANIFEST.MF b/application/application-utils/src/test/resources/bundles/exploded.jar/META-INF/MANIFEST.MF
deleted file mode 100644
index e6d054db2..000000000
--- a/application/application-utils/src/test/resources/bundles/exploded.jar/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,2 +0,0 @@
-Bundle-SymbolicName: com.ibm.test;singleton:=true
-Bundle-Version: 1.0.0
diff --git a/application/application-utils/src/test/resources/bundles/exploded.jar/META-INF/beforeManifest.file b/application/application-utils/src/test/resources/bundles/exploded.jar/META-INF/beforeManifest.file
deleted file mode 100644
index fde5208c9..000000000
--- a/application/application-utils/src/test/resources/bundles/exploded.jar/META-INF/beforeManifest.file
+++ /dev/null
@@ -1,19 +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.
-#
-
diff --git a/application/application-utils/src/test/resources/zip/file.txt b/application/application-utils/src/test/resources/zip/file.txt
deleted file mode 100644
index 9a62e0cad..000000000
--- a/application/application-utils/src/test/resources/zip/file.txt
+++ /dev/null
@@ -1,19 +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.
-#
-abc
\ No newline at end of file
diff --git a/application/application-utils/src/test/resources/zip/subdir/someFile.txt b/application/application-utils/src/test/resources/zip/subdir/someFile.txt
deleted file mode 100644
index 8a2e2740b..000000000
--- a/application/application-utils/src/test/resources/zip/subdir/someFile.txt
+++ /dev/null
@@ -1,19 +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.
-#
-def
\ No newline at end of file
diff --git a/application/pom.xml b/application/pom.xml
index 6d5985b00..f8a28c343 100644
--- a/application/pom.xml
+++ b/application/pom.xml
@@ -39,7 +39,6 @@
<modules>
<module>application-api</module>
- <module>application-utils</module>
<module>application-modeller</module>
</modules>
diff --git a/subsystem/readme.txt b/subsystem/readme.txt
index 6c40358fb..a3914784d 100644
--- a/subsystem/readme.txt
+++ b/subsystem/readme.txt
@@ -12,7 +12,6 @@ The following bundles are required to run subsystems. All are available in at le
mavenBundle("org.apache.aries", "org.apache.aries.util").version("1.0.1-SNAPSHOT"),
mavenBundle("org.apache.aries.application", "org.apache.aries.application.api").version("1.0.0"),
mavenBundle("org.apache.aries.application", "org.apache.aries.application.modeller").version("1.0.0"),
-mavenBundle("org.apache.aries.application", "org.apache.aries.application.utils").version("1.0.0"),
mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint").version("1.0.0"),
mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy").version("1.0.1-SNAPSHOT"),
mavenBundle("org.apache.aries.subsystem", "org.apache.aries.subsystem").version("1.0.0-SNAPSHOT"),
diff --git a/subsystem/subsystem-bundle/pom.xml b/subsystem/subsystem-bundle/pom.xml
index 802d0f7ae..5842e3158 100644
--- a/subsystem/subsystem-bundle/pom.xml
+++ b/subsystem/subsystem-bundle/pom.xml
@@ -63,7 +63,6 @@
<org.apache.aries.application.api.version>1.0.1-SNAPSHOT</org.apache.aries.application.api.version>
<org.apache.aries.application.modeller.version>1.0.1-SNAPSHOT</org.apache.aries.application.modeller.version>
- <org.apache.aries.application.utils.version>1.0.1-SNAPSHOT</org.apache.aries.application.utils.version>
<org.apache.aries.blueprint.version>1.2.0</org.apache.aries.blueprint.version>
<org.apache.aries.proxy.version>1.1.0</org.apache.aries.proxy.version>
<org.apache.aries.subsystem.api.version>2.0.10</org.apache.aries.subsystem.api.version>
@@ -101,11 +100,6 @@
<artifactId>org.apache.aries.application.modeller</artifactId>
<version>${org.apache.aries.application.modeller.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.aries.application</groupId>
- <artifactId>org.apache.aries.application.utils</artifactId>
- <version>${org.apache.aries.application.utils.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.aries.blueprint</groupId>
<artifactId>org.apache.aries.blueprint.core</artifactId>
diff --git a/subsystem/subsystem-core/pom.xml b/subsystem/subsystem-core/pom.xml
index 5126256ac..b78d7e954 100644
--- a/subsystem/subsystem-core/pom.xml
+++ b/subsystem/subsystem-core/pom.xml
@@ -70,7 +70,6 @@
<org.apache.aries.subsystem.api.version>2.0.10</org.apache.aries.subsystem.api.version>
<org.apache.aries.util.version>1.2.0-SNAPSHOT</org.apache.aries.util.version>
<org.apache.aries.application.api.version>1.0.1-SNAPSHOT</org.apache.aries.application.api.version>
- <org.apache.aries.application.utils.version>1.0.1-SNAPSHOT</org.apache.aries.application.utils.version>
<osgi.core.version>6.0.0</osgi.core.version>
<osgi.enterprise.version>5.0.0</osgi.enterprise.version>
<org.eclipse.equinox.coordinator.version>1.1.0.v20120522-1841</org.eclipse.equinox.coordinator.version>
@@ -95,11 +94,6 @@
<artifactId>org.apache.aries.application.api</artifactId>
<version>${org.apache.aries.application.api.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.aries.application</groupId>
- <artifactId>org.apache.aries.application.utils</artifactId>
- <version>${org.apache.aries.application.utils.version}</version>
- </dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
diff --git a/subsystem/subsystem-itests/pom.xml b/subsystem/subsystem-itests/pom.xml
index 9a5be70de..7be42bdf3 100644
--- a/subsystem/subsystem-itests/pom.xml
+++ b/subsystem/subsystem-itests/pom.xml
@@ -47,7 +47,6 @@
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
<org.apache.aries.application.api.version>1.0.1-SNAPSHOT</org.apache.aries.application.api.version>
<org.apache.aries.application.modeller.version>1.0.1-SNAPSHOT</org.apache.aries.application.modeller.version>
- <org.apache.aries.application.utils.version>1.0.1-SNAPSHOT</org.apache.aries.application.utils.version>
<org.apache.aries.blueprint.version>1.2.0</org.apache.aries.blueprint.version>
<org.apache.aries.proxy.version>1.1.0</org.apache.aries.proxy.version>
<org.apache.aries.subsystem.api.version>2.0.11-SNAPSHOT</org.apache.aries.subsystem.api.version>
@@ -143,22 +142,6 @@
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.apache.aries.application</groupId>
- <artifactId>org.apache.aries.application.utils</artifactId>
- <scope>test</scope>
- <version>${org.apache.aries.application.utils.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.osgi</groupId>
- <artifactId>osgi.core</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
<dependency>
<groupId>org.apache.aries.blueprint</groupId>
<artifactId>org.apache.aries.blueprint.core</artifactId>
diff --git a/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java b/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java
index e27566592..06e63e07c 100644
--- a/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java
+++ b/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java
@@ -134,7 +134,6 @@ public abstract class SubsystemTest extends AbstractIntegrationTest {
systemProperty("org.osgi.framework.storage.clean").value("onFirstInit"),
// Bundles
mavenBundle("org.apache.aries", "org.apache.aries.util").versionAsInProject(),
- mavenBundle("org.apache.aries.application", "org.apache.aries.application.utils").versionAsInProject(),
mavenBundle("org.apache.aries.application", "org.apache.aries.application.api").versionAsInProject(),
when(installModeler).useOptions(modelerBundles()),
when(installConfigAdmin).useOptions(
diff --git a/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/ContentImpl.java b/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/ContentImpl.java
index 75de3a4ec..2e263932d 100644
--- a/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/ContentImpl.java
+++ b/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/ContentImpl.java
@@ -29,11 +29,6 @@ import org.osgi.framework.Constants;
import org.osgi.framework.Version;
-/**
- * Implementation of Content, copied from org.apache.aries.application.utils folder with
- * intention to common this out to a common util folder
- *
- */
public final class ContentImpl implements Content
{
private String contentName;
diff --git a/subsystem/subsystem-obr/pom.xml b/subsystem/subsystem-obr/pom.xml
index 15febd176..e5a18de10 100644
--- a/subsystem/subsystem-obr/pom.xml
+++ b/subsystem/subsystem-obr/pom.xml
@@ -53,7 +53,6 @@
</aries.osgi.private.pkg>
<lastReleaseVersion>1.0.0</lastReleaseVersion>
- <org.apache.aries.application.utils.version>1.0.1-SNAPSHOT</org.apache.aries.application.utils.version>
<org.apache.felix.bundlerepository.version>2.0.10</org.apache.felix.bundlerepository.version>
<osgi.core.version>6.0.0</osgi.core.version>
<osgi.enterprise.version>5.0.0</osgi.enterprise.version>
@@ -65,11 +64,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.aries.application</groupId>
- <artifactId>org.apache.aries.application.utils</artifactId>
- <version>${org.apache.aries.application.utils.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.bundlerepository</artifactId>
diff --git a/subsystem/subsystem-obr/src/main/java/org/apache/aries/subsystem/obr/internal/RepositoryAdminRepository.java b/subsystem/subsystem-obr/src/main/java/org/apache/aries/subsystem/obr/internal/RepositoryAdminRepository.java
index 649e7fd8a..4a88529c5 100644
--- a/subsystem/subsystem-obr/src/main/java/org/apache/aries/subsystem/obr/internal/RepositoryAdminRepository.java
+++ b/subsystem/subsystem-obr/src/main/java/org/apache/aries/subsystem/obr/internal/RepositoryAdminRepository.java
@@ -13,9 +13,6 @@
*/
package org.apache.aries.subsystem.obr.internal;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -46,7 +43,7 @@ public class RepositoryAdminRepository implements Repository {
}
public Collection<Capability> findProviders(Requirement requirement) {
- logger.debug(LOG_ENTRY, "findProviders", requirement);
+ logger.debug("Method entry: {}, args {}", "findProviders", requirement);
Collection<Capability> result = Collections.emptyList();
if (IdentityNamespace.IDENTITY_NAMESPACE.equals(requirement.getNamespace())) {
result = new ArrayList<Capability>();
@@ -79,7 +76,7 @@ public class RepositoryAdminRepository implements Repository {
}
}
}
- logger.debug(LOG_EXIT, "findProviders", result);
+ logger.debug("Method exit: {}, returning {}", "findProviders", result);
return result;
}
diff --git a/subsystem/subsystem-obr/src/main/java/org/apache/aries/subsystem/util/felix/OsgiRequirementAdapter.java b/subsystem/subsystem-obr/src/main/java/org/apache/aries/subsystem/util/felix/OsgiRequirementAdapter.java
index f99998f9e..11a2b62a7 100644
--- a/subsystem/subsystem-obr/src/main/java/org/apache/aries/subsystem/util/felix/OsgiRequirementAdapter.java
+++ b/subsystem/subsystem-obr/src/main/java/org/apache/aries/subsystem/util/felix/OsgiRequirementAdapter.java
@@ -13,9 +13,6 @@
*/
package org.apache.aries.subsystem.util.felix;
-import static org.apache.aries.application.utils.AppConstants.LOG_ENTRY;
-import static org.apache.aries.application.utils.AppConstants.LOG_EXIT;
-
import org.apache.aries.subsystem.obr.internal.NamespaceTranslator;
import org.apache.aries.subsystem.obr.internal.ResourceHelper;
import org.apache.felix.bundlerepository.Capability;
@@ -75,9 +72,9 @@ public class OsgiRequirementAdapter implements Requirement {
}
public boolean isSatisfied(Capability capability) {
- logger.debug(LOG_ENTRY, "isSatisfied", capability);
+ logger.debug("Method entry: {}, args {}", "isSatisfied", capability);
boolean result = ResourceHelper.matches(requirement, new FelixCapabilityAdapter(capability, null));
- logger.debug(LOG_EXIT, "isSatisfied", result);
+ logger.debug("Method exit: {}, returning {}", "isSatisfied", result);
return result;
}