Author: musachy Date: Fri May 2 14:31:11 2008 New Revision: 652919 URL: http://svn.apache.org/viewvc?rev=652919&view=rev Log: Add Felix shell
Added: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/actions/ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/actions/BundlesAction.java - copied, changed from r652098, struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/BundlesAction.java struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/actions/ShellAction.java struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/ServicesFactory.java struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/shell/ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/shell/FelixShellService.java struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/shell/ShellService.java struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/commandResult.ftl struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/shell.ftl struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/static/ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/static/LICENSE struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/static/dojo.js struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/static/iframe_history.html struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/static/main.css struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/static/shell.css struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/static/shell.js Removed: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/BundlesAction.java Modified: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/pom.xml struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundle.vm struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundles.vm struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/struts.xml Modified: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/pom.xml URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/pom.xml?rev=652919&r1=652918&r2=652919&view=diff ============================================================================== --- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/pom.xml (original) +++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/pom.xml Fri May 2 14:31:11 2008 @@ -1,53 +1,55 @@ -<?xml version="1.0"?> -<project> - <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.struts2.osgi.admin</groupId> - <artifactId>admin-bundle</artifactId> - <packaging>bundle</packaging> - <name>Struts 2 OSGi Admin Bundle</name> - <version>1.0-SNAPSHOT</version> - - <dependencies> - <dependency> - <groupId>org.apache.struts</groupId> - <artifactId>struts2-osgi-plugin</artifactId> - <version>1.0-SNAPSHOT</version> - </dependency> - - - </dependencies> - <properties> - <jdkLevel>1.5</jdkLevel> - </properties> - - - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <extensions>true</extensions> - <version>1.0.0</version> - <configuration> - <instructions> - <manifestLocation>META-INF</manifestLocation> - <Export-Package>org.apache.struts2.osgi.admin*</Export-Package> - <Import-Package>*</Import-Package> - <Bundle-Activator>org.apache.struts2.osgi.admin.MyBundleActivator</Bundle-Activator> - </instructions> - </configuration> - </plugin> - </plugins> - <pluginManagement> - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - </plugins> - </pluginManagement> - </build> - </project> +<?xml version="1.0"?> +<project> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.struts2.osgi.admin</groupId> + <artifactId>admin-bundle</artifactId> + <packaging>bundle</packaging> + <name>Struts 2 OSGi Admin Bundle</name> + <version>1.0-SNAPSHOT</version> + + <dependencies> + <dependency> + <groupId>org.apache.struts</groupId> + <artifactId>struts2-osgi-plugin</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + </dependencies> + + <properties> + <jdkLevel>1.5</jdkLevel> + </properties> + + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <version>1.4.0</version> + <configuration> + <instructions> + <manifestLocation>META-INF</manifestLocation> + <Export-Package> + org.apache.struts2.osgi.admin* + </Export-Package> + <Import-Package>*,com.opensymphony.xwork2</Import-Package> + <Bundle-Activator> + org.apache.struts2.osgi.admin.MyBundleActivator + </Bundle-Activator> + </instructions> + </configuration> + </plugin> + </plugins> + <pluginManagement> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> +</project> Copied: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/actions/BundlesAction.java (from r652098, struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/BundlesAction.java) URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/actions/BundlesAction.java?p2=struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/actions/BundlesAction.java&p1=struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/BundlesAction.java&r1=652098&r2=652919&rev=652919&view=diff ============================================================================== --- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/BundlesAction.java (original) +++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/actions/BundlesAction.java Fri May 2 14:31:11 2008 @@ -1,4 +1,4 @@ -package org.apache.struts2.osgi.admin; +package org.apache.struts2.osgi.admin.actions; import org.apache.struts2.dispatcher.DefaultActionSupport; import org.apache.struts2.osgi.BundleAccessor; @@ -28,19 +28,34 @@ public String start() throws BundleException { Bundle bundle = bundleAccessor.getBundles().get(id); - bundle.start(); + try { + bundle.start(); + } catch (Exception e) { + addActionError(e.toString()); + } + return view(); } public String stop() throws BundleException { Bundle bundle = bundleAccessor.getBundles().get(id); - bundle.stop(); + try { + bundle.stop(); + } catch (Exception e) { + addActionError(e.toString()); + } + return view(); } public String update() throws BundleException { Bundle bundle = bundleAccessor.getBundles().get(id); - bundle.update(); + try { + bundle.update(); + } catch (Exception e) { + addActionError(e.toString()); + } + return view(); } Added: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/actions/ShellAction.java URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/actions/ShellAction.java?rev=652919&view=auto ============================================================================== --- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/actions/ShellAction.java (added) +++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/actions/ShellAction.java Fri May 2 14:31:11 2008 @@ -0,0 +1,58 @@ +package org.apache.struts2.osgi.admin.actions; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; + +import org.apache.struts2.osgi.BundleAccessor; +import org.apache.struts2.osgi.admin.services.ServicesFactory; +import org.apache.struts2.osgi.admin.services.shell.ShellService; +import org.osgi.framework.ServiceReference; + +import com.opensymphony.xwork2.Action; +import com.opensymphony.xwork2.ActionSupport; +import com.opensymphony.xwork2.inject.Inject; + +public class ShellAction extends ActionSupport { + private String command; + private String error; + private String output; + + public String execute() { + // get service + ByteArrayOutputStream outByteStream = new ByteArrayOutputStream(); + ByteArrayOutputStream errByteStream = new ByteArrayOutputStream(); + PrintStream outStream = new PrintStream(outByteStream); + PrintStream errStream = new PrintStream(errByteStream); + + try { + ShellService shellService = ServicesFactory.getInstance().getShellService(); + shellService.executeCommand(command, outStream, errStream); + output = outByteStream.toString(); + error = errByteStream.toString(); + } catch (Exception e) { + error = e.getMessage(); + } finally { + outStream.close(); + errStream.close(); + } + + return Action.SUCCESS; + } + + public String getCommand() { + return command; + } + + public void setCommand(String command) { + this.command = command; + } + + public String getError() { + return error; + } + + public String getOutput() { + return output; + } +} Added: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/ServicesFactory.java URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/ServicesFactory.java?rev=652919&view=auto ============================================================================== --- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/ServicesFactory.java (added) +++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/ServicesFactory.java Fri May 2 14:31:11 2008 @@ -0,0 +1,25 @@ +package org.apache.struts2.osgi.admin.services; + +import org.apache.struts2.osgi.admin.services.shell.FelixShellService; +import org.apache.struts2.osgi.admin.services.shell.ShellService; + +/** + * DI anyone? Container injection is no working in bundles + * + */ +public class ServicesFactory { + private static ServicesFactory self; + + private ServicesFactory() { + } + + public static ServicesFactory getInstance() { + if (self == null) + self = new ServicesFactory(); + return self; + } + + public ShellService getShellService() { + return new FelixShellService(); + } +} Added: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/shell/FelixShellService.java URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/shell/FelixShellService.java?rev=652919&view=auto ============================================================================== --- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/shell/FelixShellService.java (added) +++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/shell/FelixShellService.java Fri May 2 14:31:11 2008 @@ -0,0 +1,26 @@ +package org.apache.struts2.osgi.admin.services.shell; + +import java.io.PrintStream; + +import org.apache.felix.shell.ShellService; +import org.apache.struts2.osgi.DefaultBundleAccessor; +import org.osgi.framework.ServiceReference; + +public class FelixShellService implements org.apache.struts2.osgi.admin.services.shell.ShellService { + + public void executeCommand(String commandLine, PrintStream out, PrintStream err) throws Exception { + ShellService shellService = getShellService(); + if (shellService != null) + shellService.executeCommand(commandLine, out, err); + else + err.println("Shell service is installed"); + } + + private ShellService getShellService() { + //bundle can be de-activated, so keeping a reference aorund is not a good idea + DefaultBundleAccessor bundleAcessor = DefaultBundleAccessor.getInstance(); + ServiceReference ref = bundleAcessor.getServiceReference(ShellService.class.getName()); + return (ShellService) bundleAcessor.getService(ref); + } + +} Added: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/shell/ShellService.java URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/shell/ShellService.java?rev=652919&view=auto ============================================================================== --- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/shell/ShellService.java (added) +++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/java/org/apache/struts2/osgi/admin/services/shell/ShellService.java Fri May 2 14:31:11 2008 @@ -0,0 +1,11 @@ +package org.apache.struts2.osgi.admin.services.shell; + +import java.io.PrintStream; + +/** + * Facade to Felix ShellService so we are not tied to Felix + * + */ +public interface ShellService { + public void executeCommand(String commandLine, PrintStream out, PrintStream err) throws Exception; +} Added: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/commandResult.ftl URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/commandResult.ftl?rev=652919&view=auto ============================================================================== --- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/commandResult.ftl (added) +++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/commandResult.ftl Fri May 2 14:31:11 2008 @@ -0,0 +1 @@ +${output!} Added: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/shell.ftl URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/shell.ftl?rev=652919&view=auto ============================================================================== --- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/shell.ftl (added) +++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/shell.ftl Fri May 2 14:31:11 2008 @@ -0,0 +1,43 @@ +<!-- +/* + * $Id: webconsole.html 590812 2007-10-31 20:32:54Z apetrelli $ + * + * 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. + */ +--> +<html> +<head> +<link rel="stylesheet" type="text/css" href="<@s.url value="/static/shell.css" />" /> +<script src=" <@s.url value="/static/shell.js" />"></script> +<script src="<@s.url value="/static/dojo.js" />"></script> +<title>OSGi Console</title> +</head> +<body> +<div id="shell" > + <form onsubmit="return false" id="wc-form"> + <div class="wc-results" id="wc-result"> + Welcome to the OSGi console! Type help to see the list of available commands. + <br /> + :-> + </div> + <@s.url var="execUrl" namespace="/osgi/admin" action="execCommand" /> + <input name="command" onkeyup="keyEvent(event, '${execUrl}')" class="wc-command" id="wc-command" type="text" /> + </form> +</div> +</body> +</html> Modified: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundle.vm URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundle.vm?rev=652919&r1=652918&r2=652919&view=diff ============================================================================== --- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundle.vm (original) +++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundle.vm Fri May 2 14:31:11 2008 @@ -1,82 +1,93 @@ <html> + <head> + #surl ("var=mainCss" "value=/static/main.css" "includeParams=none") + <link rel="stylesheet" type="text/css" href="$mainCss" /> + </head> <body> -<table> - <tr> - <th>Id</th> - <td>$bundle.bundleId</td> - </tr> - <tr> - <th>Name</th> - <td>$bundle.symbolicName</td> - </tr> - <tr> - <th>Location</th> - <td>$bundle.location</td> - </tr> - <tr> - <th>State</th> - <td>$action.getBundleState($bundle)</td> - </tr> - <tr> - <th>Registered Services</th> - <td> - <ul> + +<div class="right"> + #surl ("var=bundlesUrl" "nampespace=/osgi/admin" "action=bundles" "includeParams=none") + <a href="$bundlesUrl">Installed Bundles</a> +</div> + +#sactionerror () + +<table class="bundleDetails" style="clear:both"> + <tr class="detailRow"> + <td class="rowTitle">Id</td> + <td class="rowValue">$bundle.bundleId</td> + </tr> + <tr class="detailRow"> + <td class="rowTitle">Name</td> + <td class="rowValue">$bundle.symbolicName</td> + </tr> + <tr class="detailRow"> + <td class="rowTitle">Location</td> + <td class="rowValue">$bundle.location</td> + </tr> + <tr class="detailRow"> + <td class="rowTitle">State</td> + <td class="rowValue">$action.getBundleState($bundle)</td> + </tr> + <tr class="detailRow"> + <td class="rowTitle">Registered Services</td> + <td class="rowValue"> #foreach ($service in $bundle.registeredServices) - <li> + <table class="properties"> #foreach ($key in $service.propertyKeys) - $key = $action.displayProperty($service.getProperty($key)) <br /> - #end - #if ($service.usingBundles.length > 0) - Used by: - <ul> - #foreach ($user in $service.usingBundles) - <li>$user.symbolicName</li> - #end - </ul> + <tr> + <td class="name">$key</td> + <td>$action.displayProperty($service.getProperty($key))</td> + </tr> #end - </li> + </table> + <br/> #end - </ul> </td> </tr> - <tr> - <th>Services in Use</th> - <td> - <ul> + <tr class="detailRow"> + <td class="rowTitle">Services in Use</td> + <td class="rowValue"> #foreach ($service in $bundle.servicesInUse) - <li> + <table class="properties"> #foreach ($key in $service.propertyKeys) - $key = $action.displayProperty($service.getProperty($key)) <br /> + <tr> + <td class="name">$key</td> + <td>$action.displayProperty($service.getProperty($key))</td> + </tr> #end - #if ($service.usingBundles.length > 0) - Also used by: - <ul> - #foreach ($user in $service.usingBundles) - <li>$user.symbolicName</li> - #end - </ul> - #end - </li> + </table> + <br/> #end - </ul> </td> </tr> - <tr> - <th>Packages</th> - <td> + <tr class="detailRow"> + <td class="rowTitle">Packages</td> + <td class="rowValue"> #foreach ($pkg in $packages) - <strong>$pkg.name</strong> - <ul> - #foreach ($name in $pkg.actionConfigs.keySet()) - <li>$name</li> - #end - </ul> + <table class="properties"> + <tr> + <td class="name">Name</td> + <td>$pkg.name</td> + </tr> + <tr> + <td class="name">Actions</td> + <td> + <ul> + #foreach ($name in $pkg.actionConfigs.keySet()) + <li>$name</li> + #end + </ul> + </td> + </tr> + </table> + <br/> #end </td> </tr> - <tr> - <th>Actions</th> - <td> + <tr class="detailRow"> + <td class="rowTitle">Actions</td> + <td class="rowValue"> #if ($action.isAllowedAction($bundle, "start")) <a href="bundle_${bundle.symbolicName}!start.action">Start</a> #end @@ -84,13 +95,12 @@ #if ($action.isAllowedAction($bundle, "stop")) <a href="bundle_${bundle.symbolicName}!stop.action">Stop</a> #end - + #if ($action.isAllowedAction($bundle, "update")) <a href="bundle_${bundle.symbolicName}!update.action">Update</a> #end </td> </tr> - </table> </body> </html> \ No newline at end of file Modified: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundles.vm URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundles.vm?rev=652919&r1=652918&r2=652919&view=diff ============================================================================== --- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundles.vm (original) +++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/osgi/admin/viewBundles.vm Fri May 2 14:31:11 2008 @@ -1,10 +1,12 @@ <html> <head> <title>OSGi Bundles</title> + #surl ("var=mainCss" "value=/static/main.css" "includeParams=none") + <link rel="stylesheet" type="text/css" href="$mainCss" /> </head> <body> -<table> +<table class="properties"> <thead> <tr> <th>Name</th> @@ -27,7 +29,7 @@ #if ($action.isAllowedAction($bundle, "stop")) <a href="bundle_${bundle.symbolicName}!stop.action">Stop</a> #end - + #if ($action.isAllowedAction($bundle, "update")) <a href="bundle_${bundle.symbolicName}!update.action">Update</a> #end Added: struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/static/LICENSE URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/static/LICENSE?rev=652919&view=auto ============================================================================== --- struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/static/LICENSE (added) +++ struts/sandbox/trunk/struts2-osgi-plugin/admin-bundle/src/main/resources/static/LICENSE Fri May 2 14:31:11 2008 @@ -0,0 +1,195 @@ +Dojo is availble under *either* the terms of the modified BSD license *or* the +Academic Free License version 2.1. As a recipient of Dojo, you may choose which +license to receive this code under (except as noted in per-module LICENSE +files). Some modules may not be the copyright of the Dojo Foundation. These +modules contain explicit declarations of copyright in both the LICENSE files in +the directories in which they reside and in the code itself. No external +contributions are allowed under licenses which are fundamentally incompatible +with the AFL or BSD licenses that Dojo is distributed under. + +The text of the AFL and BSD licenses is reproduced below. + +------------------------------------------------------------------------------- +The "New" BSD License: +********************** + +Copyright (c) 2005-2006, The Dojo Foundation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the Dojo Foundation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------- +The Academic Free License, v. 2.1: +********************************** + +This Academic Free License (the "License") applies to any original work of +authorship (the "Original Work") whose owner (the "Licensor") has placed the +following notice immediately following the copyright notice for the Original +Work: + +Licensed under the Academic Free License version 2.1 + +1) Grant of Copyright License. Licensor hereby grants You a world-wide, +royalty-free, non-exclusive, perpetual, sublicenseable license to do the +following: + +a) to reproduce the Original Work in copies; + +b) to prepare derivative works ("Derivative Works") based upon the Original +Work; + +c) to distribute copies of the Original Work and Derivative Works to the +public; + +d) to perform the Original Work publicly; and + +e) to display the Original Work publicly. + +2) Grant of Patent License. Licensor hereby grants You a world-wide, +royalty-free, non-exclusive, perpetual, sublicenseable license, under patent +claims owned or controlled by the Licensor that are embodied in the Original +Work as furnished by the Licensor, to make, use, sell and offer for sale the +Original Work and Derivative Works. + +3) Grant of Source Code License. The term "Source Code" means the preferred +form of the Original Work for making modifications to it and all available +documentation describing how to modify the Original Work. Licensor hereby +agrees to provide a machine-readable copy of the Source Code of the Original +Work along with each copy of the Original Work that Licensor distributes. +Licensor reserves the right to satisfy this obligation by placing a +machine-readable copy of the Source Code in an information repository +reasonably calculated to permit inexpensive and convenient access by You for as +long as Licensor continues to distribute the Original Work, and by publishing +the address of that information repository in a notice immediately following +the copyright notice that applies to the Original Work. + +4) Exclusions From License Grant. Neither the names of Licensor, nor the names +of any contributors to the Original Work, nor any of their trademarks or +service marks, may be used to endorse or promote products derived from this +Original Work without express prior written permission of the Licensor. Nothing +in this License shall be deemed to grant any rights to trademarks, copyrights, +patents, trade secrets or any other intellectual property of Licensor except as +expressly stated herein. No patent license is granted to make, use, sell or +offer to sell embodiments of any patent claims other than the licensed claims +defined in Section 2. No right is granted to the trademarks of Licensor even if +such marks are included in the Original Work. Nothing in this License shall be +interpreted to prohibit Licensor from licensing under different terms from this +License any Original Work that Licensor otherwise would have a right to +license. + +5) This section intentionally omitted. + +6) Attribution Rights. You must retain, in the Source Code of any Derivative +Works that You create, all copyright, patent or trademark notices from the +Source Code of the Original Work, as well as any notices of licensing and any +descriptive text identified therein as an "Attribution Notice." You must cause +the Source Code for any Derivative Works that You create to carry a prominent +Attribution Notice reasonably calculated to inform recipients that You have +modified the Original Work. + +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that +the copyright in and to the Original Work and the patent rights granted herein +by Licensor are owned by the Licensor or are sublicensed to You under the terms +of this License with the permission of the contributor(s) of those copyrights +and patent rights. Except as expressly stated in the immediately proceeding +sentence, the Original Work is provided under this License on an "AS IS" BASIS +and WITHOUT WARRANTY, either express or implied, including, without limitation, +the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. +This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No +license to Original Work is granted hereunder except under this disclaimer. + +8) Limitation of Liability. Under no circumstances and under no legal theory, +whether in tort (including negligence), contract, or otherwise, shall the +Licensor be liable to any person for any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License +or the use of the Original Work including, without limitation, damages for loss +of goodwill, work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses. This limitation of liability shall not +apply to liability for death or personal injury resulting from Licensor's +negligence to the extent applicable law prohibits such limitation. Some +jurisdictions do not allow the exclusion or limitation of incidental or +consequential damages, so this exclusion and limitation may not apply to You. + +9) Acceptance and Termination. If You distribute copies of the Original Work or +a Derivative Work, You must make a reasonable effort under the circumstances to +obtain the express assent of recipients to the terms of this License. Nothing +else but this License (or another written agreement between Licensor and You) +grants You permission to create Derivative Works based upon the Original Work +or to exercise any of the rights granted in Section 1 herein, and any attempt +to do so except under the terms of this License (or another written agreement +between Licensor and You) is expressly prohibited by U.S. copyright law, the +equivalent laws of other countries, and by international treaty. Therefore, by +exercising any of the rights granted to You in Section 1 herein, You indicate +Your acceptance of this License and all of its terms and conditions. + +10) Termination for Patent Action. This License shall terminate automatically +and You may no longer exercise any of the rights granted to You by this License +as of the date You commence an action, including a cross-claim or counterclaim, +against Licensor or any licensee alleging that the Original Work infringes a +patent. This termination provision shall not apply for an action alleging +patent infringement by combinations of the Original Work with other software or +hardware. + +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this +License may be brought only in the courts of a jurisdiction wherein the +Licensor resides or in which Licensor conducts its primary business, and under +the laws of that jurisdiction excluding its conflict-of-law provisions. The +application of the United Nations Convention on Contracts for the International +Sale of Goods is expressly excluded. Any use of the Original Work outside the +scope of this License or after its termination shall be subject to the +requirements and penalties of the U.S. Copyright Act, 17 U.S.C. ç 101 et +seq., the equivalent laws of other countries, and international treaty. This +section shall survive the termination of this License. + +12) Attorneys Fees. In any action to enforce the terms of this License or +seeking damages relating thereto, the prevailing party shall be entitled to +recover its costs and expenses, including, without limitation, reasonable +attorneys' fees and costs incurred in connection with such action, including +any appeal of such action. This section shall survive the termination of this +License. + +13) Miscellaneous. This License represents the complete agreement concerning +the subject matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent necessary to +make it enforceable. + +14) Definition of "You" in This License. "You" throughout this License, whether +in upper or lower case, means an individual or a legal entity exercising rights +under, and complying with all of the terms of, this License. For legal +entities, "You" includes any entity that controls, is controlled by, or is +under common control with you. For 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. + +15) Right to Use. You may use the Original Work in all ways not otherwise +restricted or conditioned by this License or by law, and Licensor promises not +to interfere with or be responsible for such uses by You. + +This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. +Permission is hereby granted to copy and distribute this license without +modification. This license may not be modified without the express written +permission of its copyright owner.