Author: fmeschbe
Date: Wed Mar 18 07:49:05 2009
New Revision: 755500
URL: http://svn.apache.org/viewvc?rev=755500&view=rev
Log:
Prototype for StartLevel Management
Added:
incubator/sling/whiteboard/fmeschbe/startlevel/ (with props)
incubator/sling/whiteboard/fmeschbe/startlevel/pom.xml (with props)
incubator/sling/whiteboard/fmeschbe/startlevel/src/
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManager.java
(with props)
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManagerPlugin.java
(with props)
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/resources/
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/resources/empty.startlevel.properties
(with props)
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/resources/startlevel.properties
(with props)
Propchange: incubator/sling/whiteboard/fmeschbe/startlevel/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Mar 18 07:49:05 2009
@@ -0,0 +1,4 @@
+.classpath
+.project
+target
+.settings
Added: incubator/sling/whiteboard/fmeschbe/startlevel/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/startlevel/pom.xml?rev=755500&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/startlevel/pom.xml (added)
+++ incubator/sling/whiteboard/fmeschbe/startlevel/pom.xml Wed Mar 18 07:49:05
2009
@@ -0,0 +1,113 @@
+<?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.sling</groupId>
+ <artifactId>sling</artifactId>
+ <version>5-incubator-SNAPSHOT</version>
+ <relativePath>../../../parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>org.apache.sling.osgi.startlevelmanager</artifactId>
+ <version>0.1.0-incubator-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <name>Apache Sling OSGi Startlevel Manager</name>
+ <description>
+ This bundle implements management support for startlevels
+ of bundles to be installed into the system and for assigning
+ startlevels.
+ </description>
+
+ <scm>
+ </scm>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-scr-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-Activator>
+
org.apache.sling.osgi.startlevelmanager.StartLevelManager
+ </Bundle-Activator>
+ <Private-Package>
+ org.apache.sling.osgi.startlevelmanager
+ </Private-Package>
+ <Import-Package>
+ org.apache.felix.webconsole; resolution:=optional,
+ *
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <!-- WebConsole plugin -->
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.webconsole</artifactId>
+ <version>1.2.0</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Service Configuration -->
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.commons.osgi</artifactId>
+ <version>2.0.2-incubator</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- OSGi Libraries -->
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ </dependencies>
+
+</project>
Propchange: incubator/sling/whiteboard/fmeschbe/startlevel/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManager.java
URL:
http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManager.java?rev=755500&view=auto
==============================================================================
---
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManager.java
(added)
+++
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManager.java
Wed Mar 18 07:49:05 2009
@@ -0,0 +1,282 @@
+/*
+ * 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.sling.osgi.startlevelmanager;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Properties;
+import java.util.StringTokenizer;
+import java.util.Map.Entry;
+
+import org.apache.felix.webconsole.WebConsoleConstants;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.framework.SynchronousBundleListener;
+import org.osgi.service.startlevel.StartLevel;
+import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class StartLevelManager implements BundleActivator,
+ SynchronousBundleListener {
+
+ /** default log */
+ private final Logger log = LoggerFactory.getLogger(getClass());
+
+ private BundleContext context;
+
+ private Map<String, Integer> setup;
+
+ private ServiceTracker startLevel;
+
+ private StartLevelManagerPlugin plugin;
+
+ private ServiceRegistration pluginRegistration;
+
+ // ---------- BundleActivator interface
+
+ public void start(BundleContext context) throws Exception {
+
+ this.context = context;
+
+ // read the startlevel service assignments
+ this.setup = readSetup();
+
+ // need the start level service
+ startLevel = new ServiceTracker(context, StartLevel.class.getName(),
+ null);
+ startLevel.open();
+
+ // set the start levels of the installed bundles
+ for (Bundle bundle : context.getBundles()) {
+ setStartLevel(bundle);
+ }
+
+ // register for bundle events
+ context.addBundleListener(this);
+
+ try {
+ plugin = new StartLevelManagerPlugin(this);
+ plugin.activate(context);
+
+ Dictionary<String, String> props = new Hashtable<String, String>();
+ props.put(WebConsoleConstants.PLUGIN_LABEL, plugin.getLabel());
+
+ pluginRegistration = context.registerService(
+ WebConsoleConstants.SERVICE_NAME, plugin, props);
+ } catch (Throwable t) {
+ log.info("start: Cannot register WebConsole Plugin");
+ }
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ // unregister for bundle events
+ context.removeBundleListener(this);
+
+ if (pluginRegistration != null) {
+ pluginRegistration.unregister();
+ plugin = null;
+ }
+
+ if (plugin != null) {
+ plugin.deactivate();
+ plugin = null;
+ }
+
+ if (startLevel != null) {
+ startLevel.close();
+ startLevel = null;
+ }
+
+ context = null;
+ }
+
+ // ---------- SynchronousBundleListener
+
+ public void bundleChanged(BundleEvent event) {
+ if (event.getType() == BundleEvent.INSTALLED) {
+ Bundle bundle = event.getBundle();
+ log.info(
+ "bundleChanged: Checking Startlevel for newly installed Bundle
{}/{}",
+ bundle.getBundleId(), bundle.getSymbolicName());
+ setStartLevel(bundle);
+ }
+ }
+
+ // ---------- StartLevel Management
+
+ Bundle[] getBundles() {
+ return context.getBundles();
+ }
+
+ void setSystemStartLevel(int systemStartLevel) {
+ StartLevel sl = getStartLevel();
+ if (sl != null && sl.getStartLevel() != systemStartLevel) {
+ log.info("setStartLevel: Setting System Startlevel to {}",
+ systemStartLevel);
+ sl.setStartLevel(systemStartLevel);
+ }
+ }
+
+ int getSystemStartLevel() {
+ StartLevel sl = getStartLevel();
+ if (sl != null) {
+ return sl.getStartLevel();
+ }
+
+ // no startlevel service, assume zero
+ return 0;
+ }
+
+ void setStartLevel(Bundle bundle, int startLevel) {
+ StartLevel sl = getStartLevel();
+ if (sl != null && startLevel > 0) {
+ if (bundle != null) {
+ if (startLevel != getStartLevel(bundle)) {
+ log.info(
+ "setStartLevel: Setting Startlevel for Bundle {}/{} to
{}",
+ new Object[] { bundle.getBundleId(),
+ bundle.getSymbolicName(), startLevel });
+ sl.setBundleStartLevel(bundle, startLevel);
+ }
+ } else if (sl.getInitialBundleStartLevel() != startLevel) {
+ log.info(
+ "setStartLevel: Setting Initial Bundle Startlevel to {}",
+ startLevel);
+ sl.setInitialBundleStartLevel(startLevel);
+ }
+ }
+ }
+
+ void setStartLevel(Bundle bundle) {
+ setStartLevel(bundle, getStartLevelFromSetup(bundle));
+ }
+
+ int getStartLevel(Bundle bundle) {
+ StartLevel sl = getStartLevel();
+ if (sl != null) {
+ if (bundle != null) {
+ return sl.getBundleStartLevel(bundle);
+ }
+
+ // return the initial bundle startlevel
+ return sl.getInitialBundleStartLevel();
+ }
+
+ // no bundle or no startlevel service, assume zero
+ return 0;
+ }
+
+ Bundle getBundle(long bundleId) {
+ return context.getBundle(bundleId);
+ }
+
+ // ---------- internal
+
+ private Map<String, Integer> readSetup() {
+ Map<String, Integer> setup = new HashMap<String, Integer>();
+
+ Enumeration<?> urls;
+ try {
+ urls = context.getBundle().getResources("/startlevel.properties");
+ } catch (IOException ioe) {
+ log.warn("readSetup: Cannot find setup resources", ioe);
+ return setup;
+ }
+
+ while (urls.hasMoreElements()) {
+ URL setupURL = (URL) urls.nextElement();
+ if (setupURL != null) {
+ Properties props = new Properties();
+ InputStream ins = null;
+ try {
+ ins = setupURL.openStream();
+ props.load(ins);
+ } catch (IOException ioe) {
+ log.warn("readSetup: Cannot read setup from " + setupURL,
+ ioe);
+ } finally {
+ if (ins != null) {
+ try {
+ ins.close();
+ } catch (IOException ignore) {
+ }
+ }
+ }
+
+ for (Entry<Object, Object> entry : props.entrySet()) {
+ int level;
+ try {
+ level = Integer.parseInt((String) entry.getKey());
+ } catch (NumberFormatException nfe) {
+ log.warn("readSetup: Cannot parse startlevel "
+ + entry.getKey(), nfe);
+ continue;
+ }
+
+ StringTokenizer tokener = new StringTokenizer(
+ (String) entry.getValue(), ",");
+ while (tokener.hasMoreTokens()) {
+ String token = tokener.nextToken().trim();
+ if (token.length() > 0) {
+ setup.put(token, level);
+ }
+ }
+ }
+ }
+ }
+
+ return setup;
+ }
+
+ private int getStartLevelFromSetup(Bundle bundle) {
+ if (bundle != null) {
+ String bundleLocation = bundle.getLocation();
+ for (Entry<String, Integer> entry : setup.entrySet()) {
+ if (matchLocation(bundleLocation, entry.getKey())) {
+ return entry.getValue();
+ }
+ }
+ } else {
+ // inital bundle startlevel
+ // TODO: configure this !!!
+ return 100;
+ }
+
+ // no matching bundle location found
+ return -1;
+ }
+
+ private boolean matchLocation(String bundleLocation, String location) {
+ return bundleLocation.contains(location);
+ }
+
+ private StartLevel getStartLevel() {
+ return (StartLevel) startLevel.getService();
+ }
+}
Propchange:
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManager.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManager.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision Rev Url
Added:
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManagerPlugin.java
URL:
http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManagerPlugin.java?rev=755500&view=auto
==============================================================================
---
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManagerPlugin.java
(added)
+++
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManagerPlugin.java
Wed Mar 18 07:49:05 2009
@@ -0,0 +1,200 @@
+/*
+ * 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.sling.osgi.startlevelmanager;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Enumeration;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.felix.webconsole.AbstractWebConsolePlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Constants;
+
+public class StartLevelManagerPlugin extends AbstractWebConsolePlugin {
+
+ private static final String LABEL = "startlevel";
+
+ private static final String TITLE = "Startlevel Manager";
+
+ private static final String PREFIX_LEVEL = "level.";
+
+ private static final String LEVEL_SYSTEM = "system";
+
+ private static final String LEVEL_INITIAL = "initial";
+
+ private final StartLevelManager manager;
+
+ StartLevelManagerPlugin(StartLevelManager manager) {
+ this.manager = manager;
+ }
+
+ @Override
+ public String getLabel() {
+ return LABEL;
+ }
+
+ @Override
+ public String getTitle() {
+ return TITLE;
+ }
+
+ @Override
+ protected void renderContent(HttpServletRequest request,
+ HttpServletResponse response) throws ServletException, IOException
{
+
+ PrintWriter pw = response.getWriter();
+
+ pw.println("<form method='post'>");
+ pw.println("<table class='content' cellpadding='0' cellspacing='0'
width='100%'>");
+
+ pw.println("<tr class='content'>");
+ pw.println("<th class='content container' colspan='4'>Framework</th>");
+ pw.println("</tr>");
+
+ pw.println("<tr class='content'>");
+ pw.println("<td class='content'>");
+ pw.println("<input class='input' type='text' name='level.system'
value='"
+ + manager.getSystemStartLevel() + "' size='3'>");
+ pw.println("</td>");
+ pw.println("<td class='content' colspan='3'>Framework
Startlevel</td>");
+ pw.println("</tr>");
+
+ pw.println("<tr class='content'>");
+ pw.println("<td class='content'>");
+ pw.println("<input class='input' type='text' name='level.initial'
value='"
+ + manager.getStartLevel(null) + "' size='3'>");
+ pw.println("</td>");
+ pw.println("<td class='content' colspan='3'>Initial Bundle
Startlevel</td>");
+ pw.println("</tr>");
+
+ pw.println("<tr class='content'>");
+ pw.println("<td class='content container' colspan='4'><input
class='submit' type='submit' name='Set Start Level' value='Change'></td>");
+ pw.println("</tr>");
+
+ pw.println("<tr><td colspan='4'> </td></tr>");
+
+ pw.println("<tr class='content'>");
+ pw.println("<th class='content container' colspan='4'>Bundles</th>");
+ pw.println("</tr>");
+
+ pw.println("<tr class='content'>");
+ pw.println("<th class='content'>Startlevel</th>");
+ pw.println("<th class='content'>Id</th>");
+ pw.println("<th class='content'>Status</th>");
+ pw.println("<th class='content' width='99%'>Bundlename</th>");
+ pw.println("</tr>");
+
+ for (Bundle bundle : manager.getBundles()) {
+ int startLevel = manager.getStartLevel(bundle);
+ pw.println("<tr class='content'>");
+
+ // input field for the startlevel
+ pw.println("<td class='content'>");
+ pw.println("<input class='input' type='text' name='level."
+ + bundle.getBundleId() + "' value='" + startLevel
+ + "' size='3'>");
+ pw.println("</td>");
+
+ pw.println("<td class='content'>" + getState(bundle) + "</td>");
+ pw.println("<td class='content'>" + bundle.getBundleId() +
"</td>");
+ pw.println("<td class='content'>" + getName(bundle) + "</td>");
+ pw.println("</tr>");
+ }
+
+ pw.println("</table>");
+ pw.println("</form>");
+ }
+
+ @Override
+ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ Enumeration<?> names = req.getParameterNames();
+ while (names.hasMoreElements()) {
+ String name = (String) names.nextElement();
+ if (name.startsWith(PREFIX_LEVEL)) {
+
+ int value = (int) toLong(req.getParameter(name));
+ if (value < 0) {
+ continue;
+ }
+
+ name = name.substring(PREFIX_LEVEL.length());
+ if (LEVEL_SYSTEM.equals(name)) {
+ manager.setSystemStartLevel(value);
+ } else if (LEVEL_INITIAL.equals(name)) {
+ manager.setStartLevel(null, value);
+ } else {
+ long bundleId = toLong(name);
+ if (bundleId > 0) {
+ Bundle bundle = manager.getBundle(bundleId);
+ if (bundle != null) {
+ manager.setStartLevel(bundle, value);
+ }
+ }
+ }
+ }
+ }
+
+ resp.sendRedirect(req.getRequestURI());
+ }
+
+ // ---------- internal
+
+ private String getState(Bundle bundle) {
+ switch (bundle.getState()) {
+ case Bundle.INSTALLED:
+ return "installed";
+ case Bundle.RESOLVED:
+ return "resolved";
+ case Bundle.STARTING:
+ return "starting";
+ case Bundle.ACTIVE:
+ return "active";
+ case Bundle.STOPPING:
+ return "stopping";
+ case Bundle.UNINSTALLED:
+ return "uninstalled";
+ default:
+ return String.valueOf(bundle.getState());
+ }
+ }
+
+ private String getName(Bundle bundle) {
+ Object name = bundle.getHeaders().get(Constants.BUNDLE_NAME);
+ if (name != null) {
+ return name.toString();
+ }
+
+ // no name, just use symbolic name
+ return bundle.getSymbolicName();
+ }
+
+ private long toLong(String value) {
+ try {
+ return Long.parseLong(value);
+ } catch (NumberFormatException e) {
+ return -1;
+ }
+ }
+}
Propchange:
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManagerPlugin.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/java/org/apache/sling/osgi/startlevelmanager/StartLevelManagerPlugin.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision Rev Url
Added:
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/resources/empty.startlevel.properties
URL:
http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/startlevel/src/main/resources/empty.startlevel.properties?rev=755500&view=auto
==============================================================================
---
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/resources/empty.startlevel.properties
(added)
+++
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/resources/empty.startlevel.properties
Wed Mar 18 07:49:05 2009
@@ -0,0 +1,28 @@
+# 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.
+
+#
+# startlevel.properties files contain assignment of startlevels to
+# bundles, where bundles are identified by partial bundle location
+# names.
+#
+
+#
+# Sample entry assigning start level 17 to bundles whose bunde location
+# contains one of the strings bundle.location.1 or bundle.location.2
+#
+# 17 = bundle.location.1, bundle.location.2
\ No newline at end of file
Propchange:
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/resources/empty.startlevel.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/resources/startlevel.properties
URL:
http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/startlevel/src/main/resources/startlevel.properties?rev=755500&view=auto
==============================================================================
---
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/resources/startlevel.properties
(added)
+++
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/resources/startlevel.properties
Wed Mar 18 07:49:05 2009
@@ -0,0 +1,172 @@
+# 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.
+
+#
+# startlevel.properties files contain assignment of startlevels to
+# bundles, where bundles are identified by partial bundle location
+# names.
+#
+
+#
+# Sample entry assigning start level 17 to bundles whose bunde location
+# contains one of the strings bundle.location.1 or bundle.location.2
+#
+# 17 = bundle.location.1, bundle.location.2
+
+
+# Core System Bundles started first
+1 = \
+ org.apache.felix.bundlerepository, \
+ org.apache.felix.configadmin, \
+ org.apache.felix.dependencymanager, \
+ org.apache.felix.deploymentadmin, \
+ org.apache.felix.eventadmin, \
+ org.apache.felix.metatype, \
+ org.apache.felix.prefs, \
+ org.apache.felix.scr, \
+ org.apache.felix.webconsole, \
+ org.apache.sling.commons.log
+
+# CRX/Repository access and installer
+10 = \
+ com.day.crx.sling.api, \
+ com.day.crx.sling.base, \
+ com.day.crx.sling.client, \
+ commons-collections, \
+ org.apache.sling.jcr.api, \
+ org.apache.sling.jcr.jackrabbit.api, \
+ org.apache.sling.jcr.jcrinstall, \
+ org.apache.sling.runmode
+
+# Rest of Sling itself
+11 = \
+ commons-io, \
+ org.apache.sling.adapter, \
+ org.apache.sling.api, \
+ org.apache.sling.bundleresource.impl, \
+ org.apache.sling.commons.json, \
+ org.apache.sling.commons.mime, \
+ org.apache.sling.commons.osgi, \
+ org.apache.sling.commons.threads, \
+ org.apache.sling.engine, \
+ org.apache.sling.i18n, \
+ org.apache.sling.jcr.classloader, \
+ org.apache.sling.jcr.contentloader, \
+ org.apache.sling.jcr.resource, \
+ org.apache.sling.jcr.webdav, \
+ org.apache.sling.samples.path-based.rtp, \
+ org.apache.sling.scripting.api, \
+ org.apache.sling.scripting.core, \
+ org.apache.sling.scripting.java, \
+ org.apache.sling.scripting.javascript, \
+ org.apache.sling.scripting.jsp, \
+ org.apache.sling.scripting.jsp.taglib, \
+ org.apache.sling.scripting.jst, \
+ org.apache.sling.servlets.get, \
+ org.apache.sling.servlets.post, \
+ org.apache.sling.servlets.resolver, \
+ org.apache.sling.commons.scheduler, \
+ org.apache.sling.event, \
+ org.apache.sling.extensions.threaddump
+
+# commons'n'wrappers
+12 = \
+ com.day.commons.osgi.wrapper.commons-codec, \
+ com.day.commons.osgi.wrapper.commons-email, \
+ com.day.commons.osgi.wrapper.commons-httpclient, \
+ com.day.commons.osgi.wrapper.fop, \
+ com.day.commons.osgi.wrapper.mail, \
+ commons-lang, \
+ day.commons.datasource.jdbcpool, \
+ day.commons.datasource.poolservice, \
+ day-commons-diff, \
+ day-commons-durbo, \
+ day-commons-gfx, \
+ day-commons-io, \
+ day-commons-jstl, \
+ day-commons-misc, \
+ day-commons-text
+
+# Communique Platform
+13 = \
+ cq-audit, \
+ cq-chart, \
+ cq-commons, \
+ cq-cqde, \
+ cq-i18n, \
+ cq-search, \
+ com.day.cq.dam.commons.nekohtml
+
+# Communique Helper Stuff
+14 = \
+ cq-widgets, \
+ cq-rewriter, \
+ cq-mailer, \
+ cq-portlet-director, \
+ cq-security, \
+ cq-security-api, \
+ cq-tagging, \
+ cq-xssprotection, \
+ cq-replication, \
+ cq-retriever, \
+ cq-shindig
+
+# Workflow
+15 = \
+ cq-workflow-api, \
+ cq-workflow-console, \
+ cq-workflow-impl
+
+# Web Content Management
+16 = \
+ cq-wcm-api, \
+ cq-wcm-commons, \
+ cq-wcm-core, \
+ cq-wcm-docbook, \
+ cq-wcm-notification, \
+ cq-wcm-offline, \
+ cq-wcm-taglib, \
+ cq-wcm-workflow, \
+ cq-wcm-workflow-api
+
+# Geometrixx Sample Site
+17 = \
+ cq-dam-api, \
+ cq-wcm-foundation, \
+ cq-wcm-geometrixx
+
+# Collaboration
+18 = \
+ cq-blog, \
+ cq-calendar, \
+ cq-wcm-newsletter
+
+# Compatibility/Upgrade
+19 = \
+ cq-compat-core, \
+ cq-compat-migration
+
+# CRX Extensions
+20 = \
+ cq-connector, \
+ cq-statistics
+
+# Digital Asset Management
+21 = \
+ sanselan, \
+ cq-dam-core, \
+ cq-dam-handler
\ No newline at end of file
Propchange:
incubator/sling/whiteboard/fmeschbe/startlevel/src/main/resources/startlevel.properties
------------------------------------------------------------------------------
svn:eol-style = native