You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by mn...@apache.org on 2010/10/13 10:18:08 UTC
svn commit: r1022025 - in
/incubator/aries/trunk/application/application-default-local-platform: ./
src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/
src/main/java/org/apache/aries/ src/main/java/org/apache/aries/application/
s...
Author: mnuttall
Date: Wed Oct 13 08:18:07 2010
New Revision: 1022025
URL: http://svn.apache.org/viewvc?rev=1022025&view=rev
Log:
ARIES-444: Register the default local platform service in a separate bundle rather than in the appliation utils. From a patch by Emily Jiang.
Added:
incubator/aries/trunk/application/application-default-local-platform/pom.xml
incubator/aries/trunk/application/application-default-local-platform/src/
incubator/aries/trunk/application/application-default-local-platform/src/main/
incubator/aries/trunk/application/application-default-local-platform/src/main/java/
incubator/aries/trunk/application/application-default-local-platform/src/main/java/org/
incubator/aries/trunk/application/application-default-local-platform/src/main/java/org/apache/
incubator/aries/trunk/application/application-default-local-platform/src/main/java/org/apache/aries/
incubator/aries/trunk/application/application-default-local-platform/src/main/java/org/apache/aries/application/
incubator/aries/trunk/application/application-default-local-platform/src/main/java/org/apache/aries/application/local/
incubator/aries/trunk/application/application-default-local-platform/src/main/java/org/apache/aries/application/local/platform/
incubator/aries/trunk/application/application-default-local-platform/src/main/java/org/apache/aries/application/local/platform/impl/
incubator/aries/trunk/application/application-default-local-platform/src/main/java/org/apache/aries/application/local/platform/impl/DefaultLocalPlatform.java
incubator/aries/trunk/application/application-default-local-platform/src/main/resources/
incubator/aries/trunk/application/application-default-local-platform/src/main/resources/OSGI-INF/
incubator/aries/trunk/application/application-default-local-platform/src/main/resources/OSGI-INF/blueprint/
incubator/aries/trunk/application/application-default-local-platform/src/main/resources/OSGI-INF/blueprint/default-local-platform.xml
Added: incubator/aries/trunk/application/application-default-local-platform/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-default-local-platform/pom.xml?rev=1022025&view=auto
==============================================================================
--- incubator/aries/trunk/application/application-default-local-platform/pom.xml (added)
+++ incubator/aries/trunk/application/application-default-local-platform/pom.xml Wed Oct 13 08:18:07 2010
@@ -0,0 +1,50 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>application</artifactId>
+ <groupId>org.apache.aries.application</groupId>
+ <version>0.3-incubating-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.apache.aries.application.default.local.platform</artifactId>
+ <packaging>bundle</packaging>
+ <name>Apache Aries Application Default local platform</name>
+ <description>
+ Implementation of the default local Platform Repository
+ </description>
+ <properties>
+ <aries.osgi.export.pkg>
+ </aries.osgi.export.pkg>
+ <aries.osgi.private.pkg>
+ org.apache.aries.application.local.platform.impl
+ </aries.osgi.private.pkg>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.application</groupId>
+ <artifactId>org.apache.aries.application.api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Added: incubator/aries/trunk/application/application-default-local-platform/src/main/java/org/apache/aries/application/local/platform/impl/DefaultLocalPlatform.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-default-local-platform/src/main/java/org/apache/aries/application/local/platform/impl/DefaultLocalPlatform.java?rev=1022025&view=auto
==============================================================================
--- incubator/aries/trunk/application/application-default-local-platform/src/main/java/org/apache/aries/application/local/platform/impl/DefaultLocalPlatform.java (added)
+++ incubator/aries/trunk/application/application-default-local-platform/src/main/java/org/apache/aries/application/local/platform/impl/DefaultLocalPlatform.java Wed Oct 13 08:18:07 2010
@@ -0,0 +1,37 @@
+/*
+ * 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.local.platform.impl;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.aries.application.management.spi.runtime.LocalPlatform;
+
+public class DefaultLocalPlatform implements LocalPlatform {
+
+ public File getTemporaryDirectory() throws IOException {
+ File f = File.createTempFile("ebaTmp", null);
+ f.delete();
+ f.mkdir();
+ return f;
+ }
+ public File getTemporaryFile () throws IOException {
+ return File.createTempFile("ebaTmp", null);
+ }
+}
Added: incubator/aries/trunk/application/application-default-local-platform/src/main/resources/OSGI-INF/blueprint/default-local-platform.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-default-local-platform/src/main/resources/OSGI-INF/blueprint/default-local-platform.xml?rev=1022025&view=auto
==============================================================================
--- incubator/aries/trunk/application/application-default-local-platform/src/main/resources/OSGI-INF/blueprint/default-local-platform.xml (added)
+++ incubator/aries/trunk/application/application-default-local-platform/src/main/resources/OSGI-INF/blueprint/default-local-platform.xml Wed Oct 13 08:18:07 2010
@@ -0,0 +1,27 @@
+<?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.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ <bean id="default-local-platform" class="org.apache.aries.application.local.platform.impl.DefaultLocalPlatform" />
+
+ <service interface="org.apache.aries.application.management.spi.runtime.LocalPlatform"
+ ref="default-local-platform"
+ ranking="-1" />
+</blueprint>