Remoing trunk dir
git-svn-id: https://svn.apache.org/repos/asf/lenya/tags/RELEASE_2_0_RC_4@603226 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/trunk/CREDITS.txt b/trunk/CREDITS.txt
deleted file mode 100644
index 26f85d8..0000000
--- a/trunk/CREDITS.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-
- C R E D I T S
-
-This is the file where major donations to the Lenya project are listed and it
-should be used to give appropriate visibility to those inviduals, organizations
-or companies that donated resources to the effort. This file wants to be one of
-the ways the Lenya community pays back.
-
-
- Community Credits
- =================
-
- Active Committers:
- ------------------
-
-* Doug Chestnut
-* Edith Chevrier
-* Dale Christ
-* Christian Egli
-* Jann Forrer
-* Antonio Gallardo
-* Andreas Hartmann Andreas runs the cocooncenter.org site.
-* Andreas Kuckartz Tester, Bugzilla reporter
-* Rolf Kulemann
-* Gregor J. Rothfuss
-* Thorsten Scherler
-* Torsten Schlabach
-* J. Wolfgang Kaltz
-* Michael Wechner
-
- Inactive Committers:
- --------------------
-
-* Juergen Bigalke wrote some creators.
-* Memo Birgi
-* Marc Liyanage wrote the first Lenya build system way back.
-* Felix Maeder
-* Rene Niedermowe
-* Giacomo Pati helped to port the predecessor of Lenya to Cocoon.
-
- Other Contributors:
- -------------------
-
-* Lon Boonen Lon is the original creator of Xopus and helped a
- lot to integrate it into Lenya. Recently he
- rewrote the JavaScript of the Lenya menubar.
-* Jose Chaso Spanish translation.
-* Paul Ercolino (solprovider) Refactored search, various small fixes
-* Stephen England Design of the Lenya logo, design of the Lenya UI.
-* Jorge Gutierrez Spanish translation.
-* Martin Hitz
-* Margrit John
-* Olivier Lange French translation.
-* Jean Pierre LeJacq Build system improvements.
-* Martin Lüthi Mail class.
-* Christian Stocker Christian is the original creator of the
- Bitflux Editor and helped a lot to integrate
- it into Lenya.
-* Urs Stöckli
-* Giampaolo Trapasso Italian translation, entertainer on #lenya
-* Markus Vaterlaus
-* Kars Veiling
-* Marc von Wattenwyl
-* Thomas Werschlein
-
-
- The Apache Lenya Community
- http://lenya.apache.org
diff --git a/trunk/INSTALL-BIN.txt b/trunk/INSTALL-BIN.txt
deleted file mode 100644
index bd49069..0000000
--- a/trunk/INSTALL-BIN.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-There is no binary release of Lenya 2.0 at this point.
-We recommend checking out the SVN repository instead (see INSTALL-SRC.txt).
diff --git a/trunk/INSTALL-SRC.txt b/trunk/INSTALL-SRC.txt
deleted file mode 100644
index 41bc75e..0000000
--- a/trunk/INSTALL-SRC.txt
+++ /dev/null
@@ -1,190 +0,0 @@
-# FIXME: this file duplicates the contents of
-# docu/src/documentation/content/xdocs/docs/2_0_x/installation/ (which is
-# currently out of date)
-# It would make a lot of sense to only maintain the xdocs and generate this
-# file with an xslt.
-
-Installation of the Source Version
-
- * Prerequisites
- * Standalone Installation (using the built-in Jetty)
- * Installation with Apache Tomcat
- * Security considerations
-
-Prerequisites
-
-
- The following list describes the setup that is tested and recommended.
- Please note that you can use other servlet containers as well, but Jetty and Tomcat are the tested ones.
-
-
- * Java 2 Platform, Standard Edition
- Recommended version: JDK 1.5 (used by most developers). Java 1.4.2 or later should also
- work, and people are using Java 1.6 successfully in day-to-day operation.
- Get the JDK at http://java.sun.com/javase/downloads/index_jdk5.jsp.
-
- WARNING: There have been numerous reports of spurious VM crashes with Java versions from
- 1.5.0-07 to 1.5.0-11 both on Windows and Linux. Make sure you are using the latest available Java
- 5 package for your operating system (-13 as of this writing).
- If you encounter such crashes with more current revisions, please re-open
- http://issues.apache.org/bugzilla/show_bug.cgi?id=42493 .
-
- * Apache Cocoon
- Recommended version: BRANCH_2_1_X (https://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X)
- When you check out the latest Lenya source from svn, Cocoon will be included as an svn external
- and you don't need to download it separately.
- Note that Cocoon is needed when building the source version of Lenya, but the
- resulting Lenya webapp is completely self contained and therefore it does not need
- the Cocoon webapp to be installed. See the FAQ for details of configuration changes
- required when running multiple Cocoon based applications.
-
- * A SVN client
- SVN (or subversion) is a software revision control system that is used by the Lenya community to
- manage the development tree. You will need to install a client in order to check out your local
- copy of Lenya.
- All Linux distributions come with svn (or subversion) packages. Under Windows, you can either use
- TortoiseSVN (see http://tortoisesvn.tigris.org) or the svn package included in Cygwin (http://cygwin.com).
-
- * (optional) Apache Tomcat for JDK 1.5, version: 5.5.20 or later (earlier versions may work as well,
- but they are not tested).
- Get the source at http://jakarta.apache.org/site/binindex.cgi
- Note that Lenya ships with Jetty and therefore does not need a servlet container to be installed.
-
-
-
-Standalone Installation (using the built-in Jetty)
-
-
- This is the recommended mode of installation that is used by most developers.
-
- 1. Get the Java SDK (see Prerequisites): e.g. J2SDK_1.5.0-11
- and set JAVA_HOME
- (Windows: start -> Control Panel -> System -> Advanced -> Environment Variables -> User variables
- ...)
-
- 2. Check out Apache Lenya from SVN:
- Change into the directory where you want your Lenya sources to be, and do
-
- svn checkout http://svn.apache.org/repos/asf/lenya/trunk lenya-2.0.x
-
- 3. Configure Lenya:
-
- In the newly created lenya-2.0.x directory, copy build.properties to local.build.properties
- and edit it to taste or use the configure script:
-
- * Linux: configure.sh (works also on Windows with Cygwin)
- * Windows: configure.bat
-
-
- 4. Build Lenya:
-
- Make sure that you have the environment variable JAVA_HOME defined to point
- to the location of the Java SDK you installed (see Prerequisites).
-
- MS Windows: http://support.microsoft.com/default.aspx?scid=kb;en-us;310519&sd=tech
- Linux/Unix: export JAVA_HOME=/usr/local/jdk-1.5.0 (or wherever your JDK is)
-
- Start the build process:
-
- * Linux: ./build.sh (works also on Windows with Cygwin)
- * Windows: build.bat
-
- 5. Start Lenya:
-
- * Linux: ./lenya.sh
- * Windows: lenya.bat
-
- 6. Test the installation by pointing your browser to
- http://localhost:8888/
-
-
-
-Installation with Apache Tomcat
-
-
- Watch out: Tomcat integration has not been tested much yet. You are welcome
- to direct questions at or point out problems to the lenya developer mailing
- list.
-
- Installing Lenya with Tomcat is similar to stand-alone mode. Follow Steps 1-3
- above, then do the steps below.
-
- 1. Get Apache Tomcat (see Prerequisites)
-
- 2. Install Apache Tomcat as per the Tomcat docs.
-
- Important: Make sure you do not install at a location with spaces in the path, such as
- C:\Tomcat Webapps\Lenya - some components in Lenya/Cocoon don't play well with such paths.
-
- 3. Configure Lenya for Tomcat
-
- Edit local.build.properties. For the described configuration the following settings
- will work (MS Windows: Don't use backslashes "\" for directory separation.) It is
- important that tomcat.home.dir is an absolute path. Replace $TOMCAT_HOME by your Tomcat
- installation directory. If your Cocoon source directory is not at ../cocoon
- relative to Lenya, then change the cocoon.webapp.dir and cocoon.src.dir properties.
- * cocoon.src.dir=$COCOON_HOME
- * tomcat.home.dir=$TOMCAT_HOME
-
- 4. Build Lenya (see "Standalone Installation" above)
-
- 5. Check versions of endorsed libraries
-
- Lenya and Tomcat will inter-operate correctly only if the proper versions of the Xalan
- and Xerces libraries are used consistently throughout the deployment. Unfortunately
- this can be difficult to get to work correctly since both of these libraries are shipped
- with Java 2 SDK, Tomcat, Cocoon and Lenya.
-
- The following libraries must be placed in the endorsed library directory for your deployment.
- * xalan-2.7.0.jar
- * xalan-2.7.0-serializer.jar
- * xerces-2.9.0-xercesImpl.jar
- * xerces-2.9.0-xml-apis.jar
-
- They are placed by the build process in the directory specified by tomcat.endorsed.dir in
- build.properties. You should validate that these files are indeed in the proper location
- for your deployment. You must then validate that no other instances of these libraries
- exist in any of the following directories:
- * The Java 2 SDK endorsed standards directories. This is usually ${JAVA_HOME}/lib/endorsed/.
- * Any other location in your Tomcat deployment. Specifically, check shared/lib/, common/lib/ and server/lib/.
- * Any other location in your Lenya deployment. Specifically, check webapps/lenya/WEB-INF/lib/.
-
- A common symptom of incorrect library version are blank pages after starting Lenya.
- Try carefully checking the location and version numbers of each of the libraries.
-
- References:
- * Tomcat Class Loader HOWTO
- (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html)
- * Java 2 Endorsed Standards Override Mechanism
- (http://java.sun.com/j2se/1.4.2/docs/guide/standards/index.html)
-
- 6. Restart Tomcat
-
- 7. Test the installation by pointing your browser to
- http://localhost:8080/lenya/
-
-
-Security Considerations
-
- It is advisable to run Lenya's servlet container with limited privileges,
- to reduce the impact of a possible exploit.
- You might want to create a user "lenya" with default group "lenya" for
- this, change the rights of the build/ tree accordingly, and start the
- server as that user.
-
- Additionally, you might want to consider tightening the write privileges
- of the servlet container. At run-time, it only needs write access to
- WEB-INF/* and the publication's content and access-control store.
- While not strictly necessary, disallowing write access to other parts
- makes it harder for an attacker to manipulate the system.
- FIXME: this needs more detailed documentation.
-
-
-Performing automated tests
-
- If you are hacking Lenya (or you have healthy paranoia levels), you might want to run automated unit
- and web tests on your Lenya checkout, especially after modifications.
- In the lenya-2.0.x directory, do
- ./build.sh test (to run the junit tests, requires a successful build), and
- ./build.sh modules.test.canoo (to run the canoo web tests, requires a running servlet engine).
-
\ No newline at end of file
diff --git a/trunk/KEYS b/trunk/KEYS
deleted file mode 100644
index c8d8936..0000000
--- a/trunk/KEYS
+++ /dev/null
@@ -1,77 +0,0 @@
-(instructions copied from cocoons's KEYS file)
-
-This file contains the PGP keys of various developers.
-Please don't use them for email unless you have to. Their main
-purpose is code signing.
-
-Users: pgp < KEYS
-Developers:
- pgp -kxa <your name> and append it to this file.
- (pgpk -ll <your name> && pgpk -xa <your name>) >> this file.
- (gpg --list-sigs <your name>
- && gpg --armor --export <your name>) >> this file.
-
-pub 1024D/08586F81 2004-12-29 Rolf Kulemann (Commiter of the Apache Software Foundation) <roku@apache.org>
-sig 3 08586F81 2004-12-29 Rolf Kulemann (Commiter of the Apache Software Foundation) <roku@apache.org>
-sub 2048g/A57AD592 2004-12-29
-sig 08586F81 2004-12-29 Rolf Kulemann (Commiter of the Apache Software Foundation) <roku@apache.org>
-
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.2.4 (GNU/Linux)
-
-mQGiBEHTMc8RBACrsQmDSKRahyGhnb2744to8ejgPpNSnZ2Zxr4D7YFG3h5YfbXJ
-GOGbtqelSCHUUhUxmOUOUmaiuhSN0l3a1D+zgiesuZxQyCVUVuKPqKkmxm3+q5Ir
-dg6/BXTVQJ+oLJNa4/k/P3V4uncq67NXvweJSzsm15Z9b92K0uFne+m8FwCgp85g
-Lhq+KSHxWTbeZfkUOhhTm7UD/3bcXgOs2NWmqvoOjNVvGu1Fp8mUvpDt5k4mXLqc
-SxAWHm84Mb4K4jrutoc+zWUvXI+ZtoElYGBm3VPBmqSxMgtUrnlPPpQCqZ6w2dU9
-TgJRzJgzwqJFwT++ivPMIokwL5ORn9oKMZUjNjjwCDGFuhUGNTZ2hwiF8568CPs2
-VDIQA/9vQlH5qyJrS9iHvpWKSkE2IdLf1KzpiLx/wiMdRU3UPRN4+ZlObfYwOOdp
-HG0/1njFqueQT4N38DsIzbkXrPd9QPYFiVgbH7dfXKMl3Ddc/5WibfvAWABC6p2u
-Jm6/NANTG9/3aHzg2BsYi+LYgbKJP9+DBIurM511PnIhlW46zLRMUm9sZiBLdWxl
-bWFubiAoQ29tbWl0ZXIgb2YgdGhlIEFwYWNoZSBTb2Z0d2FyZSBGb3VuZGF0aW9u
-KSA8cm9rdUBhcGFjaGUub3JnPoheBBMRAgAeBQJB0zHPAhsDBgsJCAcDAgMVAgMD
-FgIBAh4BAheAAAoJEAFpbawIWG+BG7gAoJ5fRwMJ3uH4458Plut5lmKu3bggAKCf
-TAn5L3xkjOuIeLjsHM3eI8nYJbkCDQRB0zHgEAgArsy9ADrDmueVAPyYBCDwR2nL
-IekaRRngrocjPPiy4dbEAywkw9A0ixpWKOsTeWHu8/+fKu7+gbInwH3YPLvpJ2+N
-3sHdNpGlGYEV2v50EoJnjeRzRi9HZzPlMtyde/x6Buedz/UtuA3P3IRxSH64OzJE
-DQmMEETkgbIC+//OiNBlxZNzXDhwxoCXjZMTAiXoGITPg6PvDfzgFITWnu6kbLy0
-37aaWAlOS1OLCP9emhDC6I6fE+JaHJyfXfNYlNIy3IMEHVJPsn9uMPcI2jsfiaF2
-HcHJXWFxwWXLHAwRIxXyKPDuKpY6eWU2SIXMNRPsYBiEdgjn8hBWwwFAfT8P0wAD
-Bgf9HSwOjl6MIEpM//JPRV4WMWje7orme+uNVIv5PUmtEev2VE8nSJE5zjgcTYjs
-scSqRFKxHojCDEMbN7GtIXF+AUgoB8BNYT0x0fGf2uohWSteKjGLV23AYG1T+ENr
-v/VqEEP0KnRSwi214rKOsl9msvUtKsX3VqnFiWfSsfv7Azntv1gnHIAIEtlL2Av+
-5aIlbDQ85MGQITOMDO8jGFb+IT/8uf6JnyyxzQzxnKlpp19kew6jnrCCTorral8r
-e7RV4b+KAkHU19YsJWyb+9boCyzA/sgZpjEA9BTAxQOG/TgnR3nqeLyC6mpCVczZ
-JQ7nBdkp2cPEyuTJoE7g1JIhKohJBBgRAgAJBQJB0zHgAhsMAAoJEAFpbawIWG+B
-cMIAmwYpKy/m/LVY7OVZFg7ZoxUU0M14AJ9KrFhoLUbekdKWVY6YNMKarO055w==
-=ndjW
------END PGP PUBLIC KEY BLOCK-----
- pub 1024D/6A6DC9F7 2005-05-01 Gregor J. Rothfuss <gregor@apache.org>
-sig 3 6A6DC9F7 2005-05-01 Gregor J. Rothfuss <gregor@apache.org>
-sub 1024g/E245A2B0 2005-05-01
-sig 6A6DC9F7 2005-05-01 Gregor J. Rothfuss <gregor@apache.org>
-
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.2.3-nr1 (Windows XP)
-
-mQGiBEJ1SoQRBAC99TailoMLV0eeOkkt+j2qcSiMIFkHdjvh4HoqR6IFwU25gBTB
-0kc6oqx6DzeHI+k8OYh0oG6d7N82kgeGAYsxtYfSrHGqWTr7zz/YjY1N/0xHS+iW
-AEprN7s8Zf3kKQH53bKS6OOVMfdjTkrjwTOw9z0EE6aWzV0y9SIyj3QiKwCgm1dt
-Z1EdHHWGQ0D/iOuPJy4ejCkD/3MLJqjBicx5Lbhm444C28Na7G4QMq84QqhC+qNf
-VY2NcnuMxni7AbcrbGxB5Cvo8untgt/flTvMmK+o0oYZ/zuvvK4sJ5uXDawWnFLH
-nFcvRyLdzHglKeqpEh4LirxR0noiZyrBy0JiHg9NeB/UviFD3bMPRHZorYNoeACK
-WrAHA/wNoH8w/lyYjycVJXgYCW1a4KXpkYqPBpJKKjqPvg9djuWNOaAmWoHcKBI3
-dxyySihi5nQ7ZsZhPXA1Qs/Mp8FeF7xXvr9c2j+r5LWDm4fy3kIpUEcQt3DPubpm
-N+jsb7q3zYcx9jDE5/gE3G4oiS2WqzZ/5+KVrU8dycxAO2tVmbQmR3JlZ29yIEou
-IFJvdGhmdXNzIDxncmVnb3JAYXBhY2hlLm9yZz6IXwQTEQIAHwUCQnVKhAIbAwcL
-CQgHAwIBAxUCAwMWAgECHgECF4AACgkQ8XfjPGptyfe1UwCfaZ8d+pVjgb2yMMa/
-q9+HYzsF9KIAnicPkeNbup0JWZ/Ax5ejNS/1s1GAuQENBEJ1SocQBACN+vU6lOYw
-TB+4s/7xdzSmGWoLv5ZNUNUrXVUwNYAdSCpwfIUcCOkE7mD2QCY7lkeukyYUzy6n
-y7C2zYCIxcf5B12mEX82jUcvHyezgCLziTCKKKnO6kfn5rG18MaPwqNEpyI+PG+h
-FFXGO42+aansVLIMpvHxwkVF0V/fqDtmEwADBQP/cFz7JuuEu0KgAxv8Q2oGsfbm
-qZzrPErChls7mSYBN2n7fWiqb1qcm2rfGq7vUtWGM+I26p+UKZhcF/AnDbfp9lT9
-xdp3rSg3t64//i8VbOv3Y5DCFbcfSVjRCvLzFMnQIT0NwLxkhGh8ugrharCVKgr2
-dEmRNV5jP7dHEpQx356ISQQYEQIACQUCQnVKhwIbDAAKCRDxd+M8am3J97oCAJ0d
-IfihpLACvSdSiT2fCm5UEFrI3ACfXOPMYHCtG4wDI7hrpjFcIjuTzEo=
-=C9sc
------END PGP PUBLIC KEY BLOCK-----
diff --git a/trunk/LICENSE.txt b/trunk/LICENSE.txt
deleted file mode 100644
index 261eeb9..0000000
--- a/trunk/LICENSE.txt
+++ /dev/null
@@ -1,201 +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/trunk/NOTICE.txt b/trunk/NOTICE.txt
deleted file mode 100644
index dc7fb79..0000000
--- a/trunk/NOTICE.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-Apache Lenya
-Copyright 1999-2006 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-This product includes software developed by the DOM4J Project
-(http://www.dom4j.org/).
-
-This product includes software developed by the XML:DB Initiative
-(http://www.xmldb.org/).
-
-This product includes software developed by the BXE Project
-(http://bxe.oscom.org/).
-
-This product includes software developed by the Kupu Project
-(http://kupu.oscom.org/).
-
-Portions are Copyright (c) 1998-2000 World Wide Web Consortium
-(Massachusetts Institute of Technology, Institut National de Recherche en
-Informatique et en Automatique, Keio University). All Rights Reserved.
-
-Portions are Copyright (c) 2001, 2002 Thai Open Source Software Center Ltd.
-All rights reserved.
diff --git a/trunk/README.txt b/trunk/README.txt
deleted file mode 100644
index 65ea2f7..0000000
--- a/trunk/README.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-
- A P A C H E L E N Y A
-
- About Apache Lenya
- ------------------
-
- Apache Lenya is a Java-based Open-Source Content Management System.
- It is based on open standards such as XML and XSLT. One of its core
- components is Cocoon from the Apache Software Foundation.
-
- Apache Lenya supports inline WYSIWYG editors. Your site editors do not
- have to learn XML. This is possible thanks to the support of XML,
- XSLT and XML Schema on the client side. An administration interface
- allows advanced users to monitor the CMS, and perform configuration
- tasks.
-
-
- Installation Instructions and Documentation
- -------------------------------------------
-
- For the binary distribution read INSTALL-BIN.txt.
-
- For the source distribution read INSTALL-SRC.txt.
-
- The documentation available as of the date of this release is included
- in this directory.
-
- If you are updating from a previous release of Lenya, make sure
- that you read the installation instructions on updating first.
-
- Look for the most updated documentation on the Apache Lenya web site
- (http://lenya.apache.org/).
-
-
-
- Licensing and legal issues
- --------------------------
-
- Apache Lenya is licensed under the Apache Software License, a license of the BSD
- family, and contains software which is compatible with the BSD licensing
- style.
-
- For more information, please read the LICENSE files in the /legal directory.
-
-
-
- Credits
- -------
-
- For more information on credits and due reference to included software,
- please read the CREDITS.txt file in this directory.
-
-
- Known issues
- ------------
-
- The Apache issue tracker is available at
- http://issues.apache.org/bugzilla/ .
-
-
-
- Thanks for your interest in Apache Lenya.
-
-
-
- The Apache Lenya Project
- http://lenya.apache.org/
diff --git a/trunk/build.bat b/trunk/build.bat
deleted file mode 100644
index 4f1373c..0000000
--- a/trunk/build.bat
+++ /dev/null
@@ -1,45 +0,0 @@
-@echo off
-rem Licensed to the Apache Software Foundation (ASF) under one or more
-rem contributor license agreements. See the NOTICE file distributed with
-rem this work for additional information regarding copyright ownership.
-rem The ASF licenses this file to You under the Apache License, Version 2.0
-rem (the "License"); you may not use this file except in compliance with
-rem the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
-rem
-rem ----------------------------------------------------------------------------
-rem build.bat - Win32 Build Script for Apache Lenya
-rem
-rem $Id: build.bat 54525 2004-10-11 09:39:04Z cziegeler $
-rem ----------------------------------------------------------------------------
-
-
-set COCOON_HOME=externals\cocoon_2_1_x
-set COCOON_ENDORSED_DIR=%COCOON_HOME%\lib\endorsed
-
-rem ----- Ignore system CLASSPATH variable
-set OLD_CLASSPATH=%CLASSPATH%
-set CLASSPATH=
-for %%i in (lib\*.jar) do call tools\bin\appendcp.bat %%i
-for %%i in (%COCOON_ENDORSED_DIR%\*.jar) do call tools\bin\appendcp.bat %%i
-
-rem ----- Use Ant shipped with Cocoon. Ignore installed in the system Ant
-set OLD_ANT_HOME=%ANT_HOME%
-set ANT_HOME=tools
-
-call %ANT_HOME%\bin\ant -Djava.endorsed.dirs=%COCOON_ENDORSED_DIR% -logger org.apache.tools.ant.NoBannerLogger -emacs %1 %2 %3 %4 %5 %6 %7 %8 %9
-
-rem ----- Restore ANT_HOME and ANT_OPTS
-set ANT_HOME=%OLD_ANT_HOME%
-set OLD_ANT_HOME=
-
-rem ----- Restore CLASSPATH
-set CLASSPATH=%OLD_CLASSPATH%
-set OLD_CLASSPATH=
diff --git a/trunk/build.properties b/trunk/build.properties
deleted file mode 100644
index fc05ab5..0000000
--- a/trunk/build.properties
+++ /dev/null
@@ -1,194 +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.
-#------------------------------------------------------------------------------------
-
-
-# Properties controlling the build process
-
-# NOTE:
-# Don't modify this file directly but create a file named
-# 'local.build.properties' and implement ONLY
-# the properties you need.
-
-# You do NOT have to copy the whole 'build.properties' file.
-
-# The build system will first read all properties defined
-# in the 'local.build.properties' file and then will read out the
-# ones in 'build.properties'. Ant will use the first found.
-# You can as well execute ./configure.sh (Linux) or configure (Windows)
-# to generate the 'local.build.properties'.
-
-#------------------------------------------------------------------------------------
-# Build properties version to make sure that local.build.properties is kept in sync
-# NOTE: Do NOT modify this number unless you are a Dev and want to modify this file
-# NOTE for Devs: Update this number if this file is being updated.
-# Also update the version number within src/targets/properties-build.xml
-
-build.properties.version=594644
-
-#------------------------------------------------------------------------------------
-# The root of the Cocoon source tree
-
-cocoon.src.dir=externals/cocoon_2_1_x
-#cocoon.src.dir=../../cocoon/branches/BRANCH_2_1_X
-
-
-#------------------------------------------------------------------------------------
-# The cocoon webapp directory
-# You do not have to change this since Lenya will build Cocoon for you
-
-cocoon.webapp.dir=${cocoon.src.dir}/build/webapp
-
-
-#------------------------------------------------------------------------------------
-# Root directories where publications are located
-
-pubs.root.dirs=src/pubs
-#pubs.root.dirs=src/pubs:../anotherproject/pubs:/home/user/my-pub
-
-
-#------------------------------------------------------------------------------------
-# Root directories where modules are located
-modules.root.dirs=src/modules:src/modules-core:src/pubs/default/modules
-#modules.root.dirs=src/modules:src/pubs/default/modules:src/modules-optional
-
-# copy modules to the web application?
-modules.copy=true
-
-#------------------------------------------------------------------------------------
-# Web Application Server
-# NOTE: There are slight differences re deployment on the various servlet containers, e.g. endorsed libraries ...
-
-web.app.server=Jetty
-# NOTE: This only works for lenya.sh (Linux). TODO: Make it also work for lenya.bat (Windows)
-web.app.server.jetty.port=8888
-web.app.server.jetty.admin.port=8889
-#web.app.server=Tomcat
-#web.app.server=WLS
-
-
-#------------------------------------------------------------------------------------
-# Where the 'install' build target should put the webapp context
-# WARNING: This has to be an absolute path! (FIXME: cocoon.xconf needs absolute path (scr/targets/init-build.xml))
-# NOTE: Do not use white spaces within the path
-
-tomcat.home.dir=/usr/local/tomcat
-#tomcat.home.dir=C:/build/tomcat
-
-
-#------------------------------------------------------------------------------------
-# Where the 'install' build target should put the webapp context
-# NOTE: This path is not necessarily relative to tomcat.home.dir
-
-tomcat.webapps.dir=${tomcat.home.dir}/webapps/lenya
-
-
-#------------------------------------------------------------------------------------
-# The server cache directory to be cleaned by the 'reset' target
-# NOTE: This path is not necessarily relative to tomcat.home.dir
-
-# Tomcat 5.x
-tomcat.cache.dir=${tomcat.home.dir}/work/Catalina/localhost/lenya
-# Tomcat 4.x
-#tomcat.cache.dir=${tomcat.home.dir}/work/Standalone/localhost/lenya
-
-#------------------------------------------------------------------------------------
-# Where the 'install' build target should copy the endorsed libraries
-# NOTE: This path is not necessarily relative to tomcat.home.dir
-
-tomcat.endorsed.dir=${tomcat.home.dir}/common/endorsed
-
-
-#------------------------------------------------------------------------------------
-# Files and directories which should be excluded during 'install', 'clean' and 'reset'
-# Comma- or space-separated list of patterns
-# All files are included when commented
-# This is useful for preserving content while you are developing a publication
-
-#target.install.excludes=**/pubs/default/content/**,**/pubs/default/resources/authoring/**,**/pubs/default/resources/live/**,**/pubs/default/config/ac/passwd/*.iml
-#target.reset.excludes=${target.install.excludes}
-
-
-#------------------------------------------------------------------------------------
-# TODO: This seems to have moved to src/confpatch/enable-uploads.xweb whereas it
-# does NOT seem to work properly!
-# Enable file uploads in Lenya
-# If you leave this set to false, asset and image upload will not work.
-# It is disabled by default for security reasons
-# NOTE: One can change this after the build within build/lenya/webapp/WEB-INF/web.xml
-# where also the max upload size can be configured (upload-max-size parameter)
-
-enable.uploads=false
-
-
-#------------------------------------------------------------------------------------
-# Anteater home directory
-
-#anteater.home=/usr/local/anteater
-
-
-#------------------------------------------------------------------------------------
-# Canoo Webtest configuration
-
-# Webtest home directory
-#webtest.home=/usr/local/canoo-webtest-2.1
-
-# Webtest configuration parameters
-webtest.config.host=localhost
-webtest.config.port=8888
-webtest.config.basepath=default/authoring
-
-
-#------------------------------------------------------------------------------------
-# Eclipse Properties for use with the eclipse-project target
-
-ide.eclipse.outputdir=build/eclipse/classes
-ide.eclipse.export.libs=false
-
-
-#------------------------------------------------------------------------------------
-# The Java version.
-
-# Change to 1.5 if you need the features of 1.5.
-src.java.version=1.4
-
-
-#------------------------------------------------------------------------------------
-# Xopus context name
-
-xopus.context=Xopus2.1.64
-xopus.path=../../ROOT
-
-
-#------------------------------------------------------------------------------------
-# JCR repository factory
-
-repository.factory=org.apache.lenya.cms.jcr.jackrabbit.JackrabbitRepositoryFactory
-# NOTE: JeceiraRepositoryFactory has not been implemented yet
-#repository.factory=org.apache.lenya.cms.jcr.jeceira.JeceiraRepositoryFactory
-
-
-#------------------------------------------------------------------------------------
-# NOTE: The node factory needs to be configured within "build/lenya/webapp/WEB-INF/classes/org/apache/lenya/lenya.roles" after having build Lenya
-
-#node.factory=org.apache.lenya.cms.repository.SourceNodeFactory
-#node.factory=org.apache.lenya.cms.repo.adapter.RepoNodeFactory
-#node.factory=org.apache.lenya.cms.jcr.JCRNodeFactory
-
-
-#------------------------------------------------------------------------------------
-# SVN Revision number
-
-lenya.revision=xxx
diff --git a/trunk/build.sh b/trunk/build.sh
deleted file mode 100755
index 14ea29c..0000000
--- a/trunk/build.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-chmod u+x ./tools/bin/antRun
-chmod u+x ./tools/bin/ant
-
-# ----- Verify and Set Required Environment Variables -------------------------
-
-if [ "$TERM" = "cygwin" ] ; then
- S=';'
-else
- S=':'
-fi
-
-# ----- Ignore system CLASSPATH variable
-OLD_CLASSPATH="$CLASSPATH"
-unset CLASSPATH
-CLASSPATH="`echo lib/*.jar | tr ' ' $S`"
-ENDORSED_DIR="externals/cocoon_2_1_x/lib/endorsed"
-# Add cocoon endorsed libs
-CLASSPATH="$CLASSPATH `echo $ENDORSED_DIR/*.jar | tr ' ' $S`"
-export CLASSPATH
-
-# ----- Use Ant shipped with Lenya. Ignore installed in the system Ant
-OLD_ANT_HOME="$ANT_HOME"
-ANT_HOME=tools
-OLD_ANT_OPTS="$ANT_OPTS"
-ANT_OPTS="-Xms32M -Xmx512M -Djava.endorsed.dirs=$ENDORSED_DIR"
-export ANT_HOME ANT_OPTS
-
-"$ANT_HOME/bin/ant" -logger org.apache.tools.ant.NoBannerLogger -emacs $@
-ERR=$?
-
-# ----- Restore ANT_HOME and ANT_OPTS
-ANT_HOME="$OLD_ANT_HOME"
-ANT_OPTS="$OLD_ANT_OPTS"
-export ANT_HOME ANT_OPTS
-unset OLD_ANT_HOME
-unset OLD_ANT_OPTS
-
-# ----- Restore CLASSPATH
-CLASSPATH="$OLD_CLASSPATH"
-export CLASSPATH
-unset OLD_CLASSPATH
-
-# Build status return
-# Usage: e.g. bash: ./build.sh; if [ $? -ne 0 ]; then echo "Build FAILED"; fi
-exit $ERR
diff --git a/trunk/build.xml b/trunk/build.xml
deleted file mode 100644
index 09fc558..0000000
--- a/trunk/build.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.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.
--->
-
-<!-- $Id$ -->
-
-<!DOCTYPE project [
-<!-- ===========================================================================
-
- * =========================== *
- | Apache Lenya Build System |
- * =========================== *
-
- CVS $Id$:
-
-============================================================================ -->
-
-]>
-
-<project default="webapp" basedir="." name="lenya">
-
- <!-- ================== Apache Lenya targets ======================== -->
-
- <!-- =================================================================== -->
- <!-- Global properties -->
- <import file="src/targets/properties-build.xml" />
- <!-- Initialization targets -->
- <import file="src/targets/init-build.xml" />
- <!-- IDE targets -->
- <import file="src/targets/ide-build.xml" />
- <!-- Compile targets -->
- <import file="src/targets/compile-build.xml" />
- <!-- Documentation targets -->
- <import file="src/targets/docs-build.xml" />
- <!-- Web application targets -->
- <import file="src/targets/webapp-build.xml" />
- <!-- Testcases targets -->
- <import file="src/targets/test-build.xml" />
- <!-- Distribution targets -->
- <import file="src/targets/dist-build.xml" />
- <!-- Kupu targets -->
- <import file="src/targets/kupu-build.xml" />
- <!-- Export targets -->
- <import file="src/targets/export-build.xml" />
- <!-- module targets -->
- <import file="src/targets/modules-build.xml" />
- <!-- migration targets -->
- <import file="src/targets/migration-build.xml" />
- <!-- Publication tests -->
- <import file="src/targets/publication-test-build.xml" />
- <!-- Successfully Built Message -->
- <import file="src/targets/message-build.xml" />
- <!-- =================================================================== -->
-
-</project>
diff --git a/trunk/configure.bat b/trunk/configure.bat
deleted file mode 100644
index affdab6..0000000
--- a/trunk/configure.bat
+++ /dev/null
@@ -1,51 +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.
-::
-::
-@echo off
-
-:: define variables for paths
-set LENYA_HOME=%CD%
-set CP=%LENYA_HOME%\tools\configure\lib\apache-lenya-configure-core-1.4-dev-r414579.jar;%LENYA_HOME%\tools\configure\lib\apache-lenya-configure-impl-1.4-dev-r414579.jar
-echo The classpath is set to: %CP%
-
-:: check if JAVA_HOME is set or goto end
-if not "%JAVA_HOME%" == "" goto gotJavaHome
-echo You must set JAVA_HOME to point at your Java Development Kit installation
-goto end
-
-:gotJavaHome
-:: If commandline argument cmd is given goto javaCmd. Default without any argument
-:: it will start the GUI.
-if "%1" == "gui" goto javaGui
-goto javaCmd
-
-:javaGui
-java -classpath %CP% org.apache.lenya.config.impl.ConfigureGUI %LENYA_HOME%
-goto end
-
-:javaCmd
-java -classpath %CP% org.apache.lenya.config.impl.ConfigureCommandLine %LENYA_HOME%
-goto end
-
-:help
-echo Usage: %0 gui or cmd
-goto end
-
-
-:end
-:: unset used variables
-set LENYA_HOME=
-set CP=
diff --git a/trunk/configure.sh b/trunk/configure.sh
deleted file mode 100755
index e350bcf..0000000
--- a/trunk/configure.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# ----- Verify and Set Required Environment Variables -------------------------
-
-if [ "$TERM" = "cygwin" ] ; then
- S=';'
-else
- S=':'
-fi
-
-# ----- Check JAVA_HOME
-JAVA_HOME="$JAVA_HOME"
-if [ "$JAVA_HOME" = "" ];then
- echo "ERROR: No JAVA_HOME set yet!"
- echo " Have you installed JDK 1.4.2 or higher?"
- echo ""
- echo "NOTE: Apache Lenya does not work properly with JDK 1.5!"
- exit 1
-fi
-
-# ----- Ignore system CLASSPATH variable
-OLD_CLASSPATH="$CLASSPATH"
-unset CLASSPATH
-#CLASSPATH="`echo tools/configure/build/classes | tr ' ' $S`"
-CLASSPATH="tools/configure/lib/apache-lenya-configure-core-1.4-dev-r414579.jar:tools/configure/lib/apache-lenya-configure-impl-1.4-dev-r414579.jar"
-export CLASSPATH
-#echo "DEBUG: $CLASSPATH"
-
-DEFAULT_UI_TYPE=cmd
-UI_TYPE=$1
-if [ "$UI_TYPE" = "" ];then
- UI_TYPE=$DEFAULT_UI_TYPE
-fi
-#echo "DEBUG: $UI_TYPE"
-
-
-PWD=`pwd`
-if [ "$UI_TYPE" = "cmd" ];then
- java org.apache.lenya.config.impl.ConfigureCommandLine $PWD
-elif [ "$UI_TYPE" = "gui" ]; then
- java org.apache.lenya.config.impl.ConfigureGUI $PWD
-else
- echo "ERROR: No such User Interface: $UI_TYPE"
- exit 1
-fi
-ERR=$?
-
-echo ""
-echo "NOTE (for the advanced user): You might want to edit the local.* files manually, because there are often even more parameters which can be configured than the ones which were presented during this configuration setup!"
-
-echo ""
-echo "NOTE: Build Lenya now by running ./build.sh!"
-
-# ----- Restore CLASSPATH
-CLASSPATH="$OLD_CLASSPATH"
-export CLASSPATH
-unset OLD_CLASSPATH
-
-# Build status return
-# Usage: e.g. bash: ./build.sh; if [ $? -ne 0 ]; then echo "Build FAILED"; fi
-exit $ERR
diff --git a/trunk/legal/LICENSE.apache b/trunk/legal/LICENSE.apache
deleted file mode 100644
index 1fc4c3e..0000000
--- a/trunk/legal/LICENSE.apache
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, 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.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
diff --git a/trunk/legal/LICENSE.avalon b/trunk/legal/LICENSE.avalon
deleted file mode 100644
index 86f3c8a..0000000
--- a/trunk/legal/LICENSE.avalon
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1997-2001 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur", "Avalon Framework" and
- "Apache Software Foundation" must not be used to endorse or promote
- products derived from this software without prior written permission.
- For written permission, please contact apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, 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.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-
diff --git a/trunk/legal/LICENSE.batik b/trunk/legal/LICENSE.batik
deleted file mode 100644
index 6480f2a..0000000
--- a/trunk/legal/LICENSE.batik
+++ /dev/null
@@ -1,45 +0,0 @@
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2000 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and "Apache Software Foundation" must not be used to
- endorse or promote products derived from this software without prior
- written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, 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.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
diff --git a/trunk/legal/LICENSE.bxeng b/trunk/legal/LICENSE.bxeng
deleted file mode 100644
index 7dd2916..0000000
--- a/trunk/legal/LICENSE.bxeng
+++ /dev/null
@@ -1,49 +0,0 @@
-The Bitflux Editor Software License
-
-Copyright (c) 2002, 2003 Bitflux GmbH. All rights reserved.
-
-Redistribution and use in source and binary forms,
-with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain the
-above copyright notice, this list of conditions and
-the following disclaimer.
-
-2. 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.
-
-3. All advertising materials mentioning features or
-use of this software must display the following
-acknowledgment: "This product includes software
-developed by Bitflux GmbH (http://www.bitflux.ch)"
-
-4. The name "Bitflux Editor" and "Bitflux" must not be
-used to endorse or promote products derived from this
-software without prior written permission. For written
-permission, please contact editor@bitflux.ch
-
-5. Products derived from this software may not be
-called "Bitflux" or "Bitflux Editor" nor may "Bitflux"
-or "Bitflux Editor" appear in their names without
-prior written permission of Bitflux.
-
-6. Redistributions of any form whatsoever must retain
-the following acknowledgment: "This product includes
-software developed by Bitflux GmbH
-(http://www.bitflux.ch)"
-
-
-THIS SOFTWARE IS PROVIDED BY Bitflux "AS IS" WITHOUT
-ANY WARRANTY EXPRESS OR IMPLIED, INCLUDING THE
-WARRANTY OF NON-INFRINGEMENT AND THE IMPLIED
-WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A
-PARTICULAR PURPOSE. Bitflux WILL NOT BE LIABLE FOR ANY
-DAMAGES SUFFERED BY YOU AS A RESULT OF USING THIS
-SOFTWARE. IN NO EVENT WILL Bitflux BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR LOST
-PROFITS EVEN IF Bitflux HAS BEEN ADVISED OF THE
-POSSIBILITY OF THEIR OCCURRENCE. Bitflux WILL NOT BE
-LIABLE FOR ANY THIRD PARTY CLAIMS AGAINST YOU.
diff --git a/trunk/legal/LICENSE.forrest b/trunk/legal/LICENSE.forrest
deleted file mode 100644
index f376e9b..0000000
--- a/trunk/legal/LICENSE.forrest
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Apache Forrest" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, 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.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
diff --git a/trunk/legal/LICENSE.jakarta-commons b/trunk/legal/LICENSE.jakarta-commons
deleted file mode 100644
index 5fb9ec1..0000000
--- a/trunk/legal/LICENSE.jakarta-commons
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software 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:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. 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.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgement may appear in the software itself,
- * if and wherever such third-party acknowledgements normally appear.
- *
- * 4. The names "Apache", "The Jakarta Project", "Commons", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their name without prior
- * written permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR
- * ITS 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-
\ No newline at end of file
diff --git a/trunk/legal/LICENSE.jakarta-regexp b/trunk/legal/LICENSE.jakarta-regexp
deleted file mode 100644
index 64ea074..0000000
--- a/trunk/legal/LICENSE.jakarta-regexp
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software 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:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. 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.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Jakarta-Regexp", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR
- * ITS 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
diff --git a/trunk/legal/LICENSE.jing b/trunk/legal/LICENSE.jing
deleted file mode 100644
index f257dcc..0000000
--- a/trunk/legal/LICENSE.jing
+++ /dev/null
@@ -1,39 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Jing Copying Conditions</title></head>
-<body>
-<h1>Jing Copying Conditions</h1>
-
-<p>Copyright (c) 2001-2003 Thai Open Source Software Center Ltd<br>
-All rights reserved.</p>
-
-<p>Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</p>
-
-<ul>
- <li>Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.</li>
-
- <li>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.</li>
-
- <li>Neither the name of the Thai Open Source Software Center Ltd nor
- the names of its contributors may be used to endorse or promote
- products derived from this software without specific prior written
- permission.</li>
-</ul>
-
-<p>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 REGENTS 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.</p>
-
-</body></html>
\ No newline at end of file
diff --git a/trunk/legal/LICENSE.jtidy b/trunk/legal/LICENSE.jtidy
deleted file mode 100644
index 84e366b..0000000
--- a/trunk/legal/LICENSE.jtidy
+++ /dev/null
@@ -1,49 +0,0 @@
- Java HTML Tidy - JTidy
- HTML parser and pretty printer
-
- Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
- Institute of Technology, Institut National de Recherche en
- Informatique et en Automatique, Keio University). All Rights
- Reserved.
-
- Contributing Author(s):
-
- Dave Raggett <dsr@w3.org>
- Andy Quick <ac.quick@sympatico.ca> (translation to Java)
- Gary L Peskin <garyp@firstech.com> (Java development)
- Sami Lempinen <sami@lempinen.net> (release management)
-
- The contributing author(s) would like to thank all those who
- helped with testing, bug fixes, and patience. This wouldn't
- have been possible without all of you.
-
- COPYRIGHT NOTICE:
-
- This software and documentation is provided "as is," and
- the copyright holders and contributing author(s) make no
- representations or warranties, express or implied, including
- but not limited to, warranties of merchantability or fitness
- for any particular purpose or that the use of the software or
- documentation will not infringe any third party patents,
- copyrights, trademarks or other rights.
-
- The copyright holders and contributing author(s) will not be
- liable for any direct, indirect, special or consequential damages
- arising out of any use of the software or documentation, even if
- advised of the possibility of such damage.
-
- Permission is hereby granted to use, copy, modify, and distribute
- this source code, or portions hereof, documentation and executables,
- for any purpose, without fee, subject to the following restrictions:
-
- 1. The origin of this source code must not be misrepresented.
- 2. Altered versions must be plainly marked as such and must
- not be misrepresented as being the original source.
- 3. This Copyright notice may not be removed or altered from any
- source or altered source distribution.
-
- The copyright holders and contributing author(s) specifically
- permit, without fee, and encourage the use of this source code
- as a component for supporting the Hypertext Markup Language in
- commercial products. If you use this source code in a product,
- acknowledgment is not required but would be appreciated.
diff --git a/trunk/legal/LICENSE.junit b/trunk/legal/LICENSE.junit
deleted file mode 100644
index cdf887a..0000000
--- a/trunk/legal/LICENSE.junit
+++ /dev/null
@@ -1,185 +0,0 @@
-
-IBM Public License Version 1.0
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS IBM PUBLIC
-LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE
-PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-1. DEFINITIONS
-
-"Contribution" means:
- a) in the case of International Business Machines Corporation ("IBM"),
- the Original Program, and
- b) in the case of each Contributor,
- i) changes to the Program, and
- ii) additions to the Program;
- where such changes and/or additions to the Program originate from and
- are distributed by that particular Contributor. A Contribution
- 'originates' from a Contributor if it was added to the Program by such
- Contributor itself or anyone acting on such Contributor's behalf.
- Contributions do not include additions to the Program which: (i) are
- separate modules of software distributed in conjunction with the Program
- under their own license agreement, and (ii) are not derivative works of
- the Program.
-"Contributor" means IBM and any other entity that distributes the Program.
-
-"Licensed Patents " mean patent claims licensable by a Contributor which
-are necessarily infringed by the use or sale of its Contribution alone or
-when combined with the Program.
-"Original Program" means the original version of the software accompanying
-this Agreement as released by IBM, including source code, object code and
-documentation, if any.
-"Program" means the Original Program and Contributions.
-"Recipient" means anyone who receives the Program under this Agreement,
-including all Contributors.
-2. GRANT OF RIGHTS
- a) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free copyright
- license to reproduce, prepare derivative works of, publicly display,
- publicly perform, distribute and sublicense the Contribution of such
- Contributor, if any, and such derivative works, in source code and
- object code form.
- b) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free patent license
- under Licensed Patents to make, use, sell, offer to sell, import and
- otherwise transfer the Contribution of such Contributor, if any, in
- source code and object code form. This patent license shall apply to the
- combination of the Contribution and the Program if, at the time the
- Contribution is added by the Contributor, such addition of the
- Contribution causes such combination to be covered by the Licensed
- Patents. The patent license shall not apply to any other combinations
- which include the Contribution. No hardware per se is licensed
- hereunder.
- c) Recipient understands that although each Contributor grants the
- licenses to its Contributions set forth herein, no assurances are
- provided by any Contributor that the Program does not infringe the
- patent or other intellectual property rights of any other entity. Each
- Contributor disclaims any liability to Recipient for claims brought by
- any other entity based on infringement of intellectual property rights
- or otherwise. As a condition to exercising the rights and licenses
- granted hereunder, each Recipient hereby assumes sole responsibility to
- secure any other intellectual property rights needed, if any. For
- example, if a third party patent license is required to allow Recipient
- to distribute the Program, it is Recipient's responsibility to acquire
- that license before distributing the Program.
- d) Each Contributor represents that to its knowledge it has sufficient
- copyright rights in its Contribution, if any, to grant the copyright
- license set forth in this Agreement.
-3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object code form
-under its own license agreement, provided that:
- a) it complies with the terms and conditions of this Agreement; and
- b) its license agreement:
- i) effectively disclaims on behalf of all Contributors all warranties
- and conditions, express and implied, including warranties or conditions
- of title and non-infringement, and implied warranties or conditions of
- merchantability and fitness for a particular purpose;
- ii) effectively excludes on behalf of all Contributors all liability for
- damages, including direct, indirect, special, incidental and
- consequential damages, such as lost profits;
- iii) states that any provisions which differ from this Agreement are
- offered by that Contributor alone and not by any other party; and
- iv) states that source code for the Program is available from such
- Contributor, and informs licensees how to obtain it in a reasonable
- manner on or through a medium customarily used for software exchange.
-When the Program is made available in source code form:
- a) it must be made available under this Agreement; and
- b) a copy of this Agreement must be included with each copy of the
- Program.
-Each Contributor must include the following in a conspicuous location in
-the Program:
- Copyright © {date here}, International Business Machines Corporation and
- others. All Rights Reserved.
-In addition, each Contributor must identify itself as the originator of
-its Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.
-4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities
-with respect to end users, business partners and the like. While this
-license is intended to facilitate the commercial use of the Program, the
-Contributor who includes the Program in a commercial product offering
-should do so in a manner which does not create potential liability for
-other Contributors. Therefore, if a Contributor includes the Program in a
-commercial product offering, such Contributor ("Commercial Contributor")
-hereby agrees to defend and indemnify every other Contributor
-("Indemnified Contributor") against any losses, damages and costs
-(collectively "Losses") arising from claims, lawsuits and other legal
-actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor
-in connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or
-Losses relating to any actual or alleged intellectual property
-infringement. In order to qualify, an Indemnified Contributor must: a)
-promptly notify the Commercial Contributor in writing of such claim, and
-b) allow the Commercial Contributor to control, and cooperate with the
-Commercial Contributor in, the defense and any related settlement
-negotiations. The Indemnified Contributor may participate in any such
-claim at its own expense.
-For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance claims,
-or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under
-this section, the Commercial Contributor would have to defend claims
-against the other Contributors related to those performance claims and
-warranties, and if a court requires any other Contributor to pay any
-damages as a result, the Commercial Contributor must pay those damages.
-5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
-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. Each Recipient is solely responsible for determining
-the appropriateness of using and distributing the Program and assumes all
-risks associated with its exercise of rights under this Agreement,
-including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations.
-6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
-CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), 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 OR DISTRIBUTION
-OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-7. GENERAL
-If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of the
-remainder of the terms of this Agreement, and without further action by
-the parties hereto, such provision shall be reformed to the minimum extent
-necessary to make such provision valid and enforceable.
-If Recipient institutes patent litigation against a Contributor with
-respect to a patent applicable to software (including a cross-claim or
-counterclaim in a lawsuit), then any patent licenses granted by that
-Contributor to such Recipient under this Agreement shall terminate as of
-the date such litigation is filed. In addition, If Recipient institutes
-patent litigation against any entity (including a cross-claim or
-counterclaim in a lawsuit) alleging that the Program itself (excluding
-combinations of the Program with other software or hardware) infringes
-such Recipient's patent(s), then such Recipient's rights granted under
-Section 2(b) shall terminate as of the date such litigation is filed.
-All Recipient's rights under this Agreement shall terminate if it fails to
-comply with any of the material terms or conditions of this Agreement and
-does not cure such failure in a reasonable period of time after becoming
-aware of such noncompliance. If all Recipient's rights under this
-Agreement terminate, Recipient agrees to cease use and distribution of the
-Program as soon as reasonably practicable. However, Recipient's
-obligations under this Agreement and any licenses granted by Recipient
-relating to the Program shall continue and survive.
-IBM may publish new versions (including revisions) of this Agreement from
-time to time. Each new version of the Agreement will be given a
-distinguishing version number. The Program (including Contributions) may
-always be distributed subject to the version of the Agreement under which
-it was received. In addition, after a new version of the Agreement is
-published, Contributor may elect to distribute the Program (including its
-Contributions) under the new version. No one other than IBM has the right
-to modify this Agreement. Except as expressly stated in Sections 2(a) and
-2(b) above, Recipient receives no rights or licenses to the intellectual
-property of any Contributor under this Agreement, whether expressly, by
-implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.
-This Agreement is governed by the laws of the State of New York and the
-intellectual property laws of the United States of America. No party to
-this Agreement will bring a legal action under this Agreement more than
-one year after the cause of action arose. Each party waives its rights to
-a jury trial in any resulting litigation.
diff --git a/trunk/legal/LICENSE.logkit b/trunk/legal/LICENSE.logkit
deleted file mode 100644
index b360565..0000000
--- a/trunk/legal/LICENSE.logkit
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2001 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "LogKit", "Jakarta" and "Apache Software Foundation" must not
- be used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
- apache@apache.org.
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, 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.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache
- Software Foundation, please see <http://www.apache.org/>.
-
-*/
diff --git a/trunk/legal/LICENSE.quartz b/trunk/legal/LICENSE.quartz
deleted file mode 100644
index 4c8db80..0000000
--- a/trunk/legal/LICENSE.quartz
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * All source code, binaries, documentation and other files distributed
- * with Quartz Enterprise Job Scheduler are subject to the following
- * license terms, and are held under the following copyright notice,
- * unless otherwise noted within the individual files.
- *
- */
-
-
-/*
- * Copyright James House (c) 2001-2003
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- *
- * This product uses and includes within its distribution,
- * software developed by the Apache Software Foundation
- * (http://www.apache.org/)
- *
- */
diff --git a/trunk/legal/LICENSE.resolver b/trunk/legal/LICENSE.resolver
deleted file mode 100644
index b9f6031..0000000
--- a/trunk/legal/LICENSE.resolver
+++ /dev/null
@@ -1,53 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software 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:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. 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.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR
- * ITS 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
diff --git a/trunk/legal/LICENSE.servlet b/trunk/legal/LICENSE.servlet
deleted file mode 100644
index 9bace83..0000000
--- a/trunk/legal/LICENSE.servlet
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software 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:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. 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.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR
- * ITS 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- * ====================================================================
- *
- * This source code implements specifications defined by the Java
- * Community Process. In order to remain compliant with the specification
- * DO NOT add / change / or delete method signatures!
- */
diff --git a/trunk/legal/LICENSE.websphinx b/trunk/legal/LICENSE.websphinx
deleted file mode 100644
index 3a6c289..0000000
--- a/trunk/legal/LICENSE.websphinx
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * WebSphinx web-crawling toolkit
- *
- * Copyright (c) 1998-2002 Carnegie Mellon University. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
- * ANY EXPRESSED 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 CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES 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.
- *
- */
diff --git a/trunk/legal/LICENSE.xalan b/trunk/legal/LICENSE.xalan
deleted file mode 100644
index 21156a6..0000000
--- a/trunk/legal/LICENSE.xalan
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software 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:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. 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.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xalan" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR
- * ITS 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, Lotus
- * Development Corporation., http://www.lotus.com. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
diff --git a/trunk/legal/LICENSE.xerces b/trunk/legal/LICENSE.xerces
deleted file mode 100644
index b37087c..0000000
--- a/trunk/legal/LICENSE.xerces
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software 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:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. 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.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR
- * ITS 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.ibm.com. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
diff --git a/trunk/legal/LICENSE.xml-apis b/trunk/legal/LICENSE.xml-apis
deleted file mode 100644
index 930145f..0000000
--- a/trunk/legal/LICENSE.xml-apis
+++ /dev/null
@@ -1,5 +0,0 @@
-
-xml-apis is covered by The Apache Software License, Version 1.1
-
-FIXME: Put license text in here once it is available at
- http://cvs.apache.org/viewcvs.cgi/xml-commons/
diff --git a/trunk/legal/ant-contrib-0.6.jar.license.txt b/trunk/legal/ant-contrib-0.6.jar.license.txt
deleted file mode 100644
index 4d8c2fb..0000000
--- a/trunk/legal/ant-contrib-0.6.jar.license.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 Ant-Contrib project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. 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.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Ant-Contrib project (http://sourceforge.net/projects/ant-contrib)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The name Ant-Contrib must not be used to endorse or promote products
- * derived from this software without prior written permission. For
- * written permission, please contact
- * ant-contrib-developers@lists.sourceforge.net.
- *
- * 5. Products derived from this software may not be called "Ant-Contrib"
- * nor may "Ant-Contrib" appear in their names without prior written
- * permission of the Ant-Contrib project.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 ANT-CONTRIB PROJECT OR ITS
- * 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.
- * ====================================================================
- */
diff --git a/trunk/legal/ant-junit.jar.license.txt b/trunk/legal/ant-junit.jar.license.txt
deleted file mode 100644
index f820d4b..0000000
--- a/trunk/legal/ant-junit.jar.license.txt
+++ /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/trunk/legal/ant-launcher.jar.license.txt b/trunk/legal/ant-launcher.jar.license.txt
deleted file mode 100644
index f820d4b..0000000
--- a/trunk/legal/ant-launcher.jar.license.txt
+++ /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/trunk/legal/ant-trax.jar.license.txt b/trunk/legal/ant-trax.jar.license.txt
deleted file mode 100644
index f820d4b..0000000
--- a/trunk/legal/ant-trax.jar.license.txt
+++ /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/trunk/legal/ant.jar.license.txt b/trunk/legal/ant.jar.license.txt
deleted file mode 100644
index f820d4b..0000000
--- a/trunk/legal/ant.jar.license.txt
+++ /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/trunk/legal/commons-cli-1.0.jar.license.txt b/trunk/legal/commons-cli-1.0.jar.license.txt
deleted file mode 100644
index 4088a92..0000000
--- a/trunk/legal/commons-cli-1.0.jar.license.txt
+++ /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.
-
-
\ No newline at end of file
diff --git a/trunk/legal/commons-logging.jar.license.txt b/trunk/legal/commons-logging.jar.license.txt
deleted file mode 100644
index 4088a92..0000000
--- a/trunk/legal/commons-logging.jar.license.txt
+++ /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.
-
-
\ No newline at end of file
diff --git a/trunk/legal/howl.jar.license.html b/trunk/legal/howl.jar.license.html
deleted file mode 100644
index 0f6e253..0000000
--- a/trunk/legal/howl.jar.license.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<html>
-<head>
-<meta name="generator" content="
-HTML Tidy for Windows (vers 1st July 2003), see www.w3.org">
-<title>BSD-style License</title>
-</head>
-<body bgcolor="#FFFFFF" text="#000000" link="#1F00FF" alink="
-#FF0000" vlink="#9900DD">
-<h1>BSD-style License</h1>
-<hr>
-<p>Redistribution and use in source and binary forms, with or
-without modification, are permitted provided that the following
-conditions are met:</p>
-<p>-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.</p>
-<p>-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.</p>
-
-<p>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.</p>
-<hr>
-<p>Updated: <!-- hhmts start -->
- 9 Dec 2003 jotm <!-- hhmts end --></p>
-<hr>
-</body>
-</html>
\ No newline at end of file
diff --git a/trunk/legal/jaas-5.1.4.jar.license.txt b/trunk/legal/jaas-5.1.4.jar.license.txt
deleted file mode 100644
index 261eeb9..0000000
--- a/trunk/legal/jaas-5.1.4.jar.license.txt
+++ /dev/null
@@ -1,201 +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/trunk/legal/jetty.plus-5.1.4.jar.license.txt b/trunk/legal/jetty.plus-5.1.4.jar.license.txt
deleted file mode 100644
index 261eeb9..0000000
--- a/trunk/legal/jetty.plus-5.1.4.jar.license.txt
+++ /dev/null
@@ -1,201 +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/trunk/legal/jotm.jar.license.html b/trunk/legal/jotm.jar.license.html
deleted file mode 100644
index 0f6e253..0000000
--- a/trunk/legal/jotm.jar.license.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<html>
-<head>
-<meta name="generator" content="
-HTML Tidy for Windows (vers 1st July 2003), see www.w3.org">
-<title>BSD-style License</title>
-</head>
-<body bgcolor="#FFFFFF" text="#000000" link="#1F00FF" alink="
-#FF0000" vlink="#9900DD">
-<h1>BSD-style License</h1>
-<hr>
-<p>Redistribution and use in source and binary forms, with or
-without modification, are permitted provided that the following
-conditions are met:</p>
-<p>-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.</p>
-<p>-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.</p>
-
-<p>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.</p>
-<hr>
-<p>Updated: <!-- hhmts start -->
- 9 Dec 2003 jotm <!-- hhmts end --></p>
-<hr>
-</body>
-</html>
\ No newline at end of file
diff --git a/trunk/legal/kupu.license.txt b/trunk/legal/kupu.license.txt
deleted file mode 100644
index 124695f..0000000
--- a/trunk/legal/kupu.license.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Copyright (c) 2003-2004, Kupu Contributors
-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 Kupu 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.
diff --git a/trunk/legal/log4j.jar.license.txt b/trunk/legal/log4j.jar.license.txt
deleted file mode 100644
index e7e2637..0000000
--- a/trunk/legal/log4j.jar.license.txt
+++ /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.
-
- 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/trunk/legal/neko.license.txt b/trunk/legal/neko.license.txt
deleted file mode 100644
index 760f629..0000000
--- a/trunk/legal/neko.license.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-The CyberNeko Software License, Version 1.0
-
-
-(C) Copyright 2002, Andy Clark. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. 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.
-
-3. The end-user documentation included with the redistribution,
- if any, must include the following acknowledgment:
- "This product includes software developed by Andy Clark."
- Alternately, this acknowledgment may appear in the software itself,
- if and wherever such third-party acknowledgments normally appear.
-
-4. The names "CyberNeko" and "NekoHTML" must not be used to endorse
- or promote products derived from this software without prior
- written permission. For written permission, please contact
- andy@cyberneko.net.
-
-5. Products derived from this software may not be called "NekoHTML",
- nor may "NekoHTML" appear in their name, without prior written
- permission of the author.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHOR OR OTHER 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.
-
-====================================================================
-
-This license is based on the Apache Software License, version 1.1.
\ No newline at end of file
diff --git a/trunk/legal/xindice-1.1.jar.license.txt b/trunk/legal/xindice-1.1.jar.license.txt
deleted file mode 100644
index 261eeb9..0000000
--- a/trunk/legal/xindice-1.1.jar.license.txt
+++ /dev/null
@@ -1,201 +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/trunk/legal/xmldb-common-20030701.jar.license.txt b/trunk/legal/xmldb-common-20030701.jar.license.txt
deleted file mode 100644
index 6cf5b78..0000000
--- a/trunk/legal/xmldb-common-20030701.jar.license.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-
- The XML:DB Initiative Software License, Version 1.0
-
-
- Copyright (c) 2000-2001 The XML:DB Initiative. All rights
- reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. The end-user documentation included with the redistribution,
- if any, must include the following acknowledgment:
- "This product includes software developed by the
- XML:DB Initiative (http://www.xmldb.org/)."
- Alternately, this acknowledgment may appear in the software itself,
- if and wherever such third-party acknowledgments normally appear.
-
- 4. The name "XML:DB Initiative" must not be used to endorse or
- promote products derived from this software without prior written
- permission. For written permission, please contact info@xmldb.org.
-
- 5. Products derived from this software may not be called "XML:DB",
- nor may "XML:DB" appear in their name, without prior written
- permission of the XML:DB Initiative.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR
- ITS 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.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the XML:DB Initiative. For more information
- on the XML:DB Initiative, please see <http://www.xmldb.org/>.
-
diff --git a/trunk/legal/xmldb-xupdate-20040205.jar.license.txt b/trunk/legal/xmldb-xupdate-20040205.jar.license.txt
deleted file mode 100644
index 6cf5b78..0000000
--- a/trunk/legal/xmldb-xupdate-20040205.jar.license.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-
- The XML:DB Initiative Software License, Version 1.0
-
-
- Copyright (c) 2000-2001 The XML:DB Initiative. All rights
- reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. The end-user documentation included with the redistribution,
- if any, must include the following acknowledgment:
- "This product includes software developed by the
- XML:DB Initiative (http://www.xmldb.org/)."
- Alternately, this acknowledgment may appear in the software itself,
- if and wherever such third-party acknowledgments normally appear.
-
- 4. The name "XML:DB Initiative" must not be used to endorse or
- promote products derived from this software without prior written
- permission. For written permission, please contact info@xmldb.org.
-
- 5. Products derived from this software may not be called "XML:DB",
- nor may "XML:DB" appear in their name, without prior written
- permission of the XML:DB Initiative.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR
- ITS 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.
- ====================================================================
-
- This software consists of voluntary contributions made by many
- individuals on behalf of the XML:DB Initiative. For more information
- on the XML:DB Initiative, please see <http://www.xmldb.org/>.
-
diff --git a/trunk/legal/xmlunit1.0.jar.license.txt b/trunk/legal/xmlunit1.0.jar.license.txt
deleted file mode 100644
index 0a1439f..0000000
--- a/trunk/legal/xmlunit1.0.jar.license.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-******************************************************************
-Copyright (c) 2001, Jeff Martin, Tim Bacon
-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 xmlunit.sourceforge.net 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.
-
-******************************************************************
-*/
diff --git a/trunk/lenya.bat b/trunk/lenya.bat
deleted file mode 100644
index ec98e15..0000000
--- a/trunk/lenya.bat
+++ /dev/null
@@ -1,162 +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.
-
-@echo off
-:: -----------------------------------------------------------------------------
-:: Lenya Win32 Shell Script
-::
-:: $Id$
-:: -----------------------------------------------------------------------------
-
-:: Configuration variables
-::
-:: LENYA_HOME
-:: Folder that points to the root of the Lenya distribution
-::
-:: LENYA_LIB
-:: Folder containing all the library files needed by the Lenya CLI
-::
-:: JAVA_HOME
-:: Home of Java installation.
-::
-:: JAVA_OPTIONS
-:: Extra options to pass to the JVM
-::
-:: JAVA_DEBUG_PORT
-:: The location where the JVM debug server should listen to
-::
-:: JETTY_PORT
-:: Override the default port for Jetty
-::
-:: JETTY_ADMIN_PORT
-:: The port where the jetty web administration should bind
-::
-:: JETTY_WEBAPP
-:: The directory where the webapp that jetty has to execute is located
-::
-
-:: ----- Verify and Set Required Environment Variables -------------------------
-
-if not "%JAVA_HOME%" == "" goto gotJavaHome
-echo You must set JAVA_HOME to point at your Java Development Kit installation
-goto end
-:gotJavaHome
-
-:: ----- Check System Properties -----------------------------------------------
-
-if not "%EXEC%" == "" goto gotExec
-if not "%OS%" == "Windows_NT" goto noExecNT
-set EXEC=start "Apache Lenya" /D. /MAX
-goto gotExec
-:noExecNT
-set EXEC=
-:gotExec
-
-set LENYA_HOME=.
-:: echo lenya.bat: using %LENYA_HOME% as home
-
-set LENYA_LIB=%LENYA_HOME%\build\lenya\webapp\WEB-INF\lib
-:: echo lenya.bat: using %LENYA_LIB% as lib
-
-set JETTY_PORT=8888
-
-set JETTY_ADMIN_PORT=8889
-set JETTY_URI_CHARSET=ISO-8859-1
-set JETTY_WEBAPP=%LENYA_HOME%\build\lenya\webapp
-:: echo lenya.bat: using %JETTY_WEBAPP% as the webapp directory
-
-set JAVA_DEBUG_PORT=8000
-
-:: ----- Set Up The Classpath --------------------------------------------------
-
-set CP=%LENYA_HOME%\tools\loader
-
-:: ----- Unpack WAR file if needed --------------------------------------------------
-
-if exist build\lenya\webapp goto action
-
-echo ###############################################
-echo # First start of Lenya. Unpacking now... #
-echo ###############################################
-
-mkdir build\lenya\webapp
-cd build\lenya\webapp
-"%JAVA_HOME%\bin\jar.exe" -xf ..\..\..\lenya.war
-cd ..\..\..
-mkdir build\lenya\webapp\WEB-INF\logs
-
-:: ----- Check action ----------------------------------------------------------
-:action
-if ""%1"" == ""cli"" goto doCli
-if ""%1"" == ""servlet"" goto doServlet
-if ""%1"" == ""servlet-admin"" goto doAdmin
-if ""%1"" == ""servlet-debug"" goto doDebug
-IF ""%1"" == ""servlet-profile"" goto doProfile
-goto doServlet
-
-echo Usage: lenya (action)
-echo actions:
-echo cli Run Lenya from command line
-echo servlet Run Lenya in a servlet container
-echo servlet-admin Run Lenya in a servlet container and turn container web administration on
-echo servlet-debug Run Lenya in a servlet container and turn on remote JVM debug
-echo servlet-profile Run Lenya in a servlet container and turn on JVM profiling
-goto end
-
-:: ----- Cli -------------------------------------------------------------------
-
-:doCli
-set param=
-shift
-:cliLoop
-if "%1"=="" goto cliLoopEnd
-if not "%1"=="" set param=%param% %1
-shift
-goto cliLoop
-
-:cliLoopEnd
-
-"%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -classpath %CP% -Djava.endorsed.dirs=%LENYA_LIB%\endorsed -Dloader.jar.repositories=%LENYA_LIB% -Dloader.main.class=org.apache.cocoon.Main Loader %param%
-goto end
-
-:: ----- Servlet ---------------------------------------------------------------
-
-:doServlet
-%EXEC% "%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -classpath %CP% -Djava.endorsed.dirs=%LENYA_LIB%\endorsed -Dwebapp=%JETTY_WEBAPP% -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -Djetty.port=%JETTY_PORT% -Djetty.admin.port=%JETTY_ADMIN_PORT% -Dhome=%LENYA_HOME% "-Dloader.jar.repositories=%LENYA_HOME%\tools\jetty\lib;%LENYA_HOME%\tools\jetty\extra\lib;%LENYA_HOME%\tools\jetty\extra\ext;%LENYA_HOME%\tools\jetty\ext;%LENYA_HOME%\tools\jetty\extra\resources;%LENYA_LIB%\endorsed" -Dloader.main.class=org.mortbay.jetty.plus.Server -Dorg.mortbay.util.URI.charset=%JETTY_URI_CHARSET% Loader %LENYA_HOME%\tools\jetty\conf\main.xml
-goto end
-
-:: ----- Servlet with Administration Web Interface -----------------------------
-
-:doAdmin
-%EXEC% "%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -classpath %CP% -Djava.endorsed.dirs=%LENYA_LIB%\endorsed -Dwebapp=%JETTY_WEBAPP% -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -Djetty.port=%JETTY_PORT% -Djetty.admin.port=%JETTY_ADMIN_PORT% -Dhome=%LENYA_HOME% "-Dloader.jar.repositories=%LENYA_HOME%\tools\jetty\lib;%LENYA_HOME%\tools\jetty\extra\lib;%LENYA_HOME%\tools\jetty\extra\ext;%LENYA_HOME%\tools\jetty\ext;%LENYA_HOME%\tools\jetty\extra\resources;%LENYA_LIB%\endorsed" -Dloader.main.class=org.mortbay.jetty.plus.Server -Dorg.mortbay.util.URI.charset=%JETTY_URI_CHARSET% Loader %LENYA_HOME%\tools\jetty\conf\main.xml %LENYA_HOME%\tools\jetty\conf\admin.xml
-goto end
-
-:: ----- Servlet Debug ---------------------------------------------------------
-
-:doDebug
-%EXEC% "%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -Xdebug -Xrunjdwp:transport=dt_socket,address=%JAVA_DEBUG_PORT%,server=y,suspend=n -classpath %CP% -Djava.endorsed.dirs=%LENYA_LIB%\endorsed -Dwebapp=%JETTY_WEBAPP% -Dhome=%LENYA_HOME% -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -Djetty.port=%JETTY_PORT% -Djetty.admin.port=%JETTY_ADMIN_PORT% "-Dloader.jar.repositories=%LENYA_HOME%\tools\jetty\lib;%LENYA_HOME%\tools\jetty\extra\lib;%LENYA_HOME%\tools\jetty\extra\ext;%LENYA_HOME%\tools\jetty\ext;%LENYA_HOME%\tools\jetty\extra\resources;%LENYA_LIB%\endorsed" -Dloader.main.class=org.mortbay.jetty.plus.Server -Dorg.mortbay.util.URI.charset=%JETTY_URI_CHARSET% Loader %LENYA_HOME%\tools\jetty\conf\main.xml
-goto end
-
-:: ----- Servlet Profile ---------------------------------------------------------
-
-:doProfile
-%EXEC% "%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -Xrunhprof:heap=all,cpu=samples,thread=y,depth=3 -classpath %CP% -Djava.endorsed.dirs=%LENYA_LIB%\endorsed -Dwebapp=%JETTY_WEBAPP% -Dhome=%LENYA_HOME% -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -Djetty.port=%JETTY_PORT% -Djetty.admin.port=%JETTY_ADMIN_PORT% "-Dloader.jar.repositories=%LENYA_HOME%\tools\jetty\lib;%LENYA_HOME%\tools\jetty\extra\lib;%LENYA_HOME%\tools\jetty\extra\ext;%LENYA_HOME%\tools\jetty\ext;%LENYA_HOME%\tools\jetty\extra\resources;%LENYA_LIB%\endorsed" -Dloader.main.class=org.mortbay.jetty.plus.Server -Dorg.mortbay.util.URI.charset=%JETTY_URI_CHARSET% Loader %LENYA_HOME%\tools\jetty\conf\main.xml
-
-:: ----- End -------------------------------------------------------------------
-
-:end
-set CP=
-set EXEC=
-
diff --git a/trunk/lenya.nsi b/trunk/lenya.nsi
deleted file mode 100644
index c31d72f..0000000
--- a/trunk/lenya.nsi
+++ /dev/null
@@ -1,165 +0,0 @@
-;NSIS Lenya Installer script
-
-; 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.
-
-; $Id$
-
-;--------------------------------
-;Include Modern UI
-
- !include "MUI.nsh"
-
-;--------------------------------
-;Configuration
-
- ;General
- Var product_name
- Name "Apache Lenya 2.0-dev"
- OutFile "apache-lenya-2.0-dev-bin.exe"
-
- CRCCheck on
- SetCompress force
- SetDatablockOptimize on
-
- ;Folder selection page
- InstallDir "C:\apache-lenya-2.0-dev"
-
-;--------------------------------
-;Interface Settings
-
- !define MUI_ABORTWARNING
-
-;--------------------------------
-;Pages
-
- !insertmacro MUI_PAGE_LICENSE "LICENSE.txt"
- !insertmacro MUI_PAGE_COMPONENTS
- !insertmacro MUI_PAGE_DIRECTORY
- !insertmacro MUI_PAGE_INSTFILES
-
- !insertmacro MUI_UNPAGE_CONFIRM
- !insertmacro MUI_UNPAGE_INSTFILES
-
-;--------------------------------
-;Languages
-
- !insertmacro MUI_LANGUAGE "English"
-
-;--------------------------------
-;Installer Sections
-
-Section "Apache Lenya 2.0-dev" SecDummy
-
- Call findJavaPath
- StrCpy $product_name "Apache Lenya 2.0-dev"
- SetOutPath $INSTDIR
-
- SetOutPath $INSTDIR\build\lenya\webapp
- File build\lenya\webapp\global-sitemap.xmap
- File build\lenya\webapp\sitemap.xmap
- File /r build\lenya\webapp\lenya
- File /r build\lenya\webapp\WEB-INF
-
- SetOutPath $INSTDIR
- File lenya.bat
- File build.properties
- File build.xml
- File NOTICE.txt
- File LICENSE.txt
- File README.txt
- File CREDITS.txt
- File /r tools
- File /r legal
-
- CreateDirectory "$SMPROGRAMS\$product_name"
- CreateShortCut "$SMPROGRAMS\$product_name\Apache Lenya Home Page.lnk" \
- "http://lenya.apache.org/"
-
- CreateShortCut "$SMPROGRAMS\$product_name\Welcome to $product_name.lnk" \
- "http://127.0.0.1:8888"
-
- CreateShortCut "$SMPROGRAMS\$product_name\Uninstall $product_name.lnk" \
- "$INSTDIR\Uninstall.exe"
-
- CreateShortCut "$SMPROGRAMS\$product_name\Start $product_name.lnk" \
- "$INSTDIR\lenya.bat" \
- 'servlet' \
- "$INSTDIR\lenya.bat" 1 SW_SHOWNORMAL
-
- ClearErrors
-
- ;Start Apache Lenya, wait 12 seconds to give it time to start, then launch start page
- ExecShell "open" '"$INSTDIR\lenya.bat"' 0 SW_SHOWMINIMIZED
- ;Create uninstaller
- WriteUninstaller "$INSTDIR\Uninstall.exe"
- Sleep 12000
- ExecShell "open" '"http://127.0.0.1:8888"' 0 SW_SHOWNORMAL
- Quit
-SectionEnd
-
-;--------------------------------
-;Descriptions
-
- LangString DESC_SecDummy ${LANG_ENGLISH} "Installs the Apache Lenya 2.0-dev Content Management System."
-
- !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
- !insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-;--------------------------------
-;Uninstaller Section
-
-Section "Uninstall"
- RMDir /r "$SMPROGRAMS\Apache Lenya 2.0-dev"
- RMDir /r "$INSTDIR"
-SectionEnd
-
-; =====================
-; FindJavaPath Function
-; =====================
-;
-; Find the JAVA_HOME used on the system, and put the result on the top of the
-; stack
-; Will exit if the path cannot be determined
-;
-Function findJavaPath
-
- ClearErrors
-
- ReadEnvStr $1 JAVA_HOME
-
- IfErrors 0 FoundJDK
-
- ClearErrors
-
- ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"
- ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$2" "JavaHome"
- ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
- ReadRegStr $4 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$3" "RuntimeLib"
-
- FoundJDK:
-
- IfErrors 0 NoAbort
- MessageBox MB_OK "Couldn't find a Java Development Kit installed on this \
-computer. Please download one from http://java.sun.com. If there is already \ a JDK installed on this computer, set an environment variable JAVA_HOME to the \ pathname of the directory where it is installed."
- Abort
-
- NoAbort:
-
- ; Put the result in the stack
- Push $1
-
-FunctionEnd
diff --git a/trunk/lenya.sh b/trunk/lenya.sh
deleted file mode 100755
index b19d2b8..0000000
--- a/trunk/lenya.sh
+++ /dev/null
@@ -1,218 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# -----------------------------------------------------------------------------
-# Lenya Unix Shell Script
-#
-# $Id$
-# -----------------------------------------------------------------------------
-
-# Configuration variables
-#
-# LENYA_HOME
-# The root of the Lenya distribution
-#
-# LENYA_WEBAPP_HOME
-# The root of the Lenya web application
-#
-# LENYA_LIB
-# Folder containing all the library files needed by the Lenya CLI
-#
-# JAVA_HOME
-# Home of Java installation.
-#
-# JAVA_OPTIONS
-# Extra options to pass to the JVM
-#
-# JAVA_DEBUG_ARGS
-# The command line arguments for the internal JVM debugger
-#
-# JAVA_PROFILE_ARGS
-# The command line arguments for the internal JVM profiler
-#
-# JETTY_PORT
-# Override the default port for Jetty
-#
-# JETTY_ADMIN_PORT
-# The port where the jetty web administration should bind
-#
-
-
-usage()
-{
- echo "Usage: $0 (action)"
- echo "actions:"
- echo " cli Run Lenya from the command line"
- echo " servlet Run Lenya in a servlet container"
- echo " servlet-admin Run Lenya in a servlet container and turn on container web administration"
- echo " servlet-debug Run Lenya in a servlet container and turn on JVM remote debug"
- echo " servlet-profile Run Lenya in a servlet container and turn on JVM profiling"
- exit 1
-}
-
-#[ $# -gt 0 ] || usage
-
-DEFAULT_ACTION="servlet"
-ACTION=$1
-if [ -n "$ACTION" ]
-then
- shift
-else
- ACTION=$DEFAULT_ACTION
- echo "$0: executing default action '$ACTION', use -h to see other actions"
-fi
-ARGS="$*"
-
-# ----- Verify and Set Required Environment Variables -------------------------
-
-if [ "$JAVA_HOME" = "" ] ; then
- echo You must set JAVA_HOME to point at your Java Development Kit installation
- exit 1
-fi
-
-if [ "$JAVA_OPTIONS" = "" ] ; then
- JAVA_OPTIONS='-Xms32M -Xmx512M -Djava.awt.headless=true'
-fi
-
-if [ "$LENYA_HOME" = "" ] ; then
- LENYA_HOME='.'
- # TODO: Make it startable from any directory
- #LENYA_HOME=`dirname $0`
- #echo "LENYA_HOME: $LENYA_HOME"
-fi
-
-if [ "$LENYA_WEBAPP_HOME" = "" ] ; then
- STANDALONE_WEBAPP=../webapp
- if [ -d $STANDALONE_WEBAPP ] ; then
- # for standalone-webapp setup
- LENYA_WEBAPP_HOME=$STANDALONE_WEBAPP
- else
- # when in the build environment
- LENYA_WEBAPP_HOME="$LENYA_HOME/build/lenya/webapp"
- fi
-fi
-echo "$0: using $LENYA_WEBAPP_HOME as the webapp directory"
-
-if [ "$LENYA_LIB" = "" ] ; then
- LENYA_LIB="$LENYA_WEBAPP_HOME/WEB-INF/lib"
-fi
-
-
-# Set Jetty Port
-if [ -f local.build.properties ] ; then
- JETTY_PORT=`grep web.app.server.jetty.port $LENYA_HOME/local.build.properties | grep -v "#" | sed -e 's/web\.app\.server\.jetty\.port=//'`
-fi
-if [ "$JETTY_PORT" = "" ] ; then
- JETTY_PORT=`grep web.app.server.jetty.port $LENYA_HOME/build.properties | grep -v "#" | sed -e 's/web\.app\.server\.jetty\.port=//'`
-fi
-echo "INFO: Jetty Port is $JETTY_PORT"
-
-# Set Jetty Admin Port
-if [ -f local.build.properties ] ; then
- JETTY_ADMIN_PORT=`grep web.app.server.jetty.admin.port $LENYA_HOME/local.build.properties | grep -v "#" | sed -e 's/web\.app\.server\.jetty\.admin\.port=//'`
-fi
-if [ "$JETTY_ADMIN_PORT" = "" ] ; then
- JETTY_ADMIN_PORT=`grep web.app.server.jetty.admin.port $LENYA_HOME/build.properties | grep -v "#" | sed -e 's/web\.app\.server\.jetty\.admin\.port=//'`
-fi
-echo "INFO: Jetty Admin Port is $JETTY_ADMIN_PORT"
-
-if [ "$JAVA_DEBUG_ARGS" = "" ] ; then
- JAVA_DEBUG_ARGS='-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n'
-fi
-
-if [ "$JAVA_PROFILE_ARGS" = "" ] ; then
- JAVA_PROFILE_ARGS='-Xrunhprof:heap=all,cpu=samples,thread=y,depth=3'
-fi
-
-
-# ----- Set platform specific variables
-
-PATHSEP=":";
-case "`uname`" in
- CYGWIN*) PATHSEP=";" ;;
-esac
-
-# ----- Set Local Variables ( used to minimize cut/paste) ---------------------
-
-JAVA="$JAVA_HOME/bin/java"
-ENDORSED_LIBS="${LENYA_HOME}/externals/cocoon_2_1_x/lib/endorsed"
-ENDORSED="-Djava.endorsed.dirs=$ENDORSED_LIBS"
-PARSER=-Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser
-LOADER=Loader
-LOADER_LIB="${LENYA_HOME}/tools/loader"
-
-CLI=-Dloader.main.class=org.apache.lenya.Main
-CLI_LIBRARIES="-Dloader.jar.repositories=$LENYA_LIB"
-
-JETTY=-Dloader.main.class=org.mortbay.jetty.plus.Server
-JETTY_CONF="$LENYA_HOME/tools/jetty/conf"
-JETTY_MAIN="$JETTY_CONF/main.xml"
-JETTY_ADMIN="$JETTY_CONF/admin.xml"
-JETTY_WEBAPP="-Dwebapp=$LENYA_WEBAPP_HOME"
-JETTY_HOME="-Dhome=$LENYA_HOME"
-JETTY_PORT_ARGS="-Djetty.port=$JETTY_PORT"
-JETTY_ADMIN_ARGS="-Djetty.admin.port=$JETTY_ADMIN_PORT"
-JETTY_LIBRARIES="-Dloader.jar.repositories=$LENYA_HOME/tools/jetty/lib${PATHSEP}$LENYA_HOME/tools/jetty/extra/lib${PATHSEP}$LENYA_HOME/tools/jetty/extra/ext${PATHSEP}$LENYA_HOME/tools/jetty/ext${PATHSEP}$LENYA_HOME/tools/jetty/extra/resources${PATHSEP}${ENDORSED_LIBS}"
-JETTY_URI_CHARSET="-Dorg.mortbay.util.URI.charset=ISO-8859-1"
-
-# ----- Do the action ----------------------------------------------------------
-
-if [ -d build ]; then
- echo "INFO: build/lenya/webapp directory already exists."
-else
- if [ -f lenya.war ]; then
- echo "INFO: lenya.war will be unpacked ..."
- mkdir -p build/lenya/webapp
- cp lenya.war build/lenya/webapp/.
- cd build/lenya/webapp
- $JAVA_HOME/bin/jar -xf lenya.war
- cd ../../..
- mkdir -p build/lenya/webapp/WEB-INF/logs
- rm build/lenya/webapp/lenya.war
- else
- echo "INFO: No such war file lenya.war or build directory!"
- exit 1
- fi
-fi
-
-case "$ACTION" in
- cli)
- $JAVA $JAVA_OPTIONS -cp $LOADER_LIB $ENDORSED $CLI_LIBRARIES $CLI $LOADER $ARGS
- ;;
-
- servlet)
- $JAVA $JAVA_OPTIONS -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_PORT_ARGS $JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY_URI_CHARSET $JETTY $LOADER $JETTY_MAIN
- ;;
-
- servlet-admin)
- $JAVA $JAVA_OPTIONS -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_PORT_ARGS $JETTY_ADMIN_ARGS $JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY_URI_CHARSET $JETTY $LOADER $JETTY_MAIN $JETTY_ADMIN
- ;;
-
- servlet-debug)
- $JAVA $JAVA_OPTIONS $JAVA_DEBUG_ARGS -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_PORT_ARGS $JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY_URI_CHARSET $JETTY $LOADER $JETTY_MAIN
- ;;
-
- servlet-profile)
- $JAVA $JAVA_OPTIONS $JAVA_PROFILE_ARGS -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_ARGS $JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY_URI_CHARSET $JETTY $LOADER $JETTY_MAIN
- ;;
-
- *)
- usage
- ;;
-esac
-
-exit 0
diff --git a/trunk/lib/commons-codec-1.3.jar b/trunk/lib/commons-codec-1.3.jar
deleted file mode 100644
index 957b675..0000000
--- a/trunk/lib/commons-codec-1.3.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/commons-validator-1.3.1.jar b/trunk/lib/commons-validator-1.3.1.jar
deleted file mode 100644
index 55b12b1..0000000
--- a/trunk/lib/commons-validator-1.3.1.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/excalibur-testcase-1.0.jar b/trunk/lib/excalibur-testcase-1.0.jar
deleted file mode 100644
index 90f651b..0000000
--- a/trunk/lib/excalibur-testcase-1.0.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/jackrabbit-1.0-LCR330244.jar b/trunk/lib/jackrabbit-1.0-LCR330244.jar
deleted file mode 100644
index 847b355..0000000
--- a/trunk/lib/jackrabbit-1.0-LCR330244.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/jackrabbit-commons-1.0-LCR330244.jar b/trunk/lib/jackrabbit-commons-1.0-LCR330244.jar
deleted file mode 100644
index e03e04a..0000000
--- a/trunk/lib/jackrabbit-commons-1.0-LCR330244.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/jcifs-mock.jar b/trunk/lib/jcifs-mock.jar
deleted file mode 100644
index 2a5fdd3..0000000
--- a/trunk/lib/jcifs-mock.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/jcr-1.0.jar b/trunk/lib/jcr-1.0.jar
deleted file mode 100644
index dcb71cf..0000000
--- a/trunk/lib/jcr-1.0.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/jing-20030619.jar b/trunk/lib/jing-20030619.jar
deleted file mode 100644
index 6acbfb0..0000000
--- a/trunk/lib/jing-20030619.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/junit-3.8.1.jar b/trunk/lib/junit-3.8.1.jar
deleted file mode 100644
index 674d71e..0000000
--- a/trunk/lib/junit-3.8.1.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/nekodtd-0.1.11.jar b/trunk/lib/nekodtd-0.1.11.jar
deleted file mode 100644
index 96e0c30..0000000
--- a/trunk/lib/nekodtd-0.1.11.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/nekopull-0.2.4.jar b/trunk/lib/nekopull-0.2.4.jar
deleted file mode 100644
index 49b7c28..0000000
--- a/trunk/lib/nekopull-0.2.4.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/websphinx-0.5.jar b/trunk/lib/websphinx-0.5.jar
deleted file mode 100644
index 0fefd94..0000000
--- a/trunk/lib/websphinx-0.5.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/xercesImpl-2.9.0.jar b/trunk/lib/xercesImpl-2.9.0.jar
deleted file mode 100644
index 50df930..0000000
--- a/trunk/lib/xercesImpl-2.9.0.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/xml-apis-1.3.04.jar b/trunk/lib/xml-apis-1.3.04.jar
deleted file mode 100644
index d42c0ea..0000000
--- a/trunk/lib/xml-apis-1.3.04.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/xml-forrest-r428652.jar b/trunk/lib/xml-forrest-r428652.jar
deleted file mode 100644
index 38ef09d..0000000
--- a/trunk/lib/xml-forrest-r428652.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/lib/xmlunit1.0.jar b/trunk/lib/xmlunit1.0.jar
deleted file mode 100644
index 6e8ed58..0000000
--- a/trunk/lib/xmlunit1.0.jar
+++ /dev/null
Binary files differ
diff --git a/trunk/src/README_AC.txt b/trunk/src/README_AC.txt
deleted file mode 100644
index ccb0fec..0000000
--- a/trunk/src/README_AC.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-Access Control Specification
-
- * Possibility to deny permissions
-
-Terminology
-
- * An accreditable is either a user, a group, an IP range, or the world.
- * A credential is an assignment of a role to an accreditable.
-
-Names
-
- * We use the following names:
- o n - a node
- o parent(n) - the parent node of n
- o n.c1, ..., n.ci - the credentials of the node n
- o acc(c) - the accreditable which the credential refers to
- o role(c) - the role which the credential assignes to the accreditable
- o method(c) - the method of the credential
-
-Concept
-
- * Credential methods can be grant or deny.
- * The order of credentials at a node is important.
- * To find out if a certain accreditable a has a role r for the node n, use the following algorithm:
- o Search for the first matching credential, starting with the first credential of the node n.
- o If no credential of n matches the accreditable, continue with the parent node.
- o When a credential is found which assigns the role r to the accreditable a, return the method of the credential.
- o If no credential is found up to the top, return deny.
-
-Role resolving algorithm
-
- * while not matched:
- o for c : n.ci to n.c1:
- + if acc(c) = a and role(c) = r, return method(c)
- o n := parent(n)
- * return deny
-
-User interface
-
-The user interface has to allow the following operations:
-
- * add/remove credentials for users, groups, world
- * set the credential method
- * change credential order (move up/down)
-
-**************************************************************
-Examples:
-*********
-Like stated above the order of the credential is important.
-Credentials are builded from policies.
-Imaginge you are trying to access http://localhost:8888/default/introduction.html
-
-The defined policy (with highest priority) would be:
-config/ac/policies/introduction.html/subtree-policy.acml
-
-Imaginge you have defined:
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
- <world>
- <role id="visit" method="deny"/>
- </world>
- <group id="editor">
- <role id="edit" method="grant"/>
- </group>
-</policy>
-
-Then you try to login in with user "lenya" who is in the editor group.
-However you will not be successful, because everybody always is world.
-Since the DENY of world is coming first nobody will now be able to see
-the page.
-
-Changing above policy to
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
- <group id="editor">
- <role id="edit" method="grant"/>
- </group>
- <world>
- <role id="visit" method="deny"/>
- </world>
-</policy>
-
-Let all user of the group editor access the page.
-
-Best practise is to deny access early in a node tree of policies for e.g. WORLD.
\ No newline at end of file
diff --git a/trunk/src/README_MODULES.txt b/trunk/src/README_MODULES.txt
deleted file mode 100644
index ff6c150..0000000
--- a/trunk/src/README_MODULES.txt
+++ /dev/null
@@ -1,93 +0,0 @@
-Module categories:
-==================
-
-The modules in Lenya are currently split up into the following categories:
-
-* modules-core
- This set of modules implements the core functionality of Lenya.
- Modules in the core will not have any dependencies outside of the core.
-
-
-* modules
- This is where most of the add-on functionality goes: support for specific
- editors, document types, the nifty new feature of the day, etc.
-
-
-* modules-optional
- The scratchpad. Modules in here do not necessarily have to work or even
- compile, nor have a stable API. (FIXME: should modules that require
- external code to be useful also be moved here, such as tinymce or
- fckeditor?
-
-
-* modules-legacy
- This is the place for modules that do not adhere to the programming
- conventions of the trunk, but are still needed as no updated version is
- available. For instance, modules that use the 1.2 way of handling usecases
- without using the usecase framework should go here. (FIXME: does that make
- the kupu module a candidate?)
-
-Directory Layout:
-=================
-
-Each module should adhere to the following directory layout (subdirectories
-if appropriate, take a look at the core modules if in doubt):
-
-mymodule/
- config/ configuration files
- module.xml module descriptor
- cocoon-xconf/ patches for cocoon.xconf:
- component-mycomponent.xconf
- usecase-myusecase.xconf
- usecases/
- myusecase.jx usecase view
- java/
- src/ Java source files
- lib/ Java libraries
- xslt/ XSLT stylesheets
- sitemap.xmap main module sitemap
-
-
-module.xml
-==========
-
-Each module must contain a description file config/module.xml:
-
-<module xmlns="http://apache.org/lenya/module/1.0">
- <!-- the ID *must* start with the package name of
- your custom Java code -->
- <id>org.myproject.lenya.modules.myeditor</id>
- <!-- build dependencies; see note below -->
- <depends module="org.apache.lenya.modules.usecase"/>
- <depends module="org.apache.lenya.modules.webdav"/>
- <!-- the Java package your module belongs to -->
-FIXME: why is this needed? afaiu it could be gleaned from the id...
- <package>org.myproject.lenya.modules</package>
- <!-- a version string -->
-FIXME: what does this do? just for information, or is there version
-management?
- <version>0.1-dev</version>
- <!-- a short name for your module -->
- <name>My Own Editor</name>
- <!-- the required lenya version -->
-FIXME: is this actually used?
- <lenya-version>2.0-dev</lenya-version>
- <!-- a detailed description of your module -->
- <description>
- This is my own editor.
- For more information, visit http://myproject.org/editor.
- </description>
-</module>
-
-NOTE: be careful to specify the depencies correctly. The <depends/> element
-is meant for java code dependencies only, i.e. issues that affect
-compilation. If a module merely links to another module's usecases in its
-views, that does not qualify as a dependency (although maybe it should at
-some point in the future).
-
-
-see also:
-=========
-
-Please refer to the online docs at
-http://lenya.apache.org/docs/1_4/reference/modules/index.html.
diff --git a/trunk/src/cocoon/local.blocks.properties b/trunk/src/cocoon/local.blocks.properties
deleted file mode 100644
index 14ce102..0000000
--- a/trunk/src/cocoon/local.blocks.properties
+++ /dev/null
@@ -1,190 +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.
-#
-
-#------------------------------------------------------------------------------------
-# Blocks properties version to make sure that local.blocks.properties is kept in sync
-# NOTE: Do NOT modify this number unless you are a Dev and want to modify this file
-# NOTE for Devs: Update this number if this file is being updated.
-# Also update the version number within src/targets/init-build.xml
-
-lenya.blocks.properties.version=426603
-lenya.version=2.0-dev
-
-#------------------------------------------------------------------------------#
-# Cocoon Blocks #
-#------------------------------------------------------------------------------#
-
-# Remove blocks from your cocoon distribution by setting the corresponding
-# include property to true or false. The blocks are included by default, i.e. if
-# no property was set.
-
-# NOTE: Don't modify this file directly but make a copy named
-# 'local.blocks.properties' and modify that. The build system will first load
-# 'local.blocks.properties' and properties are immutable in Ant.
-
-# NOTE: "[dependency]" indicates blocks that are required by other blocks.
-# Disabling batik, for example, will result in a RuntimeException when using
-# fop. Dependencies only needed for the block's samples are marked explicitely.
-# This latter information was introduced only short time ago, so do not expect
-# it to be complete.
-
-# NOTE: (to Cocoon committers): blocks.properties is generated from gump.xml
-# using "build generate-blocks.properties". Any changes to blocks definitions
-# must be made in gump.xml, not here.
-
-# All blocks -------------------------------------------------------------------
-
-# Use this property to exclude all blocks at once
-# exclude.all.blocks=true
-
-# Use this property to include all blocks at once
-# include.all.blocks=true
-
-
-# Stable blocks ----------------------------------------------------------------
-
-# Stable blocks are those that can be considered ready for production and
-# will contain components and API that will remain stable and where
-# developers are committed to back compatibility. In short, stuff that you
-# can depend on.
-
-#-----[dependency]: "authentication-fw" depends on "session-fw".
-#-----[dependency]: "authentication-fw" is needed by "portal", "portal-fw".
-include.block.authentication-fw=false
-#-----[dependency]: "batik" is needed by "fop", "tour".
-#include.block.batik=false
-include.block.bsf=false
-#include.block.chaperon=false
-#-----[dependency]: "databases" depends on "xsp".
-#-----[dependency]: "databases" is needed by "hsqldb", "jms", "ojb", "petstore", "repository", "xmldb".
-#include.block.databases=false
-#-----[dependency]: "fop" depends on "batik".
-#-----[dependency]: "fop" is needed by "tour".
-#include.block.fop=false
-#-----[dependency]: "hsqldb" depends on "databases".
-#-----[dependency]: "hsqldb" is needed by "jms", "ojb", "petstore".
-#include.block.hsqldb=false
-#include.block.html=false
-#-----[dependency]: "itext" depends on "xsp" (for samples).
-include.block.itext=false
-include.block.jfor=false
-include.block.jsp=false
-#-----[dependency]: "linkrewriter" depends on "xsp".
-#include.block.linkrewriter=false
-#-----[dependency]: "lucene" is needed by "querybean".
-include.block.lucene=true
-include.block.midi=false
-#include.block.naming=false
-#-----[dependency]: "ojb" depends on "databases" (for samples), "forms" (for samples), "hsqldb" (for samples).
-#-----[dependency]: "ojb" is needed by "javaflow", "portal", "querybean".
-include.block.ojb=false
-include.block.paranoid=false
-include.block.poi=false
-#-----[dependency]: "portal" depends on "authentication-fw", "cron", "forms", "ojb", "session-fw".
-#-----[dependency]: "portal" is needed by "faces".
-include.block.portal=false
-#include.block.profiler=false
-#-----[dependency]: "python" depends on "xsp".
-include.block.python=false
-#-----[dependency]: "session-fw" depends on "xsp".
-#-----[dependency]: "session-fw" is needed by "authentication-fw", "portal", "portal-fw".
-#include.block.session-fw=false
-#-----[dependency]: "velocity" is needed by "petstore".
-include.block.velocity=false
-include.block.web3=false
-#-----[dependency]: "xmldb" depends on "databases".
-# TODO: Including the xmldb block might cause a conflict with the patched xmldb libraries lib/xmldb-common-2003-09-02.jar and lib/xmldb-xupdate-2003-10-14.jar
-include.block.xmldb=false
-#-----[dependency]: "xsp" is needed by "databases", "itext", "linkrewriter", "python", "session-fw", "woody".
-#include.block.xsp=false
-
-# Deprecated blocks ------------------------------------------------------------
-
-# Although some of these blocks may have been stable, they are now deprecated
-# in favour of other blocks and therefore are excluded by default from the build.
-# For including one of them you have to set the exclude property into comment in
-# blocks.properties.
-
-include.block.php=false
-#-----[dependency]: "portal-fw" depends on "authentication-fw", "session-fw".
-include.block.portal-fw=false
-include.block.swf=false
-#-----[dependency]: "woody" depends on "xsp" (for samples).
-include.block.woody=false
-
-# Unstable blocks --------------------------------------------------------------
-
-# Unstable blocks are currently under development and do not guarantee that the
-# contracts they expose (API, xml schema, properties, behavior) will remain
-# constant in time. Developers are not committed to back-compatibility just yet.
-# This doesn't necessarily mean the blocks implementation is unstable or
-# the code can't be trusted for production, but use with care and watch
-# its development as things might change over time before they are marked
-# stable.
-
-#-----[dependency]: "ajax" is needed by "forms".
-#include.block.ajax=false
-#-----[dependency]: "apples" depends on "forms" (for samples).
-include.block.apples=false
-#-----[dependency]: "asciiart" is needed by "mail".
-include.block.asciiart=true
-include.block.axis=true
-#include.block.captcha=false
-#-----[dependency]: "cron" is needed by "jms", "portal".
-include.block.cron=true
-#include.block.deli=false
-#-----[dependency]: "eventcache" depends on "jms".
-#-----[dependency]: "eventcache" is needed by "repository".
-include.block.eventcache=false
-#-----[dependency]: "faces" depends on "portal", "taglib".
-include.block.faces=false
-#-----[dependency]: "forms" depends on "ajax".
-#-----[dependency]: "forms" is needed by "apples", "javaflow", "ojb", "petstore", "portal", "querybean", "tour".
-#include.block.forms=false
-#include.block.imageop=false
-#-----[dependency]: "javaflow" depends on "forms", "ojb".
-include.block.javaflow=false
-#include.block.jcr=false
-#-----[dependency]: "jms" depends on "cron", "databases" (for samples), "hsqldb".
-#-----[dependency]: "jms" is needed by "eventcache", "slide".
-include.block.jms=false
-include.block.linotype=false
-#-----[dependency]: "mail" depends on "asciiart".
-include.block.mail=true
-#-----[dependency]: "petstore" depends on "databases", "forms", "hsqldb", "velocity".
-include.block.petstore=false
-#include.block.proxy=false
-include.block.qdox=false
-#-----[dependency]: "querybean" depends on "forms" (for samples), "lucene", "ojb".
-#include.block.querybean=false
-#-----[dependency]: "repository" depends on "databases", "eventcache".
-#-----[dependency]: "repository" is needed by "slide", "webdav".
-include.block.repository=false
-#include.block.serializers=false
-#-----[dependency]: "slide" depends on "jms", "repository".
-include.block.slide=false
-#-----[dependency]: "slop" is needed by "tour".
-include.block.slop=false
-include.block.stx=false
-#-----[dependency]: "taglib" is needed by "faces".
-include.block.taglib=false
-#-----[dependency]: "tour" depends on "batik", "fop", "forms", "slop".
-include.block.tour=false
-#include.block.validation=false
-#-----[dependency]: "webdav" depends on "repository".
-include.block.webdav=false
-#include.block.xsltal=false
diff --git a/trunk/src/cocoon/local.build.properties b/trunk/src/cocoon/local.build.properties
deleted file mode 100644
index 46e74fa..0000000
--- a/trunk/src/cocoon/local.build.properties
+++ /dev/null
@@ -1,202 +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.
-#
-
-#------------------------------------------------------------------------------------
-# Build properties version to make sure that local.build.properties is kept in sync
-# NOTE: Do NOT modify this number unless you are a Dev and want to modify this file
-# NOTE for Devs: Update this number if this file is being updated.
-# Also update the version number within src/targets/init-build.xml
-
-lenya.build.properties.version=529161
-lenya.version=2.0-dev
-
-#----------------------------------------------
-# Cocoon Build Properties
-#----------------------------------------------
-
-# NOTE: don't modify this file directly but copy the properties you need
-# to modify over to a file named 'local.build.properties' and modify that.
-# The build system will override these properties with the ones in the
-# 'local.build.properties' file.
-
-# ---- Webapp ------------------------------------------------------------------
-
-exclude.webapp.documentation=true
-exclude.webapp.javadocs=true
-exclude.webapp.idldocs=true
-exclude.webapp.samples=true
-
-# ---- Build Exclusions --------------------------------------------------------
-
-exclude.deprecated=true
-exclude.documentation=true
-exclude.javadocs=true
-#include.sources-in-jars=true
-
-# ---- Configuration -----------------------------------------------------------
-
-#include.driver.oracle=true
-#include.driver.postgre=true
-#include.driver.odbc=true
-config.allow-reloads=false
-
-# TODO: Since externals/cocoon_2_1_x/src/webapp/WEB-INF/web.xml is true already this won't help ...
-config.enable-uploads=false
-#config.enable-instrumentation=true
-
-# ---- Validation --------------------------------------------------------------
-
-#exclude.validate.config=true
-exclude.validate.xdocs=true
-#exclude.validate.jars=true
-
-# ---- Forrest -----------------------------------------------------------------
-
-# set $FORREST_HOME and $PATH as instructed by Forrest
-
-# ---- Anteater ----------------------------------------------------------------
-
-anteater.home = /default-from-build.properties/anteater-0.9.16
-anteater.target.host = localhost
-anteater.target.port = 8888
-anteater.target.base.path = /
-anteater.option.haltonerror = true
-
-# disable some long-running tests by default
-# anteater.test.bug26186InternalRequestMemoryLeak.enabled = true
-
-# ---- JUnit -------------------------------------------------------------------
-
-junit.test.debugport=8000
-#junit.testcase=org.apache.cocoon.util.test.NetUtilsTestCase
-
-# ---- Build -------------------------------------------------------------------
-
-build.root=build
-build=${build.root}/${name}-${version}
-build.dest=${build}/classes
-build.mocks=${build}/mocks
-build.test=${build}/test
-build.test.output=${build.test}/output
-build.docs=${build}/docs
-build.docs.printer=${build}/printer-docs
-build.site=${build}/site
-build.xdocs=${build}/xdocs
-build.javadocs=${build}/javadocs
-build.context=${build}/documentation
-build.context.printer=${build}/printer-documentation
-build.blocks=${build}/blocks
-build.deprecated=${build}/deprecated
-build.samples=${build}/samples
-build.temp=${build}/temp
-build.mounttable=../../mount-table.xml
-
-build.docs.loglevel=ERROR
-build.docs.printer.loglevel=ERROR
-
-# ------ Webapp Build Properties -----------------------------------------------
-
-build.webapp=${build.root}/webapp
-build.webapp.webinf=${build.webapp}/WEB-INF
-build.webapp.classes=${build.webapp.webinf}/classes
-build.webapp.lib=${build.webapp.webinf}/lib
-build.webapp.samples=${build.webapp}/samples
-build.webapp.test-suite=${build.webapp}/test-suite
-build.webapp.docs=${build.webapp}/docs
-build.webapp.javadocs=${build.webapp}/api/java
-build.webapp.loglevel=INFO
-build.war=${build}/${name}.war
-
-# ------ Standalone-demo Build Properties --------------------------------------
-build.standalone.demo=${build.root}/standalone-demo
-
-# ---- Compilation -------------------------------------------------------------
-
-compiler=modern
-compiler.debug=on
-compiler.optimize=on
-compiler.deprecation=off
-compiler.nowarn=on
-source.vm=1.4
-
-
-# ------ System Properties -----------------------------------------------------
-
-# WARNING: you shouldn't need to modify anything below here since there is a
-# very high change of breaking the build system. Do it only if you know what
-# you're doing.
-
-packages=org.apache
-
-# Project descriptor
-gump.descriptor=gump.xml
-
-# Directory Layout
-src=src
-java=${src}/java
-mocks=${src}/mocks
-test=${src}/test
-resources=${src}/resources
-resources.styles=${resources}/styles
-resources.logos=${resources}/logos
-resources.javadoc=${resources}/javadoc
-documentation=${src}/documentation
-docs=${documentation}/xdocs
-images=${documentation}/images
-blocks=${src}${file.separator}blocks
-samples=${src}/samples
-webapp=${src}/webapp
-webapp.samples=${webapp}/samples
-webapp.test-suite=${webapp}/test-suite
-customconf=${src}/confpatch
-
-# Deprecated Stuff
-deprecated=${src}/deprecated
-deprecated.src=${deprecated}/java
-deprecated.conf=${deprecated}/conf
-
-# Tools
-tools=tools
-tools.lib=${tools}/lib
-tools.src=${tools}/src
-tools.tasks.src=${tools.src}/anttasks
-tools.tasks.dest=${tools}/anttasks
-tools.loader.src=${tools.src}/loader
-tools.loader.dest=${tools}/loader
-tools.jetty=${tools}/jetty
-
-# IDE
-ide.eclipse.outputdir=${build.root}/eclipse/classes
-ide.eclipse.export.libs=false
-
-# Libraries
-lib=lib
-lib.core=${lib}/core
-lib.endorsed=${lib}/endorsed
-lib.optional=${lib}/optional
-lib.local=${lib}/local
-
-# Distribution Directories
-dist.root=dist
-dist=${dist.root}/${name}-${version}
-dist.name=${name}-${version}
-dist.target=${dist.root}
-
-# Site Directory
-site=../cocoon-site/site/2.1
-
-# Legal
-legal=legal
diff --git a/trunk/src/confpatch/enable-uploads.xweb b/trunk/src/confpatch/enable-uploads.xweb
deleted file mode 100644
index e30b3b1..0000000
--- a/trunk/src/confpatch/enable-uploads.xweb
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.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.
--->
-
-<!-- http://wiki.apache.org/cocoon/XPatchTaskUsage -->
-
-<xweb xpath="/web-app/servlet/init-param[param-name='enable-uploads']/param-value"
- if-prop="enable.uploads"
- remove="/web-app/servlet/init-param[param-name='enable-uploads']/param-value/text()"
->true</xweb>
diff --git a/trunk/src/confpatch/form-encoding.xweb b/trunk/src/confpatch/form-encoding.xweb
deleted file mode 100644
index 5d69445..0000000
--- a/trunk/src/confpatch/form-encoding.xweb
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.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.
--->
-<xweb xpath="/web-app/servlet/init-param[param-name='form-encoding']/param-value"
- remove="/web-app/servlet/init-param[param-name='form-encoding']/param-value/text()"
->UTF-8</xweb>
\ No newline at end of file
diff --git a/trunk/src/confpatch/log4j-appender.xconf b/trunk/src/confpatch/log4j-appender.xconf
deleted file mode 100644
index 8927ab2..0000000
--- a/trunk/src/confpatch/log4j-appender.xconf
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.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.
--->
-
-<xconf xpath="/configuration" unless="/configuration/appender[@name='Chainsaw']" insert-after="appender">
-
- <!--+
- | See http://logging.apache.org/log4j/docs/chainsaw.html
- +-->
- <appender name="Chainsaw" class="org.apache.log4j.net.SocketAppender">
- <param name="remoteHost" value="localhost" />
- <param name="port" value="4445"/>
- <param name="locationInfo" value="true" />
- </appender>
-
-</xconf>
diff --git a/trunk/src/confpatch/log4j-appenderref.xconf b/trunk/src/confpatch/log4j-appenderref.xconf
deleted file mode 100644
index b12c9cb..0000000
--- a/trunk/src/confpatch/log4j-appenderref.xconf
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.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.
--->
-
-<xconf xpath="/configuration/root" unless="/configuration/root/appender-ref[@ref='Chainsaw'] or /configuration/root/node()[self::comment() and contains(., 'appender-ref ref="Chainsaw"')]" insert-after="appender-ref">
-
- <!--+
- | Uncomment to enable logging to Chainsaw.
- | See http://logging.apache.org/log4j/docs/chainsaw.html
- +-->
- <!--
- <appender-ref ref="Chainsaw" />
- -->
-</xconf>
diff --git a/trunk/src/confpatch/log4j-logger.xconf b/trunk/src/confpatch/log4j-logger.xconf
deleted file mode 100644
index e861fc6..0000000
--- a/trunk/src/confpatch/log4j-logger.xconf
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.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.
--->
-
-<xconf xpath="/configuration" unless="/configuration/logger[@name='org.mortbay.http.ContextLoader']" insert-after="appender">
-
- <logger name="org.mortbay.http.ContextLoader">
- <level value="warn"/>
- </logger>
-</xconf>
diff --git a/trunk/src/confpatch/logger-class.xweb b/trunk/src/confpatch/logger-class.xweb
deleted file mode 100644
index 28a5c1c..0000000
--- a/trunk/src/confpatch/logger-class.xweb
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.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.
--->
-<xweb xpath="/web-app/servlet[servlet-name = 'Cocoon']"
- unless="init-param[param-name = 'logger-class' and
- normalize-space(param-value) = 'org.apache.avalon.excalibur.logger.Log4JLoggerManager']"
- insert-after="init-param[position() = last()]">
- <init-param>
- <param-name>logger-class</param-name>
- <param-value>org.apache.avalon.excalibur.logger.Log4JLoggerManager</param-value>
- </init-param>
- <init-param>
- <param-name>log4j-config</param-name>
- <param-value>/WEB-INF/log4j.xconf</param-value>
- </init-param>
-</xweb>
\ No newline at end of file
diff --git a/trunk/src/confpatch/logkit-categories.xconf b/trunk/src/confpatch/logkit-categories.xconf
deleted file mode 100644
index 70da51a..0000000
--- a/trunk/src/confpatch/logkit-categories.xconf
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.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.
--->
-
-<xconf xpath="/logkit/categories" unless="category[@name='lenya']">
- <category name="lenya" log-level="INFO">
- <log-target id-ref="lenya"/>
- <log-target id-ref="error"/>
- </category>
-</xconf>
diff --git a/trunk/src/confpatch/logkit-targets.xconf b/trunk/src/confpatch/logkit-targets.xconf
deleted file mode 100644
index cef080f..0000000
--- a/trunk/src/confpatch/logkit-targets.xconf
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.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.
--->
-
-<xconf xpath="/logkit/targets" unless="cocoon[@id='lenya']">
- <cocoon id="lenya">
- <filename>${context-root}/WEB-INF/logs/lenya.log</filename>
- <format type="cocoon">
- %7.7{priority} %{time} [%{category}] (%{uri}) %{thread}/%{class:short}: %{message}\n%{throwable}
- </format>
- <append>false</append>
- </cocoon>
-</xconf>
diff --git a/trunk/src/confpatch/overwrite-uploads.xweb b/trunk/src/confpatch/overwrite-uploads.xweb
deleted file mode 100644
index 4c40eda..0000000
--- a/trunk/src/confpatch/overwrite-uploads.xweb
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.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.
--->
-<xweb xpath="/web-app/servlet/init-param[param-name='overwrite-uploads']/param-value"
- remove="/web-app/servlet/init-param[param-name='overwrite-uploads']/param-value/text()"
->allow</xweb>
\ No newline at end of file
diff --git a/trunk/src/confpatch/session-listener.xweb b/trunk/src/confpatch/session-listener.xweb
deleted file mode 100644
index bc6f785..0000000
--- a/trunk/src/confpatch/session-listener.xweb
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.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.
--->
-
-<xweb xpath="/web-app" unless="listener" insert-before="node()[1]">
-
- <listener>
- <!--
- - Listen for new sessions and store the objects in a HashMap
- -->
- <listener-class>org.apache.lenya.util.SessionListener</listener-class>
- </listener>
-
-</xweb>
diff --git a/trunk/src/confpatch/upload-max-size.xweb b/trunk/src/confpatch/upload-max-size.xweb
deleted file mode 100644
index 80ada86..0000000
--- a/trunk/src/confpatch/upload-max-size.xweb
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.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.
--->
-
-<xweb xpath="/web-app/servlet/init-param[param-name='upload-max-size']/param-value"
- remove="/web-app/servlet/init-param[param-name='upload-max-size']/param-value/text()"
->10000000</xweb>
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/metadata/ConfigurableElementSet.java b/trunk/src/impl/java/org/apache/lenya/cms/metadata/ConfigurableElementSet.java
deleted file mode 100644
index 77cd67c..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/metadata/ConfigurableElementSet.java
+++ /dev/null
@@ -1,113 +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.lenya.cms.metadata;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.avalon.framework.thread.ThreadSafe;
-
-/**
- * Avalon-based element set.
- */
-public class ConfigurableElementSet extends AbstractLogEnabled implements ElementSet, Configurable,
- ThreadSafe, Initializable, Serviceable {
-
- private String namespaceUri;
- private Map elements = new HashMap();
-
- public void configure(Configuration config) throws ConfigurationException {
-
- this.namespaceUri = config.getAttribute("name");
-
- Configuration[] attributeConfigs = config.getChildren("element");
- for (int i = 0; i < attributeConfigs.length; i++) {
- String name = attributeConfigs[i].getAttribute("name");
- boolean isMultiple = attributeConfigs[i].getAttributeAsBoolean("multiple", false);
- boolean isEditable = attributeConfigs[i].getAttributeAsBoolean("editable", false);
- String actionOnCopy = attributeConfigs[i].getAttribute("onCopy", "copy");
- ElementImpl element = new ElementImpl(name, isMultiple, isEditable);
- int action;
- if (actionOnCopy.equalsIgnoreCase("copy")) {
- action = Element.ONCOPY_COPY;
- }
- else if (actionOnCopy.equalsIgnoreCase("ignore")) {
- action = Element.ONCOPY_IGNORE;
- }
- else if (actionOnCopy.equalsIgnoreCase("delete")) {
- action = Element.ONCOPY_DELETE;
- }
- else {
- throw new ConfigurationException("The action [" + actionOnCopy + "] is not supported.");
- }
- try {
- element.setActionOnCopy(action);
- } catch (MetaDataException e) {
- throw new RuntimeException(e);
- }
- this.elements.put(name, element);
- }
-
- }
-
- public Element[] getElements() {
- Collection values = this.elements.values();
- return (Element[]) values.toArray(new Element[values.size()]);
- }
-
- public Element getElement(String name) {
- return (Element) this.elements.get(name);
- }
-
- public String getNamespaceUri() {
- return this.namespaceUri;
- }
-
- public boolean containsElement(String name) {
- return this.elements.keySet().contains(name);
- }
-
- public void initialize() throws Exception {
- MetaDataRegistry registry = null;
- try {
- registry = (MetaDataRegistry) this.manager.lookup(MetaDataRegistry.ROLE);
- registry.register(getNamespaceUri(), this);
- }
- finally {
- if (registry != null) {
- this.manager.release(registry);
- }
- }
- }
-
- private ServiceManager manager;
-
- public void service(ServiceManager manager) throws ServiceException {
- this.manager = manager;
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/metadata/ElementImpl.java b/trunk/src/impl/java/org/apache/lenya/cms/metadata/ElementImpl.java
deleted file mode 100644
index 0b81712..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/metadata/ElementImpl.java
+++ /dev/null
@@ -1,84 +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.lenya.cms.metadata;
-
-/**
- * Element implementation.
- */
-public class ElementImpl implements Element {
-
- private String name;
- private boolean multiple;
- private String description = "";
- private boolean editable;
-
- /**
- * Ctor.
- * @param name The name.
- * @param isMultiple if the element can have multiple values.
- * @param isEditable if the element can be edited.
- */
- public ElementImpl(String name, boolean isMultiple, boolean isEditable) {
- this.name = name;
- this.multiple = isMultiple;
- this.editable = isEditable;
- }
-
- /**
- * Ctor.
- * @param name The name.
- * @param isMultiple if the element can have multiple values.
- * @param isEditable if the element can be edited.
- * @param description The description of the element.
- */
- public ElementImpl(String name, boolean isMultiple, boolean isEditable, String description) {
- this(name, isMultiple, isEditable);
- this.description = description;
- }
-
- public String getName() {
- return this.name;
- }
-
- public boolean isMultiple() {
- return this.multiple;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public boolean isEditable() {
- return this.editable;
- }
-
- private int actionOnCopy;
-
- public int getActionOnCopy() {
- return this.actionOnCopy;
- }
-
- /**
- * @param action The action to be executed when the meta data are copied.
- * @throws MetaDataException if the action is not supported.
- */
- public void setActionOnCopy(int action) throws MetaDataException {
- this.actionOnCopy = action;
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/metadata/MetaDataRegistryImpl.java b/trunk/src/impl/java/org/apache/lenya/cms/metadata/MetaDataRegistryImpl.java
deleted file mode 100644
index 20a1d41..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/metadata/MetaDataRegistryImpl.java
+++ /dev/null
@@ -1,60 +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.lenya.cms.metadata;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.thread.ThreadSafe;
-
-/**
- * Meta data registry implementation.
- */
-public class MetaDataRegistryImpl extends AbstractLogEnabled implements MetaDataRegistry,
- ThreadSafe {
-
- public ElementSet getElementSet(String namespaceUri) throws MetaDataException {
- if (!isRegistered(namespaceUri)) {
- throw new MetaDataException("The namespace URI [" + namespaceUri
- + "] is not registered.");
- }
- return (ElementSet) this.namespace2set.get(namespaceUri);
- }
-
- public boolean isRegistered(String namespaceUri) throws MetaDataException {
- return this.namespace2set.containsKey(namespaceUri);
- }
-
- private Map namespace2set = new HashMap();
-
- public void register(String namespaceUri, ElementSet elementSet) throws MetaDataException {
- if (this.namespace2set.containsKey(namespaceUri)) {
- throw new MetaDataException("The namespace [" + namespaceUri
- + "] is already registered.");
- }
- this.namespace2set.put(namespaceUri, elementSet);
- }
-
- public String[] getNamespaceUris() throws MetaDataException {
- Set keys = this.namespace2set.keySet();
- return (String[]) keys.toArray(new String[keys.size()]);
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java b/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java
deleted file mode 100644
index 3385b02..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/module/ModuleManagerImpl.java
+++ /dev/null
@@ -1,74 +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.lenya.cms.module;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.thread.ThreadSafe;
-
-/**
- * Module manager implementation.
- */
-public class ModuleManagerImpl extends AbstractLogEnabled implements ModuleManager, ThreadSafe,
- Configurable {
-
- public String getBaseURI(String shortcut) throws ModuleException {
- if (!this.module2src.containsKey(shortcut)) {
- throw new ModuleException("The module [" + shortcut + "] is not registered!");
- }
-
- String baseUri;
- if (this.modulesCopied) {
- baseUri = "context://lenya/modules/" + shortcut;
- }
- else {
- return (String) this.module2src.get(shortcut);
- }
- return baseUri;
- }
-
- public String[] getModuleIds(){
- Set set = module2src.keySet();
- return (String[]) set.toArray(new String[set.size()]);
- }
-
- private boolean modulesCopied = false;
- private Map module2src = new HashMap();
-
- public void configure(Configuration config) throws ConfigurationException {
- Configuration modulesConfig = config.getChild("modules");
- this.modulesCopied = modulesConfig.getAttributeAsBoolean("copy");
-
- Configuration[] modules = modulesConfig.getChildren("module");
- for (int i = 0; i < modules.length; i++) {
- String shortcut = modules[i].getAttribute("shortcut");
- String src = modules[i].getAttribute("src");
- String uri = new File(src).toURI().toString();
- this.module2src.put(shortcut, uri);
- }
-
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java b/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java
deleted file mode 100644
index d3f80c6..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/publication/AreaImpl.java
+++ /dev/null
@@ -1,143 +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.lenya.cms.publication;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.repository.Node;
-import org.apache.lenya.cms.repository.NodeFactory;
-import org.apache.lenya.cms.repository.RepositoryException;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.cms.site.SiteNode;
-import org.apache.lenya.cms.site.SiteStructure;
-
-/**
- * Area implementation.
- */
-public class AreaImpl implements Area {
-
- private String name;
- private Publication pub;
- private DocumentFactory factory;
- private NodeFactory nodeFactory;
- private ServiceManager manager;
-
- /**
- * @param manager The service manager.
- * @param factory The factory.
- * @param pub The publication.
- * @param name The area name.
- */
- public AreaImpl(ServiceManager manager, DocumentFactory factory, Publication pub, String name) {
- this.manager = manager;
- this.factory = factory;
- this.pub = pub;
- this.name = name;
- }
-
- public boolean contains(String uuid, String language) {
- // check site structure first (performance)
- if (getSite().containsByUuid(uuid, language)) {
- return true;
- } else {
- String sourceUri = DocumentImpl.getSourceURI(pub, name, uuid, language);
- try {
- Node node = (Node) getPublication().getSession().getRepositoryItem(
- getNodeFactory(), sourceUri);
- return node.exists();
- } catch (RepositoryException e) {
- throw new RuntimeException(e);
- }
- }
- }
-
- protected NodeFactory getNodeFactory() {
- if (this.nodeFactory == null) {
- try {
- this.nodeFactory = (NodeFactory) this.manager.lookup(NodeFactory.ROLE);
- } catch (ServiceException e) {
- throw new RuntimeException(e);
- }
- }
- return this.nodeFactory;
- }
-
- public Document getDocument(String uuid, String language) throws PublicationException {
- return this.factory.get(getPublication(), getName(), uuid, language);
- }
-
- public String getName() {
- return this.name;
- }
-
- public Publication getPublication() {
- return this.pub;
- }
-
- private SiteStructure site;
-
- public SiteStructure getSite() {
- if (this.site == null) {
- SiteManager siteManager = null;
- ServiceSelector selector = null;
- try {
- selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
- siteManager = (SiteManager) selector.select(getPublication().getSiteManagerHint());
- this.site = siteManager.getSiteStructure(this.factory, getPublication(), getName());
- } catch (Exception e) {
- throw new RuntimeException(e);
- } finally {
- if (selector != null) {
- if (siteManager != null) {
- selector.release(siteManager);
- }
- this.manager.release(selector);
- }
- }
- }
- return this.site;
- }
-
- public String toString() {
- return getPublication().getId() + ":" + getName();
- }
-
- public Document[] getDocuments() {
- SiteNode[] nodes = getSite().getNodes();
- List docs = new ArrayList();
- for (int i = 0; i < nodes.length; i++) {
- if (nodes[i].getUuid() != null) {
- String[] langs = nodes[i].getLanguages();
- for (int l = 0; l < langs.length; l++) {
- try {
- docs.add(nodes[i].getLink(langs[l]).getDocument());
- } catch (SiteException e) {
- throw new RuntimeException(e);
- }
- }
- }
- }
- return (Document[]) docs.toArray(new Document[docs.size()]);
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentFactoryBuilderImpl.java b/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentFactoryBuilderImpl.java
deleted file mode 100644
index f1e5431..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentFactoryBuilderImpl.java
+++ /dev/null
@@ -1,43 +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.lenya.cms.publication;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.lenya.cms.repository.Session;
-
-/**
- * Document factory builder implementation.
- */
-public class DocumentFactoryBuilderImpl extends AbstractLogEnabled implements ThreadSafe,
- DocumentFactoryBuilder, Serviceable {
-
- public DocumentFactory createDocumentFactory(Session session) {
- return new DocumentFactoryImpl(session, this.manager, getLogger());
- }
-
- protected ServiceManager manager;
-
- public void service(ServiceManager manager) throws ServiceException {
- this.manager = manager;
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentFactoryImpl.java b/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentFactoryImpl.java
deleted file mode 100644
index 37b3b2f..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentFactoryImpl.java
+++ /dev/null
@@ -1,355 +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.lenya.cms.publication;
-
-import java.util.Arrays;
-import java.util.StringTokenizer;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.lenya.cms.repository.RepositoryException;
-import org.apache.lenya.cms.repository.RepositoryItem;
-import org.apache.lenya.cms.repository.Session;
-import org.apache.lenya.cms.site.SiteStructure;
-import org.apache.lenya.util.Assert;
-
-/**
- * A DocumentIdentityMap avoids the multiple instanciation of a document object.
- *
- * @version $Id: DocumentIdentityMap.java 264153 2005-08-29 15:11:14Z andreas $
- */
-public class DocumentFactoryImpl extends AbstractLogEnabled implements DocumentFactory {
-
- private Session session;
- protected ServiceManager manager;
-
- /**
- * @return The session.
- */
- public Session getSession() {
- return this.session;
- }
-
- /**
- * Ctor.
- * @param session The session to use.
- * @param manager The service manager.
- * @param logger The logger to use.
- */
- public DocumentFactoryImpl(Session session, ServiceManager manager, Logger logger) {
- this.session = session;
- this.manager = manager;
- ContainerUtil.enableLogging(this, logger);
- }
-
- /**
- * Returns a document.
- * @param publication The publication.
- * @param area The area.
- * @param uuid The document UUID.
- * @param language The language.
- * @return A document.
- * @throws DocumentBuildException if an error occurs.
- */
- public Document get(Publication publication, String area, String uuid, String language)
- throws DocumentBuildException {
- return get(publication, area, uuid, language, -1);
- }
-
- public Document get(Publication publication, String area, String uuid, String language,
- int revision) throws DocumentBuildException {
- if (getLogger().isDebugEnabled())
- getLogger().debug(
- "DocumentIdentityMap::get() called on publication [" + publication.getId()
- + "], area [" + area + "], UUID [" + uuid + "], language [" + language
- + "]");
-
- String key = getKey(publication, area, uuid, language, revision);
-
- if (getLogger().isDebugEnabled())
- getLogger().debug(
- "DocumentIdentityMap::get() got key [" + key + "] from DocumentFactory");
-
- try {
- return (Document) getSession().getRepositoryItem(this, key);
- } catch (RepositoryException e) {
- throw new DocumentBuildException(e);
- }
- }
-
- /**
- * Returns the document identified by a certain web application URL.
- * @param webappUrl The web application URL.
- * @return A document.
- * @throws DocumentBuildException if an error occurs.
- */
- public Document getFromURL(String webappUrl) throws DocumentBuildException {
- String key = getKey(webappUrl);
- try {
- return (Document) getSession().getRepositoryItem(this, key);
- } catch (RepositoryException e) {
- throw new DocumentBuildException(e);
- }
- }
-
- /**
- * Builds a clone of a document for another language.
- * @param document The document to clone.
- * @param language The language of the target document.
- * @return A document.
- * @throws DocumentBuildException if an error occurs.
- */
- public Document getLanguageVersion(Document document, String language)
- throws DocumentBuildException {
- return get(document.getPublication(), document.getArea(), document.getUUID(), language);
- }
-
- /**
- * Builds a clone of a document for another area.
- * @param document The document to clone.
- * @param area The area of the target document.
- * @return A document.
- * @throws DocumentBuildException if an error occurs.
- */
- public Document getAreaVersion(Document document, String area) throws DocumentBuildException {
- return get(document.getPublication(), area, document.getUUID(), document.getLanguage());
- }
-
- /**
- * Builds a document for the default language.
- * @param publication The publication.
- * @param area The area.
- * @param documentId The document ID.
- * @return A document.
- * @throws DocumentBuildException if an error occurs.
- */
- public Document get(Publication publication, String area, String documentId)
- throws DocumentBuildException {
- return get(publication, area, documentId, publication.getDefaultLanguage());
- }
-
- /**
- * Checks if a string represents a valid document ID.
- * @param id The string.
- * @return A boolean value.
- */
- public boolean isValidDocumentId(String id) {
-
- if (!id.startsWith("/")) {
- return false;
- }
-
- String[] snippets = id.split("/");
-
- if (snippets.length < 2) {
- return false;
- }
-
- for (int i = 1; i < snippets.length; i++) {
- if (!snippets[i].matches("[a-zA-Z0-9\\-]+")) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Checks if a webapp URL represents a document.
- * @param webappUrl A web application URL.
- * @return A boolean value.
- * @throws DocumentBuildException if an error occurs.
- */
- public boolean isDocument(String webappUrl) throws DocumentBuildException {
- Assert.notNull("webapp URL", webappUrl);
- PublicationManager pubMgr = getPubManager();
- try {
- URLInformation info = new URLInformation(webappUrl);
- String pubId = info.getPublicationId();
- if (pubId != null && Arrays.asList(pubMgr.getPublicationIds()).contains(pubId)) {
- Publication pub = pubMgr.getPublication(this, pubId);
- DocumentBuilder builder = pub.getDocumentBuilder();
- return builder.isDocument(this, webappUrl);
- } else {
- return false;
- }
- } catch (PublicationException e) {
- throw new DocumentBuildException(e);
- }
- }
-
- /**
- * Builds a document key.
- * @param publication The publication.
- * @param area The area.
- * @param uuid The document UUID.
- * @param language The language.
- * @param revision
- * @return A key.
- */
- public String getKey(Publication publication, String area, String uuid, String language, int revision) {
- Assert.notNull("publication", publication);
- Assert.notNull("area", area);
- Assert.notNull("uuid", uuid);
- Assert.notNull("language", language);
- return publication.getId() + ":" + area + ":" + uuid + ":" + language + ":" + revision;
- }
-
- /**
- * Builds a document key.
- * @param webappUrl The web application URL.
- * @return A key.
- */
- public String getKey(String webappUrl) {
- Assert.notNull("webapp URL", webappUrl);
- try {
- if (!isDocument(webappUrl)) {
- throw new RuntimeException("No document for URL [" + webappUrl + "] found.");
- }
- DocumentLocator locator = getLocator(webappUrl);
- Publication publication = getPublication(locator.getPublicationId());
- String area = locator.getArea();
- String uuid = publication.getArea(area).getSite().getNode(locator.getPath()).getUuid();
- return getKey(publication, area, uuid, locator.getLanguage(), -1);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- protected DocumentLocator getLocator(String webappUrl) {
- DocumentLocator locator;
- try {
- Publication publication = PublicationUtil.getPublicationFromUrl(this.manager, this,
- webappUrl);
- DocumentBuilder builder = publication.getDocumentBuilder();
- locator = builder.getLocator(this, webappUrl);
-
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- return locator;
- }
-
- /**
- * @see org.apache.lenya.transaction.IdentifiableFactory#build(org.apache.lenya.transaction.IdentityMap,
- * java.lang.String)
- */
- public RepositoryItem buildItem(Session session, String key) throws RepositoryException {
- if (getLogger().isDebugEnabled())
- getLogger().debug("DocumentFactory::build() called with key [" + key + "]");
-
- StringTokenizer tokenizer = new StringTokenizer(key, ":");
- String publicationId = tokenizer.nextToken();
- String area = tokenizer.nextToken();
- String uuid = tokenizer.nextToken();
- String language = tokenizer.nextToken();
- String revisionString = tokenizer.nextToken();
- int revision = Integer.valueOf(revisionString).intValue();
-
- Document document;
- try {
- Publication publication = getPublication(publicationId);
- DocumentBuilder builder = publication.getDocumentBuilder();
- DocumentIdentifier identifier = new DocumentIdentifier(publicationId, area, uuid,
- language);
- document = buildDocument(this, identifier, revision, builder);
- } catch (Exception e) {
- throw new RepositoryException(e);
- }
- if (getLogger().isDebugEnabled())
- getLogger().debug("DocumentFactory::build() done.");
-
- return document;
- }
-
- protected Document buildDocument(DocumentFactory map, DocumentIdentifier identifier,
- int revision, DocumentBuilder builder) throws DocumentBuildException {
-
- DocumentImpl document = createDocument(map, identifier, revision, builder);
- ContainerUtil.enableLogging(document, getLogger());
- return document;
- }
-
- /**
- * Creates a new document object. Override this method to create specific document objects,
- * e.g., for different document IDs.
- * @param map The identity map.
- * @param identifier The identifier.
- * @param revision The revision or -1 for the latest revision.
- * @param builder The document builder.
- * @return A document.
- * @throws DocumentBuildException when something went wrong.
- */
- protected DocumentImpl createDocument(DocumentFactory map, DocumentIdentifier identifier,
- int revision, DocumentBuilder builder) throws DocumentBuildException {
- return new DocumentImpl(this.manager, map, identifier, revision, getLogger());
- }
-
- public Document get(DocumentIdentifier identifier) throws DocumentBuildException {
- try {
- Publication pub = getPublication(identifier.getPublicationId());
- return get(pub, identifier.getArea(), identifier.getUUID(), identifier.getLanguage());
- } catch (PublicationException e) {
- throw new DocumentBuildException(e);
- }
- }
-
- public String getItemType() {
- return Document.TRANSACTIONABLE_TYPE;
- }
-
- public Document get(DocumentLocator locator) throws DocumentBuildException {
- try {
- Publication pub = getPublication(locator.getPublicationId());
- SiteStructure site = pub.getArea(locator.getArea()).getSite();
- String uuid = site.getNode(locator.getPath()).getUuid();
- return get(pub, locator.getArea(), uuid, locator.getLanguage());
- } catch (PublicationException e) {
- throw new DocumentBuildException(e);
- }
- }
-
- public Publication getPublication(String id) throws PublicationException {
- return getPubManager().getPublication(this, id);
- }
-
- public Publication[] getPublications() {
- return getPubManager().getPublications(this);
- }
-
- private PublicationManager pubManager;
-
- protected PublicationManager getPubManager() {
- if (this.pubManager == null) {
- try {
- this.pubManager = (PublicationManager) this.manager.lookup(PublicationManager.ROLE);
- } catch (ServiceException e) {
- throw new RuntimeException(e);
- }
- }
- return this.pubManager;
- }
-
- public boolean existsPublication(String id) {
- return Arrays.asList(getPubManager().getPublicationIds()).contains(id);
- }
-
-}
\ No newline at end of file
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentImpl.java b/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentImpl.java
deleted file mode 100644
index f7c25a8..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentImpl.java
+++ /dev/null
@@ -1,688 +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.lenya.cms.publication;
-
-import java.io.File;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.metadata.MetaData;
-import org.apache.lenya.cms.metadata.MetaDataException;
-import org.apache.lenya.cms.publication.util.DocumentVisitor;
-import org.apache.lenya.cms.repository.ContentHolder;
-import org.apache.lenya.cms.repository.Node;
-import org.apache.lenya.cms.repository.NodeFactory;
-import org.apache.lenya.cms.repository.RepositoryException;
-import org.apache.lenya.cms.repository.Session;
-import org.apache.lenya.cms.site.Link;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteStructure;
-import org.apache.lenya.util.Assert;
-
-/**
- * A typical CMS document.
- * @version $Id$
- */
-public class DocumentImpl extends AbstractLogEnabled implements Document {
-
- private DocumentIdentifier identifier;
- private DocumentFactory factory;
- protected ServiceManager manager;
- private int revision = -1;
-
- /**
- * The meta data namespace.
- */
- public static final String METADATA_NAMESPACE = "http://apache.org/lenya/metadata/document/1.0";
-
- /**
- * The name of the resource type attribute. A resource has a resource type; this information can
- * be used e.g. for different rendering of different types.
- */
- protected static final String METADATA_RESOURCE_TYPE = "resourceType";
-
- /**
- * The name of the mime type attribute.
- */
- protected static final String METADATA_MIME_TYPE = "mimeType";
-
- /**
- * The name of the content type attribute. Any content managed by Lenya has a type; this
- * information can be used e.g. to provide an appropriate management interface.
- */
- protected static final String METADATA_CONTENT_TYPE = "contentType";
-
- /**
- * The number of seconds from the request that a document can be cached before it expires
- */
- protected static final String METADATA_EXPIRES = "expires";
-
- /**
- * The extension to use for the document source.
- */
- protected static final String METADATA_EXTENSION = "extension";
-
- /**
- * Creates a new instance of DefaultDocument.
- * @param manager The service manager.
- * @param map The identity map the document belongs to.
- * @param identifier The identifier.
- * @param revision The revision number or -1 if the latest revision should be used.
- * @param _logger a logger
- */
- protected DocumentImpl(ServiceManager manager, DocumentFactory map,
- DocumentIdentifier identifier, int revision, Logger _logger) {
-
- ContainerUtil.enableLogging(this, _logger);
- if (getLogger().isDebugEnabled()) {
- getLogger().debug(
- "DefaultDocument() creating new instance with id [" + identifier.getUUID()
- + "], language [" + identifier.getLanguage() + "]");
- }
-
- if (identifier.getUUID() == null) {
- throw new IllegalArgumentException("The UUID must not be null!");
- }
-
- this.manager = manager;
- this.identifier = identifier;
- this.factory = map;
- this.revision = revision;
-
- if (getLogger().isDebugEnabled()) {
- getLogger().debug(
- "DefaultDocument() done building instance with _id [" + identifier.getUUID()
- + "], _language [" + identifier.getLanguage() + "]");
- }
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getExpires()
- */
- public Date getExpires() throws DocumentException {
- Date expires = null;
- long secs = 0;
-
- MetaData metaData = null;
- String expiresMeta = null;
- try {
- metaData = this.getMetaData(METADATA_NAMESPACE);
- expiresMeta = metaData.getFirstValue("expires");
- } catch (MetaDataException e) {
- throw new DocumentException(e);
- }
- if (expiresMeta != null) {
- secs = Long.parseLong(expiresMeta);
- } else {
- secs = -1;
- }
-
- if (secs != -1) {
- Date date = new Date();
- date.setTime(date.getTime() + secs * 1000l);
- expires = date;
- } else {
- expires = this.getResourceType().getExpires();
- }
-
- return expires;
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getName()
- */
- public String getName() {
- try {
- return getLink().getNode().getName();
- } catch (DocumentException e) {
- throw new RuntimeException(e);
- }
- }
-
- private Publication publication;
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getPublication()
- */
- public Publication getPublication() {
- if (this.publication == null) {
- try {
- this.publication = getFactory().getPublication(getIdentifier().getPublicationId());
- } catch (PublicationException e) {
- throw new RuntimeException(e);
- }
- }
- return this.publication;
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getLastModified()
- */
- public long getLastModified() throws DocumentException {
- try {
- return getRepositoryNode().getLastModified();
- } catch (RepositoryException e) {
- throw new DocumentException(e);
- }
- }
-
- public File getFile() {
- return getPublication().getPathMapper().getFile(getPublication(), getArea(), getUUID(),
- getLanguage());
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getLanguage()
- */
- public String getLanguage() {
- return this.identifier.getLanguage();
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getLanguages()
- */
- public String[] getLanguages() throws DocumentException {
-
- List documentLanguages = new ArrayList();
- String[] allLanguages = getPublication().getLanguages();
-
- if (getLogger().isDebugEnabled()) {
- getLogger().debug("Number of languages of this publication: " + allLanguages.length);
- }
-
- for (int i = 0; i < allLanguages.length; i++) {
- if (existsTranslation(allLanguages[i])) {
- documentLanguages.add(allLanguages[i]);
- }
- }
-
- return (String[]) documentLanguages.toArray(new String[documentLanguages.size()]);
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getArea()
- */
- public String getArea() {
- return this.identifier.getArea();
- }
-
- private String extension = null;
- private String defaultExtension = "html";
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getExtension()
- */
- public String getExtension() {
- if (extension == null) {
- String sourceExtension = getSourceExtension();
- if (sourceExtension.equals("xml") || sourceExtension.equals("")) {
- getLogger().info("Default extension will be used: " + defaultExtension);
- return defaultExtension;
- } else {
- return sourceExtension;
- }
-
- }
- return this.extension;
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getUUID()
- */
- public String getUUID() {
- return getIdentifier().getUUID();
- }
-
- private String defaultSourceExtension = "xml";
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getSourceExtension()
- */
- public String getSourceExtension() {
- String sourceExtension;
- try {
- sourceExtension = getMetaData(METADATA_NAMESPACE).getFirstValue(METADATA_EXTENSION);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- if (sourceExtension == null) {
- getLogger().warn(
- "No source extension for document [" + this + "]. The extension \""
- + defaultSourceExtension + "\" will be used as default!");
- sourceExtension = defaultSourceExtension;
- }
- return sourceExtension;
- }
-
- /**
- * Sets the extension of the file in the URL.
- * @param _extension A string.
- */
- protected void setExtension(String _extension) {
- checkWritability();
- assert _extension != null;
- Assert.isTrue("Extension doesn't start with a dot", !_extension.startsWith("."));
- this.extension = _extension;
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#exists()
- */
- public boolean exists() throws DocumentException {
- try {
- return getRepositoryNode().exists();
- } catch (RepositoryException e) {
- throw new DocumentException(e);
- }
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#existsInAnyLanguage()
- */
- public boolean existsInAnyLanguage() throws DocumentException {
- String[] languages = getLanguages();
-
- if (languages.length > 0) {
- if (getLogger().isDebugEnabled()) {
- getLogger().debug(
- "Document (" + this + ") exists in at least one language: "
- + languages.length);
- }
- String[] allLanguages = getPublication().getLanguages();
- if (languages.length == allLanguages.length)
- // TODO: This is not entirely true, because the publication
- // could assume the
- // languages EN and DE, but the document could exist for the
- // languages DE and FR!
- if (getLogger().isDebugEnabled()) {
- getLogger().debug(
- "Document (" + this
- + ") exists even in all languages of this publication");
- }
- return true;
- } else {
- if (getLogger().isDebugEnabled()) {
- getLogger().debug("Document (" + this + ") does NOT exist in any language");
- }
- return false;
- }
-
- }
-
- public DocumentIdentifier getIdentifier() {
- return this.identifier;
- }
-
- /**
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object object) {
- if (getClass().isInstance(object)) {
- DocumentImpl document = (DocumentImpl) object;
- return document.getIdentifier().equals(getIdentifier());
- }
- return false;
- }
-
- /**
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
-
- String key = getPublication().getId() + ":" + getPublication().getServletContext() + ":"
- + getArea() + ":" + getUUID() + ":" + getLanguage();
-
- return key.hashCode();
- }
-
- /**
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return getIdentifier().toString();
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getFactory()
- */
- public DocumentFactory getFactory() {
- return this.factory;
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getCanonicalWebappURL()
- */
- public String getCanonicalWebappURL() {
- return "/" + getPublication().getId() + "/" + getArea() + getCanonicalDocumentURL();
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getCanonicalDocumentURL()
- */
- public String getCanonicalDocumentURL() {
- try {
- DocumentBuilder builder = getPublication().getDocumentBuilder();
- String webappUrl = builder.buildCanonicalUrl(getFactory(), getLocator());
- String prefix = "/" + getPublication().getId() + "/" + getArea();
- return webappUrl.substring(prefix.length());
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#accept(org.apache.lenya.cms.publication.util.DocumentVisitor)
- */
- public void accept(DocumentVisitor visitor) throws PublicationException {
- visitor.visitDocument(this);
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#delete()
- */
- public void delete() throws DocumentException {
- if (hasLink()) {
- throw new DocumentException("Can't delete document [" + this
- + "], it's still referenced in the site structure.");
- }
- try {
- getRepositoryNode().delete();
- } catch (Exception e) {
- throw new DocumentException(e);
- }
- }
-
- protected static final String IDENTIFIABLE_TYPE = "document";
-
- private ResourceType resourceType;
-
- /**
- * Convenience method to read the document's resource type from the meta-data.
- * @see Document#getResourceType()
- */
- public ResourceType getResourceType() throws DocumentException {
- if (this.resourceType == null) {
- ServiceSelector selector = null;
- try {
- String name = getMetaData(METADATA_NAMESPACE).getFirstValue(METADATA_RESOURCE_TYPE);
- if (name == null) {
- throw new DocumentException("No resource type defined for document [" + this
- + "]!");
- }
- selector = (ServiceSelector) this.manager.lookup(ResourceType.ROLE + "Selector");
- this.resourceType = (ResourceType) selector.select(name);
- } catch (Exception e) {
- throw new DocumentException(e);
- }
- }
- return this.resourceType;
- }
-
- public MetaData getMetaData(String namespaceUri) throws MetaDataException {
- return getContentHolder().getMetaData(namespaceUri);
- }
-
- public String[] getMetaDataNamespaceUris() throws MetaDataException {
- return getContentHolder().getMetaDataNamespaceUris();
- }
-
- public String getMimeType() throws DocumentException {
- try {
- String mimeType = getMetaData(METADATA_NAMESPACE).getFirstValue(METADATA_MIME_TYPE);
- if (mimeType == null) {
- mimeType = "";
- }
- return mimeType;
- } catch (MetaDataException e) {
- throw new DocumentException(e);
- }
- }
-
- public long getContentLength() throws DocumentException {
- try {
- return getContentHolder().getContentLength();
- } catch (RepositoryException e) {
- throw new DocumentException(e);
- }
- }
-
- public void setMimeType(String mimeType) throws DocumentException {
- checkWritability();
- try {
- getMetaData(METADATA_NAMESPACE).setValue(METADATA_MIME_TYPE, mimeType);
- } catch (MetaDataException e) {
- throw new DocumentException(e);
- }
- }
-
- public DocumentLocator getLocator() {
- SiteStructure structure = area().getSite();
- if (!structure.containsByUuid(getUUID(), getLanguage())) {
- throw new RuntimeException("The document [" + this
- + "] is not referenced in the site structure.");
- }
- try {
- return DocumentLocator.getLocator(getPublication().getId(), getArea(), structure
- .getByUuid(getUUID(), getLanguage()).getNode().getPath(), getLanguage());
- } catch (SiteException e) {
- throw new RuntimeException(e);
- }
- }
-
- public String getPath() throws DocumentException {
- return getLink().getNode().getPath();
- }
-
- public boolean existsAreaVersion(String area) {
- String sourceUri = getSourceURI(getPublication(), area, getUUID(), getLanguage());
- try {
- return SourceUtil.exists(sourceUri, this.manager);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- public boolean existsTranslation(String language) {
- return area().contains(getUUID(), language);
- }
-
- public Document getAreaVersion(String area) throws DocumentException {
- try {
- return getFactory().get(getPublication(), area, getUUID(), getLanguage());
- } catch (DocumentBuildException e) {
- throw new DocumentException(e);
- }
- }
-
- public Document getTranslation(String language) throws DocumentException {
- try {
- return getFactory().get(getPublication(), getArea(), getUUID(), language);
- } catch (DocumentBuildException e) {
- throw new DocumentException(e);
- }
- }
-
- private Node repositoryNode;
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getRepositoryNode()
- */
- public Node getRepositoryNode() {
- if (this.repositoryNode == null) {
- this.repositoryNode = getRepositoryNode(this.manager, getFactory(), getSourceURI());
- }
- return this.repositoryNode;
- }
-
- protected ContentHolder getContentHolder() {
- Node node = getRepositoryNode();
- if (isRevisionSpecified()) {
- try {
- return node.getHistory().getRevision(revision);
- } catch (RepositoryException e) {
- throw new RuntimeException(e);
- }
- } else {
- return node;
- }
- }
-
- protected static Node getRepositoryNode(ServiceManager manager, DocumentFactory docFactory,
- String sourceUri) {
- Session session = docFactory.getSession();
- NodeFactory factory = null;
- try {
- factory = (NodeFactory) manager.lookup(NodeFactory.ROLE);
- return (Node) session.getRepositoryItem(factory, sourceUri);
- } catch (Exception e) {
- throw new RuntimeException("Creating repository node failed: ", e);
- } finally {
- if (factory != null) {
- manager.release(factory);
- }
- }
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Document#getSourceURI()
- */
- public String getSourceURI() {
- return getSourceURI(getPublication(), getArea(), getUUID(), getLanguage());
- }
-
- protected static String getSourceURI(Publication pub, String area, String uuid, String language) {
- String path = pub.getPathMapper().getPath(uuid, language);
- return pub.getSourceURI() + "/content/" + area + "/" + path;
- }
-
- public boolean existsVersion(String area, String language) {
- String sourceUri = getSourceURI(getPublication(), area, getUUID(), language);
- try {
- return SourceUtil.exists(sourceUri, this.manager);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- public Document getVersion(String area, String language) throws DocumentException {
- try {
- return getFactory().get(getPublication(), area, getUUID(), language);
- } catch (DocumentBuildException e) {
- throw new DocumentException(e);
- }
- }
-
- public Link getLink() throws DocumentException {
- SiteStructure structure = area().getSite();
- try {
- if (structure.containsByUuid(getUUID(), getLanguage())) {
- return structure.getByUuid(getUUID(), getLanguage());
- } else {
- throw new DocumentException("The document [" + this
- + "] is not referenced in the site structure [" + structure + "].");
- }
- } catch (Exception e) {
- throw new DocumentException(e);
- }
- }
-
- public boolean hasLink() {
- return area().getSite().containsByUuid(getUUID(), getLanguage());
- }
-
- public Area area() {
- try {
- return getPublication().getArea(getArea());
- } catch (PublicationException e) {
- throw new RuntimeException(e);
- }
- }
-
- public void setResourceType(ResourceType resourceType) {
- checkWritability();
- Assert.notNull("resource type", resourceType);
- try {
- MetaData meta = getMetaData(DocumentImpl.METADATA_NAMESPACE);
- meta.setValue(DocumentImpl.METADATA_RESOURCE_TYPE, resourceType.getName());
- } catch (MetaDataException e) {
- throw new RuntimeException(e);
- }
- }
-
- public void setSourceExtension(String extension) {
- checkWritability();
- Assert.notNull("extension", extension);
- Assert.isTrue("extension doesn't start with a dot", !extension.startsWith("."));
- try {
- MetaData meta = getMetaData(DocumentImpl.METADATA_NAMESPACE);
- meta.setValue(DocumentImpl.METADATA_EXTENSION, extension);
- } catch (MetaDataException e) {
- throw new RuntimeException(e);
- }
- }
-
- public OutputStream getOutputStream() {
- checkWritability();
- try {
- return getRepositoryNode().getOutputStream();
- } catch (RepositoryException e) {
- throw new RuntimeException(e);
- }
- }
-
- protected void checkWritability() {
- if (isRevisionSpecified()) {
- throw new UnsupportedOperationException();
- }
- }
-
- protected boolean isRevisionSpecified() {
- return this.revision != -1;
- }
-
- public InputStream getInputStream() {
- try {
- return getRepositoryNode().getInputStream();
- } catch (RepositoryException e) {
- throw new RuntimeException(e);
- }
- }
-
- public Session getSession() {
- return getFactory().getSession();
- }
-
- public int getRevisionNumber() {
- if (!isRevisionSpecified()) {
- throw new UnsupportedOperationException(
- "This is not a particular revision of the document [" + this + "].");
- }
- return this.revision;
- }
-
-}
\ No newline at end of file
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java b/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java
deleted file mode 100644
index 65c811b..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java
+++ /dev/null
@@ -1,971 +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.lenya.cms.publication;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.metadata.MetaData;
-import org.apache.lenya.cms.metadata.MetaDataException;
-import org.apache.lenya.cms.publication.util.DocumentSet;
-import org.apache.lenya.cms.publication.util.DocumentVisitor;
-import org.apache.lenya.cms.repository.Node;
-import org.apache.lenya.cms.repository.RepositoryException;
-import org.apache.lenya.cms.repository.UUIDGenerator;
-import org.apache.lenya.cms.site.Link;
-import org.apache.lenya.cms.site.NodeIterator;
-import org.apache.lenya.cms.site.NodeSet;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.cms.site.SiteNode;
-import org.apache.lenya.cms.site.SiteStructure;
-import org.apache.lenya.cms.site.SiteUtil;
-import org.apache.lenya.util.Assert;
-
-/**
- * DocumentManager implementation.
- *
- * @version $Id$
- */
-public class DocumentManagerImpl extends AbstractLogEnabled implements DocumentManager,
- Serviceable, Contextualizable {
-
- /**
- * @see org.apache.lenya.cms.publication.DocumentManager#add(org.apache.lenya.cms.publication.Document,
- * java.lang.String, java.lang.String, java.lang.String,
- * java.lang.String, java.lang.String, boolean)
- */
- public Document add(Document sourceDocument, String area, String path, String language,
- String extension, String navigationTitle, boolean visibleInNav)
- throws DocumentBuildException, PublicationException {
-
- Document document = add(sourceDocument.getFactory(), sourceDocument.getResourceType(),
- sourceDocument.getInputStream(), sourceDocument.getPublication(), area, path,
- language, extension, navigationTitle, visibleInNav, sourceDocument.getMimeType());
-
- copyMetaData(sourceDocument, document);
- return document;
- }
-
- /**
- * Copies meta data from one document to another. If the destination
- * document is a different area version, the meta data are duplicated (i.e.,
- * onCopy = delete is neglected).
- * @param source
- * @param destination
- * @throws PublicationException
- */
- protected void copyMetaData(Document source, Document destination) throws PublicationException {
-
- boolean duplicate = source.getUUID().equals(destination.getUUID())
- && source.getLanguage().equals(destination.getLanguage())
- && !source.getArea().equals(destination.getArea());
-
- try {
- String[] uris = source.getMetaDataNamespaceUris();
- for (int i = 0; i < uris.length; i++) {
- if (duplicate) {
- destination.getMetaData(uris[i]).forcedReplaceBy(source.getMetaData(uris[i]));
- } else {
- destination.getMetaData(uris[i]).replaceBy(source.getMetaData(uris[i]));
- }
- }
- } catch (MetaDataException e) {
- throw new PublicationException(e);
- }
- }
-
- /**
- * @see org.apache.lenya.cms.publication.DocumentManager#add(org.apache.lenya.cms.publication.DocumentFactory,
- * org.apache.lenya.cms.publication.ResourceType, java.lang.String,
- * org.apache.lenya.cms.publication.Publication, java.lang.String,
- * java.lang.String, java.lang.String, java.lang.String,
- * java.lang.String, boolean)
- */
- public Document add(DocumentFactory factory, ResourceType documentType,
- String initialContentsURI, Publication pub, String area, String path, String language,
- String extension, String navigationTitle, boolean visibleInNav)
- throws DocumentBuildException, DocumentException, PublicationException {
-
- Area areaObj = pub.getArea(area);
- SiteStructure site = areaObj.getSite();
- if (site.contains(path) && site.getNode(path).hasLink(language)) {
- throw new DocumentException("The link [" + path + ":" + language
- + "] is already contained in site [" + site + "]");
- }
-
- Document document = add(factory, documentType, initialContentsURI, pub, area, language,
- extension);
-
- addToSiteManager(path, document, navigationTitle, visibleInNav);
- return document;
- }
-
- protected Document add(DocumentFactory factory, ResourceType documentType,
- InputStream initialContentsStream, Publication pub, String area, String path,
- String language, String extension, String navigationTitle, boolean visibleInNav, String mimeType)
- throws DocumentBuildException, DocumentException, PublicationException {
-
- Area areaObj = pub.getArea(area);
- SiteStructure site = areaObj.getSite();
- if (site.contains(path) && site.getNode(path).hasLink(language)) {
- throw new DocumentException("The link [" + path + ":" + language
- + "] is already contained in site [" + site + "]");
- }
-
- Document document = add(factory, documentType, initialContentsStream, pub, area, language,
- extension, mimeType);
-
- addToSiteManager(path, document, navigationTitle, visibleInNav);
- return document;
- }
-
- public Document add(DocumentFactory factory, ResourceType documentType,
- String initialContentsURI, Publication pub, String area, String language,
- String extension) throws DocumentBuildException, DocumentException,
- PublicationException {
-
- String uuid = generateUUID();
- SourceResolver resolver = null;
- Source source = null;
- try {
- resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
- source = resolver.resolveURI(initialContentsURI);
- return add(factory, documentType, uuid, source.getInputStream(), pub, area, language,
- extension, getMimeType(source));
- } catch (Exception e) {
- throw new PublicationException(e);
- } finally {
- if (resolver != null) {
- if (source != null) {
- resolver.release(source);
- }
- this.manager.release(resolver);
- }
- }
- }
-
- protected String getMimeType(Source source) {
- String mimeType = source.getMimeType();
- if (mimeType == null) {
- mimeType = "";
- }
- return mimeType;
- }
-
- protected Document add(DocumentFactory factory, ResourceType documentType,
- InputStream initialContentsStream, Publication pub, String area, String language,
- String extension, String mimeType) throws DocumentBuildException, DocumentException,
- PublicationException {
-
- String uuid = generateUUID();
- return add(factory, documentType, uuid, initialContentsStream, pub, area, language,
- extension, mimeType);
- }
-
- protected Document add(DocumentFactory factory, ResourceType documentType, String uuid,
- InputStream stream, Publication pub, String area, String language, String extension, String mimeType)
- throws DocumentBuildException {
- try {
-
- if (exists(factory, pub, area, uuid, language)) {
- throw new DocumentBuildException("The document [" + pub.getId() + ":" + area + ":"
- + uuid + ":" + language + "] already exists!");
- }
-
- Document document = factory.get(pub, area, uuid, language);
- Node node = document.getRepositoryNode();
- node.lock();
-
- document.setResourceType(documentType);
- document.setSourceExtension(extension);
- document.setMimeType(mimeType);
-
- // Write Lenya-internal meta-data
- MetaData lenyaMetaData = document.getMetaData(DocumentImpl.METADATA_NAMESPACE);
- lenyaMetaData.setValue(DocumentImpl.METADATA_CONTENT_TYPE, "xml");
-
- if (getLogger().isDebugEnabled()) {
- getLogger().debug("Create");
- getLogger().debug(" document: [" + document + "]");
- }
-
- create(stream, document);
- return document;
- } catch (Exception e) {
- throw new DocumentBuildException("call to creator for new document failed", e);
- }
- }
-
- protected String generateUUID() throws DocumentBuildException {
- String uuid;
- UUIDGenerator generator = null;
- try {
-
- generator = (UUIDGenerator) this.manager.lookup(UUIDGenerator.ROLE);
- uuid = generator.nextUUID();
-
- } catch (Exception e) {
- throw new DocumentBuildException("call to creator for new document failed", e);
- } finally {
- if (generator != null) {
- this.manager.release(generator);
- }
- }
- return uuid;
- }
-
- protected void create(InputStream stream, Document document) throws Exception {
-
- // Read initial contents as DOM
- if (getLogger().isDebugEnabled())
- getLogger().debug(
- "DefaultCreator::create(), ready to read initial contents from URI [" + stream
- + "]");
-
- SourceResolver resolver = null;
- try {
- resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
- copy(resolver, stream, document);
- } finally {
- if (resolver != null) {
- this.manager.release(resolver);
- }
- }
- }
-
- protected void copy(SourceResolver resolver, InputStream sourceInputStream, Document destination)
- throws IOException {
-
- boolean useBuffer = true;
-
- OutputStream destOutputStream = null;
- try {
- destOutputStream = destination.getOutputStream();
-
- if (useBuffer) {
- final ByteArrayOutputStream sourceBos = new ByteArrayOutputStream();
- IOUtils.copy(sourceInputStream, sourceBos);
- IOUtils.write(sourceBos.toByteArray(), destOutputStream);
- } else {
- IOUtils.copy(sourceInputStream, destOutputStream);
- }
- } finally {
- if (destOutputStream != null) {
- destOutputStream.flush();
- destOutputStream.close();
- }
- if (sourceInputStream != null) {
- sourceInputStream.close();
- }
- }
- }
-
- protected void addToSiteManager(String path, Document document, String navigationTitle,
- boolean visibleInNav) throws PublicationException {
- addToSiteManager(path, document, navigationTitle, visibleInNav, null);
- }
-
- protected void addToSiteManager(String path, Document document, String navigationTitle,
- boolean visibleInNav, String followingSiblingPath) throws PublicationException {
- SiteStructure site = document.area().getSite();
- if (!site.contains(path) && followingSiblingPath != null) {
- site.add(path, followingSiblingPath);
- }
- site.add(path, document);
- document.getLink().setLabel(navigationTitle);
- document.getLink().getNode().setVisible(visibleInNav);
- }
-
- /**
- * Template method to copy a document. Override
- * {@link #copyDocumentSource(Document, Document)} to implement access to a
- * custom repository.
- * @see org.apache.lenya.cms.publication.DocumentManager#copy(org.apache.lenya.cms.publication.Document,
- * org.apache.lenya.cms.publication.DocumentLocator)
- */
- public void copy(Document sourceDoc, DocumentLocator destination) throws PublicationException {
-
- if (!destination.getPublicationId().equals(sourceDoc.getPublication().getId())) {
- throw new PublicationException("Can't copy to a different publication!");
- }
-
- SiteStructure destSite = sourceDoc.getPublication().getArea(destination.getArea())
- .getSite();
- String destPath = destination.getPath();
- if (destSite.contains(destination.getPath(), destination.getLanguage())) {
- Document destDoc = destSite.getNode(destPath).getLink(destination.getLanguage())
- .getDocument();
- copyDocumentSource(sourceDoc, destDoc);
- copyInSiteStructure(sourceDoc, destDoc, destPath);
- } else {
- add(sourceDoc, destination.getArea(), destPath, destination.getLanguage(), sourceDoc
- .getExtension(), sourceDoc.getLink().getLabel(), sourceDoc.getLink().getNode()
- .isVisible());
- }
-
- }
-
- protected void copyInSiteStructure(Document sourceDoc, Document destDoc, String destPath)
- throws PublicationException, DocumentException, SiteException {
-
- String destArea = destDoc.getArea();
-
- SiteStructure destSite = sourceDoc.getPublication().getArea(destArea).getSite();
-
- if (sourceDoc.hasLink()) {
- if (destDoc.hasLink()) {
- Link srcLink = sourceDoc.getLink();
- Link destLink = destDoc.getLink();
- destLink.setLabel(srcLink.getLabel());
- destLink.getNode().setVisible(srcLink.getNode().isVisible());
- } else {
- String label = sourceDoc.getLink().getLabel();
- boolean visible = sourceDoc.getLink().getNode().isVisible();
- if (destSite.contains(sourceDoc.getLink().getNode().getPath())) {
- addToSiteManager(destPath, destDoc, label, visible);
- } else {
-
- String followingSiblingPath = null;
-
- if (sourceDoc.getPath().equals(destPath)) {
- SiteStructure sourceSite = sourceDoc.area().getSite();
-
- SiteNode[] sourceSiblings;
- SiteNode sourceNode = sourceDoc.getLink().getNode();
- if (sourceNode.isTopLevel()) {
- sourceSiblings = sourceSite.getTopLevelNodes();
- } else if (sourceNode.getParent() != null) {
- sourceSiblings = sourceNode.getParent().getChildren();
- } else {
- sourceSiblings = new SiteNode[1];
- sourceSiblings[0] = sourceNode;
- }
-
- final int sourcePos = Arrays.asList(sourceSiblings).indexOf(sourceNode);
-
- int pos = sourcePos;
- while (followingSiblingPath == null && pos < sourceSiblings.length) {
- String siblingPath = sourceSiblings[pos].getPath();
- if (destSite.contains(siblingPath)) {
- followingSiblingPath = siblingPath;
- }
- pos++;
- }
- }
-
- if (followingSiblingPath == null) {
- addToSiteManager(destPath, destDoc, label, visible);
- } else {
- addToSiteManager(destPath, destDoc, label, visible, followingSiblingPath);
- }
- }
- }
- }
- }
-
- /**
- * @see org.apache.lenya.cms.publication.DocumentManager#delete(org.apache.lenya.cms.publication.Document)
- */
- public void delete(Document document) throws PublicationException {
- if (!document.exists()) {
- throw new PublicationException("Document [" + document + "] does not exist!");
- }
-
- if (document.hasLink()) {
- document.getLink().delete();
- }
-
- document.delete();
- }
-
- /**
- * @see org.apache.lenya.cms.publication.DocumentManager#move(org.apache.lenya.cms.publication.Document,
- * org.apache.lenya.cms.publication.DocumentLocator)
- */
- public void move(Document sourceDocument, DocumentLocator destination)
- throws PublicationException {
-
- if (!destination.getArea().equals(sourceDocument.getArea())) {
- throw new PublicationException("Can't move to a different area!");
- }
-
- SiteStructure site = sourceDocument.area().getSite();
- if (site.contains(destination.getPath())) {
- throw new PublicationException("The path [" + destination
- + "] is already contained in this publication!");
- }
-
- String label = sourceDocument.getLink().getLabel();
- boolean visible = sourceDocument.getLink().getNode().isVisible();
- sourceDocument.getLink().delete();
-
- site.add(destination.getPath(), sourceDocument);
- sourceDocument.getLink().setLabel(label);
- sourceDocument.getLink().getNode().setVisible(visible);
-
- }
-
- /**
- * @see org.apache.lenya.cms.publication.DocumentManager#copyToArea(org.apache.lenya.cms.publication.Document,
- * java.lang.String)
- */
- public void copyToArea(Document sourceDoc, String destinationArea) throws PublicationException {
- String language = sourceDoc.getLanguage();
- copyToVersion(sourceDoc, destinationArea, language);
- }
-
- protected void copyToVersion(Document sourceDoc, String destinationArea, String language)
- throws DocumentException, DocumentBuildException, PublicationException, SiteException {
-
- Document destDoc;
- if (sourceDoc.existsAreaVersion(destinationArea)) {
- destDoc = sourceDoc.getAreaVersion(destinationArea);
- copyDocumentSource(sourceDoc, destDoc);
- } else {
- destDoc = addVersion(sourceDoc, destinationArea, language);
- }
-
- if (sourceDoc.hasLink()) {
- copyInSiteStructure(sourceDoc, destDoc, sourceDoc.getPath());
- }
- }
-
- /**
- * @see org.apache.lenya.cms.publication.DocumentManager#copyToArea(org.apache.lenya.cms.publication.util.DocumentSet,
- * java.lang.String)
- */
- public void copyToArea(DocumentSet documentSet, String destinationArea)
- throws PublicationException {
- Document[] documents = documentSet.getDocuments();
- for (int i = 0; i < documents.length; i++) {
- copyToArea(documents[i], destinationArea);
- }
- }
-
- protected ServiceManager manager;
-
- /**
- * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
- */
- public void service(ServiceManager _manager) throws ServiceException {
- this.manager = _manager;
- }
-
- private Context context;
-
- /**
- * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
- */
- public void contextualize(Context _context) throws ContextException {
- this.context = _context;
- }
-
- /**
- * @return The Avalon context.
- */
- protected Context getContext() {
- return this.context;
- }
-
- public void moveAll(Area sourceArea, String sourcePath, Area targetArea, String targetPath)
- throws PublicationException {
- SiteStructure site = sourceArea.getSite();
-
- SiteNode root = site.getNode(sourcePath);
- List subsite = preOrder(root);
-
- for (Iterator n = subsite.iterator(); n.hasNext();) {
- SiteNode node = (SiteNode) n.next();
- String subPath = node.getPath().substring(sourcePath.length());
- targetArea.getSite().add(targetPath + subPath);
- }
- Collections.reverse(subsite);
- for (Iterator n = subsite.iterator(); n.hasNext();) {
- SiteNode node = (SiteNode) n.next();
- String subPath = node.getPath().substring(sourcePath.length());
- moveAllLanguageVersions(sourceArea, sourcePath + subPath, targetArea, targetPath
- + subPath);
- }
- }
-
- protected List preOrder(SiteNode node) {
- List list = new ArrayList();
- list.add(node);
- SiteNode[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- list.addAll(preOrder(children[i]));
- }
- return list;
- }
-
- public void moveAllLanguageVersions(Area sourceArea, String sourcePath, Area targetArea,
- String targetPath) throws PublicationException {
-
- SiteNode sourceNode = sourceArea.getSite().getNode(sourcePath);
- String[] languages = sourceNode.getLanguages();
- for (int i = 0; i < languages.length; i++) {
- Link sourceLink = sourceNode.getLink(languages[i]);
- String label = sourceLink.getLabel();
- Document sourceDoc = sourceLink.getDocument();
- sourceLink.delete();
-
- Document targetDoc;
- if (sourceArea.getName().equals(targetArea.getName())) {
- targetDoc = sourceDoc;
- } else {
- targetDoc = addVersion(sourceDoc, targetArea.getName(), sourceDoc.getLanguage());
- copyRevisions(sourceDoc, targetDoc);
- sourceDoc.delete();
- }
-
- Link link = targetArea.getSite().add(targetPath, targetDoc);
- link.setLabel(label);
- Assert.isTrue("label set", targetDoc.getLink().getLabel().equals(label));
- }
- SiteNode targetNode = targetArea.getSite().getNode(targetPath);
- targetNode.setVisible(sourceNode.isVisible());
- }
-
- protected void copyRevisions(Document sourceDoc, Document targetDoc) throws PublicationException {
- try {
- Node targetNode = targetDoc.getRepositoryNode();
- targetNode.copyRevisionsFrom(sourceDoc.getRepositoryNode());
- } catch (Exception e) {
- throw new PublicationException(e);
- }
- }
-
- public void copyAll(Area sourceArea, String sourcePath, Area targetArea, String targetPath)
- throws PublicationException {
-
- SiteStructure site = sourceArea.getSite();
- SiteNode root = site.getNode(sourcePath);
-
- List preOrder = preOrder(root);
- for (Iterator i = preOrder.iterator(); i.hasNext(); ) {
- SiteNode node = (SiteNode) i.next();
- String nodeSourcePath = node.getPath();
- String nodeTargetPath = targetPath + nodeSourcePath.substring(sourcePath.length());
- copyAllLanguageVersions(sourceArea, nodeSourcePath, targetArea, nodeTargetPath);
- }
- }
-
- public void copyAllLanguageVersions(Area sourceArea, String sourcePath, Area targetArea,
- String targetPath) throws PublicationException {
- Publication pub = sourceArea.getPublication();
-
- SiteNode sourceNode = sourceArea.getSite().getNode(sourcePath);
- String[] languages = sourceNode.getLanguages();
-
- Document targetDoc = null;
-
- for (int i = 0; i < languages.length; i++) {
- Document sourceVersion = sourceNode.getLink(languages[i]).getDocument();
- DocumentLocator targetLocator = DocumentLocator.getLocator(pub.getId(), targetArea
- .getName(), targetPath, languages[i]);
- if (targetDoc == null) {
- copy(sourceVersion, targetLocator.getLanguageVersion(languages[i]));
- targetDoc = targetArea.getSite().getNode(targetPath).getLink(languages[i])
- .getDocument();
- } else {
- targetDoc = addVersion(targetDoc, targetLocator.getArea(), languages[i]);
- addToSiteManager(targetLocator.getPath(), targetDoc, sourceVersion.getLink()
- .getLabel(), sourceVersion.getLink().getNode().isVisible());
- copyDocumentSource(sourceVersion, targetDoc);
- }
- }
- }
-
- /**
- * Copies a document source.
- * @param sourceDocument The source document.
- * @param destinationDocument The destination document.
- * @throws PublicationException when something went wrong.
- */
- public void copyDocumentSource(Document sourceDocument, Document destinationDocument)
- throws PublicationException {
- copyContent(sourceDocument, destinationDocument);
- copyMetaData(sourceDocument, destinationDocument);
- }
-
- protected void copyContent(Document sourceDocument, Document destinationDocument)
- throws PublicationException {
- boolean useBuffer = true;
-
- OutputStream destOutputStream = null;
- InputStream sourceInputStream = null;
- try {
- try {
- sourceInputStream = sourceDocument.getInputStream();
- destOutputStream = destinationDocument.getOutputStream();
-
- if (useBuffer) {
- final ByteArrayOutputStream sourceBos = new ByteArrayOutputStream();
- IOUtils.copy(sourceInputStream, sourceBos);
- IOUtils.write(sourceBos.toByteArray(), destOutputStream);
- } else {
- IOUtils.copy(sourceInputStream, destOutputStream);
- }
- } finally {
- if (destOutputStream != null) {
- destOutputStream.flush();
- destOutputStream.close();
- }
- if (sourceInputStream != null) {
- sourceInputStream.close();
- }
- }
- } catch (Exception e) {
- throw new PublicationException(e);
- }
- }
-
- /**
- * Abstract base class for document visitors which operate on a source and
- * target document.
- */
- public abstract class SourceTargetVisitor implements DocumentVisitor {
-
- private DocumentLocator rootSource;
- private DocumentLocator rootTarget;
- private DocumentManager manager;
-
- /**
- * Ctor.
- * @param manager The document manager.
- * @param source The root source.
- * @param target The root target.
- */
- public SourceTargetVisitor(DocumentManager manager, Document source, DocumentLocator target) {
- this.manager = manager;
- this.rootSource = source.getLocator();
- this.rootTarget = target;
- }
-
- /**
- * @return the root source
- */
- protected DocumentLocator getRootSource() {
- return rootSource;
- }
-
- /**
- * @return the root target
- */
- protected DocumentLocator getRootTarget() {
- return rootTarget;
- }
-
- /**
- * @return the document manager
- */
- protected DocumentManager getDocumentManager() {
- return this.manager;
- }
-
- /**
- * Returns the target corresponding to a source relatively to the root
- * target document.
- * @param source The source.
- * @return A document.
- * @throws DocumentBuildException if the target could not be built.
- */
- protected DocumentLocator getTarget(Document source) throws DocumentBuildException {
- DocumentLocator sourceLocator = source.getLocator();
- String rootSourcePath = getRootSource().getPath();
- if (sourceLocator.getPath().equals(rootSourcePath)) {
- return rootTarget;
- } else {
- String relativePath = sourceLocator.getPath().substring(rootSourcePath.length());
- return rootTarget.getDescendant(relativePath);
- }
- }
- }
-
- /**
- * @see org.apache.lenya.cms.publication.DocumentManager#deleteAll(org.apache.lenya.cms.publication.Document)
- */
- public void deleteAll(Document document) throws PublicationException {
-
- SiteManager siteManager = null;
- ServiceSelector selector = null;
- try {
- selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
- siteManager = (SiteManager) selector.select(document.getPublication()
- .getSiteManagerHint());
-
- NodeSet subsite = SiteUtil.getSubSite(this.manager, document.getLink().getNode());
- for (NodeIterator i = subsite.descending(); i.hasNext();) {
- SiteNode node = i.next();
- String[] languages = node.getLanguages();
- for (int l = 0; l < languages.length; l++) {
- Document doc = node.getLink(languages[l]).getDocument();
- delete(doc);
- }
- }
- } catch (ServiceException e) {
- throw new PublicationException(e);
- } finally {
- if (selector != null) {
- if (siteManager != null) {
- selector.release(siteManager);
- }
- this.manager.release(selector);
- }
- }
- }
-
- /**
- * @see org.apache.lenya.cms.publication.DocumentManager#deleteAllLanguageVersions(org.apache.lenya.cms.publication.Document)
- */
- public void deleteAllLanguageVersions(Document document) throws PublicationException {
- DocumentFactory identityMap = document.getFactory();
- String[] languages = document.getLanguages();
- for (int i = 0; i < languages.length; i++) {
- DocumentLocator version = document.getLocator().getLanguageVersion(languages[i]);
- delete(identityMap.get(version));
- }
- }
-
- /**
- * Visitor to delete documents.
- */
- public class DeleteVisitor implements DocumentVisitor {
-
- private DocumentManager manager;
-
- /**
- * Ctor.
- * @param manager The document manager.
- */
- public DeleteVisitor(DocumentManager manager) {
- this.manager = manager;
- }
-
- protected DocumentManager getDocumentManager() {
- return this.manager;
- }
-
- /**
- * @see org.apache.lenya.cms.publication.util.DocumentVisitor#visitDocument(org.apache.lenya.cms.publication.Document)
- */
- public void visitDocument(Document document) throws PublicationException {
- getDocumentManager().deleteAllLanguageVersions(document);
- }
-
- }
-
- /**
- * @see org.apache.lenya.cms.publication.DocumentManager#delete(org.apache.lenya.cms.publication.util.DocumentSet)
- */
- public void delete(DocumentSet documents) throws PublicationException {
-
- if (documents.isEmpty()) {
- return;
- }
-
- SiteManager siteManager = null;
- ServiceSelector selector = null;
- try {
- selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
- Publication pub = documents.getDocuments()[0].getPublication();
- siteManager = (SiteManager) selector.select(pub.getSiteManagerHint());
-
- DocumentSet set = new DocumentSet(documents.getDocuments());
- sortAscending(set);
- set.reverse();
-
- DocumentVisitor visitor = new DeleteVisitor(this);
- set.visit(visitor);
- } catch (ServiceException e) {
- throw new PublicationException(e);
- } finally {
- if (selector != null) {
- if (siteManager != null) {
- selector.release(siteManager);
- }
- this.manager.release(selector);
- }
- }
-
- }
-
- /**
- * @see org.apache.lenya.cms.publication.DocumentManager#move(org.apache.lenya.cms.publication.util.DocumentSet,
- * org.apache.lenya.cms.publication.util.DocumentSet)
- */
- public void move(DocumentSet sources, DocumentSet destinations) throws PublicationException {
- copy(sources, destinations);
- delete(sources);
- /*
- * Document[] sourceDocs = sources.getDocuments(); Document[] targetDocs =
- * destinations.getDocuments();
- *
- * if (sourceDocs.length != targetDocs.length) { throw new
- * PublicationException( "The number of source and destination documents
- * must be equal!"); }
- *
- * Map source2target = new HashMap(); for (int i = 0; i <
- * sourceDocs.length; i++) { source2target.put(sourceDocs[i],
- * targetDocs[i]); }
- *
- * DocumentSet sortedSources = new DocumentSet(sourceDocs);
- * SiteUtil.sortAscending(this.manager, sortedSources); Document[]
- * sortedSourceDocs = sortedSources.getDocuments();
- *
- * for (int i = 0; i < sortedSourceDocs.length; i++) {
- * move(sortedSourceDocs[i], (Document)
- * source2target.get(sortedSourceDocs[i])); }
- */
- }
-
- /**
- * @see org.apache.lenya.cms.publication.DocumentManager#copy(org.apache.lenya.cms.publication.util.DocumentSet,
- * org.apache.lenya.cms.publication.util.DocumentSet)
- */
- public void copy(DocumentSet sources, DocumentSet destinations) throws PublicationException {
- Document[] sourceDocs = sources.getDocuments();
- Document[] targetDocs = destinations.getDocuments();
-
- if (sourceDocs.length != targetDocs.length) {
- throw new PublicationException(
- "The number of source and destination documents must be equal!");
- }
-
- Map source2target = new HashMap();
- for (int i = 0; i < sourceDocs.length; i++) {
- source2target.put(sourceDocs[i], targetDocs[i]);
- }
-
- DocumentSet sortedSources = new DocumentSet(sourceDocs);
- sortAscending(sortedSources);
- Document[] sortedSourceDocs = sortedSources.getDocuments();
-
- for (int i = 0; i < sortedSourceDocs.length; i++) {
- copy(sortedSourceDocs[i], ((Document) source2target.get(sortedSourceDocs[i]))
- .getLocator());
- }
- }
-
- protected void sortAscending(DocumentSet set) throws PublicationException {
-
- if (!set.isEmpty()) {
-
- Document[] docs = set.getDocuments();
- int n = docs.length;
-
- Publication pub = docs[0].getPublication();
- SiteManager siteManager = null;
- ServiceSelector selector = null;
- try {
- selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
- siteManager = (SiteManager) selector.select(pub.getSiteManagerHint());
-
- Set nodes = new HashSet();
- for (int i = 0; i < docs.length; i++) {
- nodes.add(docs[i].getLink().getNode());
- }
-
- SiteNode[] ascending = siteManager.sortAscending((SiteNode[]) nodes
- .toArray(new SiteNode[nodes.size()]));
-
- set.clear();
- for (int i = 0; i < ascending.length; i++) {
- for (int d = 0; d < docs.length; d++) {
- if (docs[d].getPath().equals(ascending[i].getPath())) {
- set.add(docs[d]);
- }
- }
- }
-
- if (set.getDocuments().length != n) {
- throw new IllegalStateException("Number of documents has changed!");
- }
-
- } catch (final ServiceException e) {
- throw new PublicationException(e);
- } finally {
- if (selector != null) {
- if (siteManager != null) {
- selector.release(siteManager);
- }
- this.manager.release(selector);
- }
- }
- }
- }
-
- public Document addVersion(Document sourceDocument, String area, String language,
- boolean addToSiteStructure) throws DocumentBuildException, PublicationException {
- Document document = addVersion(sourceDocument, area, language);
-
- if (addToSiteStructure && sourceDocument.hasLink()) {
- String path = sourceDocument.getPath();
- boolean visible = sourceDocument.getLink().getNode().isVisible();
- addToSiteManager(path, document, sourceDocument.getLink().getLabel(), visible);
- }
-
- return document;
- }
-
- public Document addVersion(Document sourceDocument, String area, String language)
- throws DocumentBuildException, DocumentException, PublicationException {
- Document document = add(sourceDocument.getFactory(), sourceDocument.getResourceType(),
- sourceDocument.getUUID(), sourceDocument.getInputStream(), sourceDocument
- .getPublication(), area, language, sourceDocument.getSourceExtension(),
- sourceDocument.getMimeType());
- copyMetaData(sourceDocument, document);
-
- return document;
- }
-
- public boolean exists(DocumentFactory factory, Publication pub, String area, String uuid,
- String language) throws PublicationException {
- String sourceUri = DocumentImpl.getSourceURI(pub, area, uuid, language);
- try {
- Node node = DocumentImpl.getRepositoryNode(this.manager, factory, sourceUri);
- return node.exists();
- } catch (RepositoryException e) {
- throw new PublicationException(e);
- }
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java b/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java
deleted file mode 100644
index 81858f7..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java
+++ /dev/null
@@ -1,563 +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.lenya.cms.publication;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.lenya.cms.repository.Node;
-import org.apache.lenya.cms.repository.Session;
-
-/**
- * A publication's configuration. Keep in sync with
- * src/resources/build/publication.rng!
- */
-public class PublicationConfiguration extends AbstractLogEnabled implements Publication {
-
- private String id;
- private String name;
- private File servletContext;
- private DocumentIdToPathMapper mapper = null;
- private ArrayList languages = new ArrayList();
- private String defaultLanguage = null;
- private String breadcrumbprefix = null;
- private String instantiatorHint = null;
- private String contentDir = null;
-
- private boolean isConfigLoaded = false;
-
- /**
- * <code>CONFIGURATION_FILE</code> The publication configuration file
- */
- public static final String CONFIGURATION_FILE = CONFIGURATION_PATH + File.separator
- + "publication.xml";
-
- private static final String CONFIGURATION_NAMESPACE = "http://apache.org/cocoon/lenya/publication/1.1";
-
- // properties marked with "*" are currently not parsed by this class.
- private static final String ELEMENT_NAME = "name";
- private static final String ELEMENT_DESCRIPTION = "description"; // *
- private static final String ELEMENT_LONGDESC = "longdesc"; // *
- private static final String ELEMENT_VERSION = "version"; // *
- private static final String ELEMENT_LENYA_VERSION = "lenya-version"; // *
- private static final String ELEMENT_LENYA_REVISION = "lenya-revision"; // *
- private static final String ELEMENT_COCOON_VERSION = "cocoon-version"; // *
- private static final String ELEMENT_LANGUAGES = "languages";
- private static final String ELEMENT_LANGUAGE = "language";
- private static final String ATTRIBUTE_DEFAULT_LANGUAGE = "default";
- private static final String ELEMENT_TEMPLATE = "template";
- private static final String ATTRIBUTE_ID = "id";
- private static final String ELEMENT_TEMPLATE_INSTANTIATOR = "template-instantiator";
- private static final String ATTRIBUTE_NAME = "name";
- private static final String ELEMENT_PATH_MAPPER = "path-mapper";
- private static final String ELEMENT_DOCUMENT_BUILDER = "document-builder";
- private static final String ELEMENT_SITE_MANAGER = "site-manager";
- private static final String ELEMENT_RESOURCE_TYPES = "resource-types";// *
- private static final String ELEMENT_RESOURCE_TYPE = "resource-type";// *
- private static final String ATTRIBUTE_WORKFLOW = "workflow";
- private static final String ELEMENT_MODULES = "modules";// *
- private static final String ELEMENT_MODULE = "module";// *
- private static final String ELEMENT_BREADCRUMB_PREFIX = "breadcrumb-prefix";
- private static final String ELEMENT_CONTENT_DIR = "content-dir";
- private static final String ATTRIBUTE_SRC = "src";
- private static final String ELEMENT_PROXIES = "proxies";
- private static final String ELEMENT_PROXY = "proxy";
- private static final String ATTRIBUTE_AREA = "area";
- private static final String ATTRIBUTE_URL = "url";
- private static final String ATTRIBUTE_SSL = "ssl";
-
- /**
- * Creates a new instance of Publication
- * @param _id the publication id
- * @param servletContextPath the servlet context of this publication
- * @throws PublicationException if there was a problem reading the config
- * file
- */
- protected PublicationConfiguration(String _id, String servletContextPath)
- throws PublicationException {
- this.id = _id;
- this.servletContext = new File(servletContextPath);
- }
-
- /**
- * Loads the configuration.
- */
- protected void loadConfiguration() {
-
- if (isConfigLoaded) {
- return;
- }
-
- if (getLogger().isDebugEnabled()) {
- getLogger().debug("Loading configuration for publication [" + getId() + "]");
- }
-
- File configFile = getConfigurationFile();
-
- if (!configFile.exists()) {
- getLogger().error(
- "Config file [" + configFile.getAbsolutePath() + "] does not exist: ",
- new RuntimeException());
- throw new RuntimeException("The configuration file [" + configFile
- + "] does not exist!");
- } else {
- getLogger().debug("Configuration file [" + configFile + "] exists.");
- }
-
- final boolean ENABLE_XML_NAMESPACES = true;
- DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(ENABLE_XML_NAMESPACES);
-
- Configuration config;
-
- String pathMapperClassName = null;
-
- try {
- config = builder.buildFromFile(configFile);
-
- this.name = config.getChild(ELEMENT_NAME).getValue();
-
- try {
- // one sanity check for the proper namespace. we should really
- // do that for every element,
- // but since ELEMENT_PATH_MAPPER is mandatory, this should catch
- // most cases of forgotten namespace.
- if (config.getChild(ELEMENT_PATH_MAPPER).getNamespace() != CONFIGURATION_NAMESPACE) {
- getLogger().warn(
- "Deprecated configuration: the publication configuration elements in "
- + configFile + " must be in the " + CONFIGURATION_NAMESPACE
- + " namespace."
- + " See webapp/lenya/resources/schemas/publication.xml.");
- }
- pathMapperClassName = config.getChild(ELEMENT_PATH_MAPPER).getValue();
- Class pathMapperClass = Class.forName(pathMapperClassName);
- this.mapper = (DocumentIdToPathMapper) pathMapperClass.newInstance();
- } catch (final ClassNotFoundException e) {
- throw new PublicationException("Cannot instantiate documentToPathMapper: ["
- + pathMapperClassName + "]", e);
- }
-
- Configuration documentBuilderConfiguration = config.getChild(ELEMENT_DOCUMENT_BUILDER,
- false);
- if (documentBuilderConfiguration != null) {
- this.documentBuilderHint = documentBuilderConfiguration
- .getAttribute(ATTRIBUTE_NAME);
- }
-
- Configuration[] _languages = config.getChild(ELEMENT_LANGUAGES).getChildren(
- ELEMENT_LANGUAGE);
- for (int i = 0; i < _languages.length; i++) {
- Configuration languageConfig = _languages[i];
- String language = languageConfig.getValue();
- this.languages.add(language);
- if (languageConfig.getAttribute(ATTRIBUTE_DEFAULT_LANGUAGE, null) != null) {
- this.defaultLanguage = language;
- }
- }
-
- Configuration siteManagerConfiguration = config.getChild(ELEMENT_SITE_MANAGER, false);
- if (siteManagerConfiguration != null) {
- this.siteManagerName = siteManagerConfiguration.getAttribute(ATTRIBUTE_NAME);
- }
-
- Configuration proxiesConfig = config.getChild(ELEMENT_PROXIES);
- Configuration[] proxyConfigs = proxiesConfig.getChildren(ELEMENT_PROXY);
- for (int i = 0; i < proxyConfigs.length; i++) {
- String url = proxyConfigs[i].getAttribute(ATTRIBUTE_URL);
- String ssl = proxyConfigs[i].getAttribute(ATTRIBUTE_SSL);
- String area = proxyConfigs[i].getAttribute(ATTRIBUTE_AREA);
-
- Proxy proxy = new Proxy();
- proxy.setUrl(url);
-
- Object key = getProxyKey(area, Boolean.valueOf(ssl).booleanValue());
- this.areaSsl2proxy.put(key, proxy);
- if (getLogger().isDebugEnabled()) {
- getLogger().debug(
- "Adding proxy: [" + proxy + "] for area=[" + area + "] SSL=[" + ssl
- + "]");
- }
- }
-
- Configuration templateConfig = config.getChild(ELEMENT_TEMPLATE, false);
- // FIXME: this is a hack. For some reason, the old code seems to
- // imply that a publication
- // can have multiple templates. This is not the case. All this code
- // should use a simple string
- // rather than arrays at some point. For now, the old array is kept,
- // to avoid having to deal
- // with all kinds of NPEs that keep cropping up...
- if (templateConfig == null) {
- this.templates = new String[0]; // ugh. empty array to keep the
- // legacy code from breaking.
- } else {
- this.templates = new String[1];
- this.templates[0] = templateConfig.getAttribute(ATTRIBUTE_ID);
- }
-
- Configuration templateInstantiatorConfig = config.getChild(
- ELEMENT_TEMPLATE_INSTANTIATOR, false);
- if (templateInstantiatorConfig != null) {
- this.instantiatorHint = templateInstantiatorConfig
- .getAttribute(PublicationConfiguration.ATTRIBUTE_NAME);
- }
-
- Configuration contentDirConfig = config.getChild(ELEMENT_CONTENT_DIR, false);
- if (contentDirConfig != null) {
- this.contentDir = contentDirConfig.getAttribute(ATTRIBUTE_SRC);
- getLogger().info(
- "Content directory loaded from pub configuration: " + this.contentDir);
- } else {
- getLogger().info("No content directory specified within pub configuration!");
- }
-
- Configuration resourceTypeConfig = config.getChild(ELEMENT_RESOURCE_TYPES);
- if (resourceTypeConfig != null) {
- Configuration[] resourceTypeConfigs = resourceTypeConfig
- .getChildren(ELEMENT_RESOURCE_TYPE);
- for (int i = 0; i < resourceTypeConfigs.length; i++) {
- String name = resourceTypeConfigs[i].getAttribute(ATTRIBUTE_NAME);
- this.resourceTypes.add(name);
-
- String workflow = resourceTypeConfigs[i].getAttribute(ATTRIBUTE_WORKFLOW, null);
- if (workflow != null) {
- this.resourceType2workflow.put(name, workflow);
- }
- }
- }
-
- } catch (final Exception e) {
- throw new RuntimeException("Problem with config file: " + configFile.getAbsolutePath(),
- e);
- }
-
- this.breadcrumbprefix = config.getChild(ELEMENT_BREADCRUMB_PREFIX).getValue("");
-
- isConfigLoaded = true;
- }
-
- /**
- * @return The configuration file ({@link #CONFIGURATION_FILE}).
- */
- protected File getConfigurationFile() {
- File configFile = new File(getDirectory(), CONFIGURATION_FILE);
- return configFile;
- }
-
- /**
- * Returns the publication ID.
- * @return A string value.
- */
- public String getId() {
- return this.id;
- }
-
- /**
- * Returns the servlet context this publication belongs to (usually, the
- * <code>webapps/lenya</code> directory).
- * @return A <code>File</code> object.
- */
- public File getServletContext() {
- return this.servletContext;
- }
-
- /**
- * Returns the publication directory.
- * @return A <code>File</code> object.
- */
- public File getDirectory() {
- return new File(getServletContext(), PUBLICATION_PREFIX + File.separator + getId());
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Publication#getContentDirectory(String)
- */
- public File getContentDirectory(String area) {
- return new File(getContentDir(), area);
- }
-
- /**
- * Set the path mapper
- * @param _mapper The path mapper
- */
- public void setPathMapper(DefaultDocumentIdToPathMapper _mapper) {
- assert _mapper != null;
- this.mapper = _mapper;
- }
-
- /**
- * Returns the path mapper.
- * @return a <code>DocumentIdToPathMapper</code>
- */
- public DocumentIdToPathMapper getPathMapper() {
- if (this.mapper == null) {
- loadConfiguration();
- }
- return this.mapper;
- }
-
- /**
- * Get the default language
- * @return the default language
- */
- public String getDefaultLanguage() {
- if (this.defaultLanguage == null) {
- loadConfiguration();
- }
- return this.defaultLanguage;
- }
-
- /**
- * Set the default language
- * @param language the default language
- */
- public void setDefaultLanguage(String language) {
- this.defaultLanguage = language;
- }
-
- /**
- * Get all available languages for this publication
- * @return an <code>Array</code> of languages
- */
- public String[] getLanguages() {
- loadConfiguration();
- return (String[]) this.languages.toArray(new String[this.languages.size()]);
- }
-
- /**
- * Get the breadcrumb prefix. It can be used as a prefix if a publication is
- * part of a larger site
- * @return the breadcrumb prefix
- */
- public String getBreadcrumbPrefix() {
- loadConfiguration();
- return this.breadcrumbprefix;
- }
-
- private String documentBuilderHint;
-
- /**
- * Returns the document builder of this instance.
- * @return A document builder.
- */
- public String getDocumentBuilderHint() {
- loadConfiguration();
- return this.documentBuilderHint;
- }
-
- /**
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object object) {
- boolean equals = false;
-
- if (getClass().isInstance(object)) {
- Publication publication = (Publication) object;
- equals = getId().equals(publication.getId())
- && getServletContext().equals(publication.getServletContext());
- }
-
- return equals;
- }
-
- /**
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- String key = getServletContext() + ":" + getId();
- return key.hashCode();
- }
-
- private Map areaSsl2proxy = new HashMap();
-
- /**
- * Generates a hash key for a area-SSL combination.
- * @param area The area.
- * @param isSslProtected If the proxy is assigned for SSL-protected pages.
- * @return An object.
- */
- protected Object getProxyKey(String area, boolean isSslProtected) {
- return area + ":" + isSslProtected;
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Publication#getProxy(org.apache.lenya.cms.publication.Document,
- * boolean)
- */
- public Proxy getProxy(Document document, boolean isSslProtected) {
- Proxy proxy = getProxy(document.getArea(), isSslProtected);
-
- if (getLogger().isDebugEnabled()) {
- getLogger()
- .debug("Resolving proxy for [" + document + "] SSL=[" + isSslProtected + "]");
- getLogger().debug("Resolved proxy: [" + proxy + "]");
- }
-
- return proxy;
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Publication#getProxy(java.lang.String,
- * boolean)
- */
- public Proxy getProxy(String area, boolean isSslProtected) {
- loadConfiguration();
- Object key = getProxyKey(area, isSslProtected);
- Proxy proxy = (Proxy) this.areaSsl2proxy.get(key);
- return proxy;
- }
-
- /**
- * @param area The area.
- * @param isSslProtected If the proxy is for SSL-protected URLs.
- * @param proxy The proxy to set.
- */
- protected void setProxy(String area, boolean isSslProtected, Proxy proxy) {
- Object key = getProxyKey(area, isSslProtected);
- this.areaSsl2proxy.put(key, proxy);
- }
-
- private String siteManagerName;
-
- /**
- * @see org.apache.lenya.cms.publication.Publication#exists()
- */
- public boolean exists() {
- return getConfigurationFile().exists();
- }
-
- private String[] templates;
-
- /**
- * @see org.apache.lenya.cms.publication.Publication#getTemplateIds()
- */
- public String[] getTemplateIds() {
- loadConfiguration();
- List list = Arrays.asList(this.templates);
- return (String[]) list.toArray(new String[list.size()]);
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Publication#getSiteManagerHint()
- */
- public String getSiteManagerHint() {
- loadConfiguration();
- return this.siteManagerName;
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Publication#getInstantiatorHint()
- */
- public String getInstantiatorHint() {
- loadConfiguration();
- return this.instantiatorHint;
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Publication#getContentDir()
- */
- public String getContentDir() {
- loadConfiguration();
- if (this.contentDir == null) {
- this.contentDir = new File(getDirectory(), CONTENT_PATH).getAbsolutePath();
- }
- return this.contentDir;
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Publication#getSourceURI()
- */
- public String getSourceURI() {
- return Node.LENYA_PROTOCOL + PUBLICATION_PREFIX_URI + "/" + this.id;
- }
-
- /**
- * @see org.apache.lenya.cms.publication.Publication#getContentURI(java.lang.String)
- */
- public String getContentURI(String area) {
- return getSourceURI() + "/" + CONTENT_PATH + "/" + area;
- }
-
- private Map resourceType2workflow = new HashMap();
-
- /**
- * @see org.apache.lenya.cms.publication.Publication#getWorkflowSchema(org.apache.lenya.cms.publication.ResourceType)
- */
- public String getWorkflowSchema(ResourceType resourceType) {
- String workflow = (String) this.resourceType2workflow.get(resourceType.getName());
- return workflow;
- }
-
- private List resourceTypes = new ArrayList();
-
- /**
- * @see org.apache.lenya.cms.publication.Publication#getResourceTypeNames()
- */
- public String[] getResourceTypeNames() {
- loadConfiguration();
- return (String[]) this.resourceTypes.toArray(new String[this.resourceTypes.size()]);
- }
-
- public String toString() {
- return getId();
- }
-
- public Area getArea(String name) throws PublicationException {
- throw new IllegalStateException("Not implemented!");
- }
-
- private String[] areas;
-
- public String[] getAreaNames() {
- // TODO: make this more generic.
- if (this.areas == null) {
- List list = new ArrayList();
- list.add(Publication.AUTHORING_AREA);
- list.add(Publication.LIVE_AREA);
- list.add(Publication.STAGING_AREA);
- list.add(Publication.TRASH_AREA);
- list.add(Publication.ARCHIVE_AREA);
- this.areas = (String[]) list.toArray(new String[list.size()]);
- }
- return this.areas;
- }
-
- public DocumentFactory getFactory() {
- throw new IllegalStateException("Not implemented!");
- }
-
- public DocumentBuilder getDocumentBuilder() {
- return null;
- }
-
- public String getName() {
- loadConfiguration();
- return this.name;
- }
-
- public Session getSession() {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationFactory.java b/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationFactory.java
deleted file mode 100644
index 5df7101..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationFactory.java
+++ /dev/null
@@ -1,52 +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.lenya.cms.publication;
-
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.lenya.cms.repository.RepositoryException;
-import org.apache.lenya.cms.repository.RepositoryItem;
-import org.apache.lenya.cms.repository.RepositoryItemFactory;
-import org.apache.lenya.cms.repository.Session;
-
-/**
- * Publication factory.
- */
-public class PublicationFactory implements RepositoryItemFactory {
-
- private ServiceManager manager;
- private PublicationConfiguration config;
-
- /**
- * @param manager The service manager.
- * @param config The publication configuration.
- */
- public PublicationFactory(ServiceManager manager, PublicationConfiguration config) {
- this.manager = manager;
- this.config = config;
- }
-
- public RepositoryItem buildItem(Session session, String key) throws RepositoryException {
- DocumentFactory factory = DocumentUtil.createDocumentFactory(this.manager, session);
- return new PublicationImpl(this.manager, factory, config);
- }
-
- public String getItemType() {
- return Publication.ITEM_TYPE;
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationImpl.java b/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationImpl.java
deleted file mode 100644
index ae61927..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationImpl.java
+++ /dev/null
@@ -1,262 +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.lenya.cms.publication;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.cocoon.components.context.ContextUtility;
-import org.apache.lenya.cms.repository.Session;
-
-/**
- * A publication.
- * @version $Id$
- */
-public class PublicationImpl extends AbstractLogEnabled implements Publication {
-
- private PublicationConfiguration delegate;
- protected ServiceManager manager;
- private DocumentFactory factory;
-
- protected PublicationImpl(ServiceManager manager, DocumentFactory factory,
- PublicationConfiguration delegate) {
- this.delegate = delegate;
- this.manager = manager;
- this.factory = factory;
- }
-
- public boolean exists() {
- return delegate.exists();
- }
-
- public String getBreadcrumbPrefix() {
- return delegate.getBreadcrumbPrefix();
- }
-
- public String getContentDir() {
- return delegate.getContentDir();
- }
-
- public File getContentDirectory(String area) {
- return delegate.getContentDirectory(area);
- }
-
- public String getContentURI(String area) {
- return delegate.getContentURI(area);
- }
-
- public String getDefaultLanguage() {
- return delegate.getDefaultLanguage();
- }
-
- public File getDirectory() {
- return delegate.getDirectory();
- }
-
- private DocumentBuilder documentBuilder;
-
- public DocumentBuilder getDocumentBuilder() {
- if (this.documentBuilder == null) {
- ServiceSelector selector = null;
- try {
- selector = (ServiceSelector) this.manager.lookup(DocumentBuilder.ROLE + "Selector");
- this.documentBuilder = (DocumentBuilder) selector.select(delegate.getDocumentBuilderHint());
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
- return this.documentBuilder;
- }
-
- public String getId() {
- return delegate.getId();
- }
-
- public String getInstantiatorHint() {
- return delegate.getInstantiatorHint();
- }
-
- public String[] getLanguages() {
- return delegate.getLanguages();
- }
-
- public DocumentIdToPathMapper getPathMapper() {
- return delegate.getPathMapper();
- }
-
- public Proxy getProxy(Document document, boolean isSslProtected) {
- return getProxy(document.getArea(), isSslProtected);
- }
-
- public Proxy getProxy(String area, boolean isSslProtected) {
- Proxy proxy = delegate.getProxy(area, isSslProtected);
- if (proxy == null) {
- String url = getDefaultProxyUrl(area);
- proxy = new Proxy();
- proxy.setUrl(url);
- this.delegate.setProxy(area, isSslProtected, proxy);
- }
- return proxy;
- }
-
- private String contextPath;
-
- protected String getContextPath() {
- if (this.contextPath == null) {
- ContextUtility context = null;
- try {
- context = (ContextUtility) this.manager.lookup(ContextUtility.ROLE);
- this.contextPath = context.getRequest().getContextPath();
- } catch (ServiceException e) {
- throw new RuntimeException(e);
- }
- finally {
- if (context != null) {
- this.manager.release(context);
- }
- }
- }
- return this.contextPath;
- }
-
- /**
- * @param area The area.
- * @return The proxy URL if no proxy is declared in {@link PublicationConfiguration#CONFIGURATION_FILE}.
- */
- protected String getDefaultProxyUrl(String area) {
- return getContextPath() + "/" + getId() + "/" + area;
- }
-
- private List allResourceTypes;
-
- protected String getFirstTemplateId() {
- String[] templateIds = getTemplateIds();
- if (templateIds.length > 0) {
- return templateIds[0];
- } else {
- return null;
- }
- }
-
- public String[] getResourceTypeNames() {
- if (this.allResourceTypes == null) {
- this.allResourceTypes = new ArrayList();
- this.allResourceTypes.addAll(Arrays.asList(this.delegate.getResourceTypeNames()));
- String templateId = getFirstTemplateId();
- if (templateId != null) {
- try {
- Publication template = getFactory().getPublication(templateId);
- String[] templateTypes = template.getResourceTypeNames();
- this.allResourceTypes.addAll(Arrays.asList(templateTypes));
- } catch (PublicationException e) {
- throw new RuntimeException(e);
- }
- }
- }
- return (String[]) this.allResourceTypes.toArray(new String[this.allResourceTypes.size()]);
- }
-
- public File getServletContext() {
- return delegate.getServletContext();
- }
-
- public String getSiteManagerHint() {
- return delegate.getSiteManagerHint();
- }
-
- public String getSourceURI() {
- return delegate.getSourceURI();
- }
-
- public String[] getTemplateIds() {
- return delegate.getTemplateIds();
- }
-
- public String getWorkflowSchema(ResourceType resourceType) {
- String schema = this.delegate.getWorkflowSchema(resourceType);
- if (schema == null && getTemplateIds().length > 0) {
- String templateId = getFirstTemplateId();
- try {
- Publication template = getFactory().getPublication(templateId);
- schema = template.getWorkflowSchema(resourceType);
- } catch (PublicationException e) {
- throw new RuntimeException(e);
- }
- }
- return schema;
- }
-
- public void setDefaultLanguage(String language) {
- delegate.setDefaultLanguage(language);
- }
-
- public void setPathMapper(DefaultDocumentIdToPathMapper mapper) {
- delegate.setPathMapper(mapper);
- }
-
- private Map areas = new HashMap();
-
- public Area getArea(String name) throws PublicationException {
- if (!this.areas.containsKey(name)) {
- Area area = new AreaImpl(this.manager, this.factory, this, name);
- this.areas.put(name, area);
- }
- return (Area) this.areas.get(name);
- }
-
- public String[] getAreaNames() {
- return delegate.getAreaNames();
- }
-
- public DocumentFactory getFactory() {
- return this.factory;
- }
-
- public boolean equals(Object obj) {
- if (!getClass().isInstance(obj)) {
- return false;
- }
- return ((Publication) obj).getId().equals(getId());
- }
-
- public int hashCode() {
- return getId().hashCode();
- }
-
- public String toString() {
- return getId();
- }
-
- public String getName() {
- return delegate.getName();
- }
-
- public Session getSession() {
- return getFactory().getSession();
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationManagerImpl.java b/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationManagerImpl.java
deleted file mode 100644
index 6a8f29a..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationManagerImpl.java
+++ /dev/null
@@ -1,165 +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.
- *
- */
-
-/* $Id: PublicationFactory.java 177927 2005-05-23 05:32:20Z gregor $ */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceUtil;
-import org.apache.lenya.cms.repository.RepositoryException;
-import org.apache.lenya.util.Assert;
-
-/**
- * Factory for creating publication objects.
- */
-public final class PublicationManagerImpl extends AbstractLogEnabled implements PublicationManager,
- Serviceable, Initializable, ThreadSafe {
-
- /**
- * Create a new <code>PublicationFactory</code>.
- */
- public PublicationManagerImpl() {
- }
-
- private Map id2config;
-
- protected synchronized Map getId2config() throws PublicationException {
- if (this.id2config == null) {
- this.id2config = new HashMap();
- File servletContext = new File(this.servletContextPath);
- File publicationsDirectory = new File(servletContext, Publication.PUBLICATION_PREFIX);
- File[] publicationDirectories = publicationsDirectory.listFiles(new FileFilter() {
- public boolean accept(File file) {
- File configFile = new File(file, PublicationConfiguration.CONFIGURATION_FILE);
- return configFile.exists();
- }
- });
- for (int i = 0; i < publicationDirectories.length; i++) {
- String id = publicationDirectories[i].getName();
- addPublication(id);
- }
- }
- return this.id2config;
- }
-
- public Publication getPublication(DocumentFactory factory, String id)
- throws PublicationException {
-
- Assert.notNull("publication ID", id);
- Map id2config = getId2config();
- if (!id2config.containsKey(id)) {
- throw new PublicationException("The publication [" + id + "] does not exist.");
- }
-
- PublicationConfiguration config = (PublicationConfiguration) id2config.get(id);
- PublicationFactory pubFactory = new PublicationFactory(this.manager, config);
- try {
- return (Publication) factory.getSession().getRepositoryItem(pubFactory, id);
- } catch (RepositoryException e) {
- throw new PublicationException(e);
- }
- }
-
- public Publication[] getPublications(DocumentFactory factory) {
- List publications = new ArrayList();
-
- try {
- Map id2config = getId2config();
- for (Iterator i = id2config.keySet().iterator(); i.hasNext();) {
- String publicationId = (String) i.next();
- Publication publication = getPublication(factory, publicationId);
- publications.add(publication);
- }
- } catch (RuntimeException e) {
- throw e;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
- return (Publication[]) publications.toArray(new Publication[publications.size()]);
- }
-
- public String[] getPublicationIds() {
- Set ids;
- try {
- ids = getId2config().keySet();
- } catch (PublicationException e) {
- throw new RuntimeException(e);
- }
- return (String[]) ids.toArray(new String[ids.size()]);
- }
-
- private String servletContextPath;
-
- private ServiceManager manager;
-
- public void service(ServiceManager manager) throws ServiceException {
- this.manager = manager;
- }
-
- public void initialize() throws Exception {
- SourceResolver resolver = null;
- Source source = null;
- try {
- resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
- source = resolver.resolveURI("context:///");
- this.servletContextPath = SourceUtil.getFile(source).getCanonicalPath();
- } finally {
- if (resolver != null) {
- if (source != null) {
- resolver.release(source);
- }
- this.manager.release(resolver);
- }
- }
- }
-
- public void addPublication(String pubId) throws PublicationException {
- Map id2config = getId2config();
- if (id2config.containsKey(pubId)) {
- throw new PublicationException("The publication [" + pubId + "] already exists.");
- }
- PublicationConfiguration config = new PublicationConfiguration(pubId,
- this.servletContextPath);
- ContainerUtil.enableLogging(config, getLogger());
- id2config.put(pubId, config);
- }
-
- protected String getServletContextPath() {
- return this.servletContextPath;
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java b/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java
deleted file mode 100644
index 8a9039e..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java
+++ /dev/null
@@ -1,255 +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.lenya.cms.publication;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.util.Assert;
-import org.apache.lenya.xml.Schema;
-
-/**
- * Resource type.
- *
- * @version $Id:$
- */
-public class ResourceTypeImpl extends AbstractLogEnabled implements Configurable, ThreadSafe,
- ResourceType, Serviceable {
-
- /**
- * The default sample name.
- */
- public static final String DEFAULT_SAMPLE_NAME = "Default Sample";
-
- protected static final String ATTRIBUTE_URI = "uri";
- protected static final String ATTRIBUTE_NAME = "name";
- protected static final String ELEMENT_SCHEMA = "schema";
- protected static final String ATTRIBUTE_NAMESPACE = "namespace";
- protected static final String ELEMENT_REWRITE_ATTRIBUTE = "link-attribute";
- protected static final String ATTRIBUTE_XPATH = "xpath";
- protected static final String ELEMENT_SAMPLES = "samples";
- protected static final String ELEMENT_SAMPLE = "sample";
- protected static final String ATTRIBUTE_MIME_TYPE = "mime-type";
- protected static final String ELEMENT_FORMAT = "format";
- protected static final String ELEMENT_EXPIRES = "expires";
- protected static final String ATTRIBUTE_SECONDS = "seconds";
-
- private Schema schema = null;
- private String[] linkAttributeXPaths;
- private Map samples;
- private String samplesUri = null;
- private Map formats = new HashMap();
- private long expires = 0;
- private String name;
- private ServiceManager manager;
-
- /**
- * A format.
- */
- public static class Format {
- private String uri;
- /**
- * @param uri The uri.
- */
- public Format(String uri) {
- Assert.notNull("uri", uri);
- this.uri = uri;
- }
- /**
- * @return The uri.
- */
- public String getURI() {
- return this.uri;
- }
- }
-
-
- /**
- * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
- */
- public void configure(Configuration config) throws ConfigurationException {
-
- try {
-
- Configuration schemaConf = config.getChild(ELEMENT_SCHEMA, false);
-
- if (schemaConf != null) {
- String uri = schemaConf.getAttribute(ATTRIBUTE_URI);
- String language = schemaConf.getAttribute(ATTRIBUTE_NAMESPACE);
- this.schema = new Schema(language, uri);
- }
-
- // determine the sample content locations.
- Configuration samplesFileConf = config.getChild(ELEMENT_SAMPLES, false);
- if (samplesFileConf != null) {
- this.samplesUri = samplesFileConf.getAttribute(ATTRIBUTE_URI);
- }
- else {
- this.samples = loadSamples(config);
- }
-
-
- Configuration[] rewriteAttributeConfigs = config.getChildren(ELEMENT_REWRITE_ATTRIBUTE);
- List xPaths = new ArrayList();
- for (int i = 0; i < rewriteAttributeConfigs.length; i++) {
- String xPath = rewriteAttributeConfigs[i].getAttribute(ATTRIBUTE_XPATH);
- xPaths.add(xPath);
- }
- this.linkAttributeXPaths = (String[]) xPaths.toArray(new String[xPaths.size()]);
-
- Configuration[] formatConfigs = config.getChildren(ELEMENT_FORMAT);
- for (int i = 0; i < formatConfigs.length; i++) {
- String name = formatConfigs[i].getAttribute(ATTRIBUTE_NAME);
- String uri = formatConfigs[i].getAttribute(ATTRIBUTE_URI);
- this.formats.put(name, new Format(uri));
- }
-
- Configuration expiresConf = config.getChild(ELEMENT_EXPIRES, false);
- if (expiresConf != null) {
- this.expires = expiresConf.getAttributeAsLong(ATTRIBUTE_SECONDS);
- }
-
- } catch (Exception e) {
- throw new ConfigurationException("Configuring resource type failed: ", e);
- }
-
- }
-
- protected Map loadSamples(Configuration samplesParentConfig) throws ConfigurationException {
- Configuration[] samplesConf = samplesParentConfig.getChildren(ELEMENT_SAMPLE);
- Map samples = new LinkedHashMap();
- for (int i = 0; i < samplesConf.length; i++) {
- String name = samplesConf[i].getAttribute(ATTRIBUTE_NAME, DEFAULT_SAMPLE_NAME);
- String mimeType = samplesConf[i].getAttribute(ATTRIBUTE_MIME_TYPE);
- String uri = samplesConf[i].getAttribute(ATTRIBUTE_URI);
- samples.put(name, new Sample(name, mimeType, uri));
- }
- return samples;
- }
-
- protected Configuration readConfiguration(String uri) throws ConfigurationException {
- Configuration config;
- DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
- SourceResolver resolver = null;
- Source source = null;
- try {
- resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
- source = resolver.resolveURI(uri);
- config = builder.build(source.getInputStream());
- }
- catch (Exception e) {
- throw new ConfigurationException("Loading samples from URI [" + uri + "] failed: ", e);
- }
- finally {
- if (resolver != null) {
- if (source != null) {
- resolver.release(source);
- }
- this.manager.release(resolver);
- }
- }
- return config;
- }
-
- public Date getExpires() {
- Date date = new Date();
- date.setTime(date.getTime() + this.expires * 1000l);
- return date;
- }
-
- public Schema getSchema() {
- return this.schema;
- }
-
- public String[] getLinkAttributeXPaths() {
- return this.linkAttributeXPaths;
- }
-
- protected Map getSamples() {
- if (this.samplesUri == null) {
- return this.samples;
- }
- else {
- try {
- Configuration samplesConfig = readConfiguration(this.samplesUri);
- return loadSamples(samplesConfig);
- } catch (ConfigurationException e) {
- throw new RuntimeException(e);
- }
-
- }
- }
-
- public String[] getSampleNames() {
- Set names = getSamples().keySet();
- return (String[]) names.toArray(new String[names.size()]);
- }
-
- public Sample getSample(String name) {
- Map samples = getSamples();
- if (!samples.containsKey(name)) {
- throw new IllegalArgumentException("No sample with name [" + name + "] found.");
- }
- return (Sample) samples.get(name);
- }
-
- public void setName(String name) {
- Assert.notNull("name", name);
- this.name = name;
- }
-
- public String getName() {
- return this.name;
- }
-
- public String[] getFormats() {
- Set names = this.formats.keySet();
- return (String[]) names.toArray(new String[names.size()]);
- }
-
- public String getFormatURI(String format) {
-
- if (!this.formats.containsKey(format)) {
- throw new RuntimeException("The resource type [" + getName()
- + "] does not support the format [" + format + "].");
- }
-
- return ((Format) this.formats.get(format)).getURI();
- }
-
- public void service(ServiceManager manager) throws ServiceException {
- this.manager = manager;
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeSelector.java b/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeSelector.java
deleted file mode 100644
index 666c4f1..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeSelector.java
+++ /dev/null
@@ -1,40 +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.lenya.cms.publication;
-
-import org.apache.avalon.framework.component.Component;
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.cocoon.components.ExtendedComponentSelector;
-
-/**
- * Specifis selector for resource types.
- */
-public class ResourceTypeSelector extends ExtendedComponentSelector{
-
- /**
- * @see org.apache.cocoon.components.ExtendedComponentSelector#select(java.lang.Object)
- */
- public Component select(Object hint) throws ComponentException {
- ResourceType type = (ResourceType) super.select(hint);
- if (type != null) {
- type.setName((String) hint);
- }
- return (Component) type;
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/repository/AxisUUIDGenerator.java b/trunk/src/impl/java/org/apache/lenya/cms/repository/AxisUUIDGenerator.java
deleted file mode 100644
index dd075fe..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/repository/AxisUUIDGenerator.java
+++ /dev/null
@@ -1,43 +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.lenya.cms.repository;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.axis.components.uuid.UUIDGen;
-import org.apache.axis.components.uuid.UUIDGenFactory;
-
-/**
- * UUID generator based on Apache Axis.
- */
-public class AxisUUIDGenerator extends AbstractLogEnabled implements UUIDGenerator, ThreadSafe {
-
- private UUIDGen delegate;
-
- protected UUIDGen getDelegate() {
- if (this.delegate == null) {
- this.delegate = UUIDGenFactory.getUUIDGen();
- }
- return this.delegate;
- }
-
- public String nextUUID() {
- return getDelegate().nextUUID();
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/cms/repository/SharedItemStoreImpl.java b/trunk/src/impl/java/org/apache/lenya/cms/repository/SharedItemStoreImpl.java
deleted file mode 100644
index 71d5531..0000000
--- a/trunk/src/impl/java/org/apache/lenya/cms/repository/SharedItemStoreImpl.java
+++ /dev/null
@@ -1,116 +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.lenya.cms.repository;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.cms.observation.RepositoryEvent;
-import org.apache.lenya.cms.observation.RepositoryListener;
-import org.apache.lenya.transaction.IdentityMap;
-import org.apache.lenya.transaction.IdentityMapImpl;
-import org.apache.lenya.transaction.Lock;
-import org.apache.lenya.transaction.Lockable;
-import org.apache.lenya.transaction.TransactionException;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Shared item store implementation.
- */
-public class SharedItemStoreImpl extends AbstractLogEnabled implements SharedItemStore, ThreadSafe {
-
- private IdentityMap map;
-
- protected synchronized IdentityMap getIdentityMap() {
- if (this.map == null) {
- this.map = new IdentityMapImpl(getLogger());
- }
- return this.map;
- }
-
- public void addListener(RepositoryListener listener) throws RepositoryException {
- throw new IllegalStateException("Operation not permitted.");
- }
-
- public void commit() throws RepositoryException {
- throw new IllegalStateException("Operation not permitted.");
- }
-
- public void enqueueEvent(RepositoryEvent event) {
- throw new IllegalStateException("Operation not permitted.");
- }
-
- public Identity getIdentity() {
- throw new IllegalStateException("Operation not permitted.");
- }
-
- public RepositoryItem getRepositoryItem(RepositoryItemFactory factory, String key)
- throws RepositoryException {
- RepositoryItemFactoryWrapper wrapper = new RepositoryItemFactoryWrapper(factory, this);
- return (RepositoryItem) getIdentityMap().get(wrapper, key);
- }
-
- public boolean isListenerRegistered(RepositoryListener listener) {
- return false;
- }
-
- public boolean isModifiable() {
- return false;
- }
-
- public void rollback() throws RepositoryException {
- throw new IllegalStateException("Operation not permitted.");
- }
-
- public void setIdentity(Identity identity) {
- throw new IllegalStateException("Operation not permitted.");
- }
-
- public Lock createLock(Lockable lockable, int version) throws TransactionException {
- throw new IllegalStateException("Operation not permitted.");
- }
-
- public boolean isDirty(Transactionable transactionable) {
- return false;
- }
-
- public void registerDirty(Transactionable object) throws TransactionException {
- throw new IllegalStateException("Operation not permitted.");
- }
-
- public void registerNew(Transactionable object) throws TransactionException {
- throw new IllegalStateException("Operation not permitted.");
- }
-
- public void registerRemoved(Transactionable object) throws TransactionException {
- throw new IllegalStateException("Operation not permitted.");
- }
-
- public void removeLock(Lockable lockable) throws TransactionException {
- throw new IllegalStateException("Operation not permitted.");
- }
-
- public synchronized void clear() {
- this.map = null;
- }
-
- public String getId() {
- return getClass().getName();
- }
-
-}
diff --git a/trunk/src/impl/java/org/apache/lenya/lenya.roles b/trunk/src/impl/java/org/apache/lenya/lenya.roles
deleted file mode 100644
index d8666ae..0000000
--- a/trunk/src/impl/java/org/apache/lenya/lenya.roles
+++ /dev/null
@@ -1,186 +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.
--->
-<!--
- This file contains the role definitions for Lenya-specific Avalon services.
- A role is the interface for an Avalon service.
-
- The name of the role usually corresponds to the class name of the interface,
- and is used for looking up a class implementing that interface.
-
- The relation between a role and implementations for that role may be
- one-to-one or one-to-many.
-
- For a one-to-one relationship, the entry in this file can be sufficient
- to completely specify this role, by setting the "default-class" for that
- role. This is the class name of the implementation.
-
- For a one-to-many relationship, the entry in this file refers to an
- ExtendedComponentSelector, meaning that the list of available
- implementations for that role are retrieved via a selector.
- This requires additional configuration in the Cocoon service
- configuration file (cocoon.xconf).
-
- If a service requires configuration parameters, these can be specified
- in the Cocoon service configuration file (cocoon.xconf) as an arbitrary
- XML snippet which is then automatically passed to the service's
- configure() method at initialization.
-
- $Id$
- -->
-
-<!DOCTYPE role-list [
-<!ELEMENT role-list (role+)>
-<!ELEMENT role (hint*)>
-<!ELEMENT hint EMPTY>
-<!ATTLIST role name CDATA #REQUIRED
- shorthand CDATA #REQUIRED
- default-class CDATA #IMPLIED
->
-<!ATTLIST hint shorthand CDATA #REQUIRED
- class CDATA #REQUIRED
->
-]>
-
-<role-list>
-
- <role name="org.apache.lenya.ac.AuthorizerSelector"
- shorthand="authorizers"
- default-class="org.apache.cocoon.components.ExtendedComponentSelector">
- <hint shorthand="policy" class="org.apache.lenya.ac.impl.PolicyAuthorizer"/>
- <hint shorthand="workflow" class="org.apache.lenya.cms.ac.workflow.WorkflowAuthorizer"/>
- <hint shorthand="usecase" class="org.apache.lenya.cms.ac.usecase.UsecaseAuthorizer"/>
- </role>
-
- <role name="org.apache.lenya.ac.PolicyManagerSelector"
- shorthand="policy-managers"
- default-class="org.apache.cocoon.components.ExtendedComponentSelector">
- <hint shorthand="file" class="org.apache.lenya.ac.file.FilePolicyManager"/>
- <hint shorthand="sitemap" class="org.apache.lenya.cms.ac.sitemap.SitemapPolicyManager"/>
- </role>
-
- <role name="org.apache.lenya.ac.AccessController"
- shorthand="access-controller"
- default-class="org.apache.lenya.ac.impl.BypassableAccessController"/>
-
- <role name="org.apache.lenya.ac.AccessControllerResolverSelector"
- shorthand="access-controller-resolvers"
- default-class="org.apache.cocoon.components.ExtendedComponentSelector">
- <hint shorthand="composable" class="org.apache.lenya.ac.ComposableAccessControllerResolver"/>
- <hint shorthand="configurable" class="org.apache.lenya.ac.ConfigurableAccessControllerResolver"/>
- <hint shorthand="publication" class="org.apache.lenya.cms.ac.PublicationAccessControllerResolver"/>
- </role>
-
- <role name="org.apache.lenya.ac.Authenticator"
- shorthand="authenticator"
- default-class="org.apache.lenya.ac.impl.UserAuthenticator"/>
-
- <role name="org.apache.lenya.ac.cache.SourceCache"
- shorthand="sourcecache"
- default-class="org.apache.lenya.ac.cache.SourceCacheImpl"/>
-
- <role name="org.apache.lenya.cms.publication.templating.PublicationTemplateManager"
- shorthand="publication-template-manager"
- default-class="org.apache.lenya.cms.publication.templating.PublicationTemplateManagerImpl"/>
-
- <role name="org.apache.lenya.cms.usecase.Operation"
- shorthand="operation"
- default-class="org.apache.lenya.cms.usecase.AbstractOperation"/>
-
- <role name="org.apache.lenya.cms.usecase.UsecaseSelector"
- shorthand="usecases"
- default-class="org.apache.lenya.cms.usecase.impl.UsecaseSelector"/>
-
- <role name="org.apache.lenya.cms.cocoon.flow.FlowHelper"
- shorthand="flowhelper"
- default-class="org.apache.lenya.cms.cocoon.flow.FlowHelperImpl"/>
-
- <role name="org.apache.lenya.workflow.WorkflowManager"
- shorthand="workflow-manager"
- default-class="org.apache.lenya.workflow.impl.WorkflowManagerImpl"/>
-
- <role name="org.apache.lenya.cms.site.usecases.LinkRewriter"
- shorthand="link-rewriter"
- default-class="org.apache.lenya.cms.site.usecases.LinkRewriterImpl"/>
-
- <role name="org.apache.lenya.cms.publication.DocumentManager"
- shorthand="document-manager"
- default-class="org.apache.lenya.cms.publication.DocumentManagerImpl"/>
-
- <role name="org.apache.lenya.cms.publication.DocumentTypeBuilder"
- shorthand="document-type-builder"
- default-class="org.apache.lenya.cms.publication.DocumentTypeBuilderImpl"/>
-
- <role name="org.apache.lenya.cms.publication.ResourcesManager"
- shorthand="resources-manager"
- default-class="org.apache.lenya.cms.publication.DefaultResourcesManager"/>
-
- <role name="org.apache.lenya.cms.site.SiteManagerSelector"
- shorthand="site-managers"
- default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
-
- <role name="org.apache.lenya.cms.publication.DocumentBuilderSelector"
- shorthand="document-builders"
- default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
-
- <role name="org.apache.lenya.cms.publication.templating.InstantiatorSelector"
- shorthand="template-instantiators"
- default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
-
- <role name="org.apache.lenya.cms.usecase.gui.GUIManager"
- shorthand="gui-manager"
- default-class="org.apache.lenya.cms.usecase.gui.impl.GUIManagerImpl"/>
-
- <role name="org.apache.lenya.cms.publication.ResourceTypeSelector"
- shorthand="resource-types"
- default-class="org.apache.lenya.cms.publication.ResourceTypeSelector"/>
-
- <role name="org.apache.lenya.cms.metadata.ElementSetSelector"
- shorthand="meta-data"
- default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
-
- <role name="org.apache.lenya.cms.repository.RepositoryManager"
- shorthand="repository-manager"
- default-class="org.apache.lenya.cms.repository.RepositoryManagerImpl"/>
-
- <role name="org.apache.lenya.cms.publication.PublicationManager"
- shorthand="publication-manager"
- default-class="org.apache.lenya.cms.publication.PublicationManagerImpl"/>
-
- <role name="org.apache.lenya.cms.repo.avalon.RepositoryFactory"
- shorthand="repository-factory"
- default-class="org.apache.lenya.cms.repo.avalon.RepositoryFactoryImpl"/>
-
-<!-- RGE: inserted roles used by the Lucene2 block -->
-
- <!-- default indexer -->
- <role name="org.apache.cocoon.components.search.components.Indexer/default" shorthand="default_indexer"
-default-class="org.apache.cocoon.components.search.components.impl.DefaultIndexerImpl"/>
-
- <!-- parallel indexer -->
- <role name="org.apache.cocoon.components.search.components.Indexer/parallel" shorthand="parallel_indexer"
-default-class="org.apache.cocoon.components.search.components.impl.ParallelIndexerImpl"/>
-
- <!-- analyzer manager -->
- <role name="org.apache.cocoon.components.search.components.AnalyzerManager" shorthand="analyzer_manager"
-default-class="org.apache.cocoon.components.search.components.impl.AnalyzerManagerImpl"/>
-
- <!-- index manager -->
- <role name="org.apache.cocoon.components.search.components.IndexManager" shorthand="index_manager"
-default-class="org.apache.cocoon.components.search.components.impl.IndexManagerImpl"/>
-
-</role-list>
diff --git a/trunk/src/impl/test/anteater/tests.xml b/trunk/src/impl/test/anteater/tests.xml
deleted file mode 100644
index e3fa051..0000000
--- a/trunk/src/impl/test/anteater/tests.xml
+++ /dev/null
@@ -1,40 +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.
--->
-
-<!-- $Id$ -->
-
-<!DOCTYPE project [
- <!ENTITY default SYSTEM "../../webapp/lenya/pubs/default/test/anteater/tests.xml">
-]>
-
-<project name="Lenya Anteater Tests" default="tests">
-
- <taskdef resource="META-INF/Anteater.tasks"/>
- <typedef resource="META-INF/Anteater.types"/>
-
- <property name="default.port" value="8888"/>
- <property name="default.haltonerror" value="true"/>
-
- <target name="tests"
- depends="
- pubs.default
- "/>
-
- &default;
-
-</project>
\ No newline at end of file
diff --git a/trunk/src/impl/test/org/apache/lenya/ac/impl/AbstractAccessControlTest.java b/trunk/src/impl/test/org/apache/lenya/ac/impl/AbstractAccessControlTest.java
deleted file mode 100644
index ab9a462..0000000
--- a/trunk/src/impl/test/org/apache/lenya/ac/impl/AbstractAccessControlTest.java
+++ /dev/null
@@ -1,203 +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.
- *
- */
-
-/* $Id: AccessControlTest.java 408702 2006-05-22 16:03:49Z andreas $ */
-
-package org.apache.lenya.ac.impl;
-
-import java.io.File;
-
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccessControllerResolver;
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.PolicyManager;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.file.FileAccreditableManager;
-import org.apache.lenya.cms.LenyaTestCase;
-import org.apache.lenya.cms.ac.PublicationAccessControllerResolver;
-import org.apache.lenya.cms.publication.DocumentFactory;
-import org.apache.lenya.cms.publication.DocumentUtil;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.repository.Session;
-import org.apache.lenya.cms.repository.SessionImpl;
-
-/**
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class AbstractAccessControlTest extends LenyaTestCase {
-
- protected static final String TEST_PUB_ID = "test";
- private ServiceSelector accessControllerResolverSelector;
- private AccessControllerResolver accessControllerResolver;
- private DefaultAccessController accessController;
-
- protected org.apache.lenya.cms.repository.Session login(String userId)
- throws AccessControlException {
-
- Session session = new SessionImpl(null, true, getManager(), getLogger());
-
- DefaultAccessController ac = getAccessController(session, TEST_PUB_ID);
- AccreditableManager acMgr = ac.getAccreditableManager();
- User user = acMgr.getUserManager().getUser(userId);
-
- if (user == null) {
- throw new AccessControlException("The user [" + userId + "] does not exist!");
- }
-
- ac.setupIdentity(getRequest());
-
- org.apache.cocoon.environment.Session cocoonSession = getRequest().getSession();
- Identity identity = (Identity) cocoonSession.getAttribute(Identity.class.getName());
-
- if (!identity.contains(user)) {
- User oldUser = identity.getUser();
- if (oldUser != null) {
- if (getLogger().isDebugEnabled()) {
- getLogger().debug("Removing user [" + oldUser + "] from identity.");
- }
- identity.removeIdentifiable(oldUser);
- }
- identity.addIdentifiable(user);
- }
-
- ac.authorize(getRequest());
-
- Accreditable[] accrs = identity.getAccreditables();
- for (int i = 0; i < accrs.length; i++) {
- getLogger().info("Accreditable: " + accrs[i]);
- }
-
- session.setIdentity(identity);
- return session;
- }
-
- protected DefaultAccessController getAccessController() {
- return getAccessController(getSession(), TEST_PUB_ID);
- }
-
- protected DefaultAccessController getAccessController(Session session, String pubId) {
- DefaultAccessController controller;
- try {
- this.accessControllerResolverSelector = (ServiceSelector) getManager().lookup(
- AccessControllerResolver.ROLE + "Selector");
- assertNotNull(this.accessControllerResolverSelector);
-
- this.accessControllerResolver = (AccessControllerResolver) this.accessControllerResolverSelector
- .select(AccessControllerResolver.DEFAULT_RESOLVER);
-
- assertNotNull(this.accessControllerResolver);
- getLogger().info(
- "Using access controller resolver: ["
- + this.accessControllerResolver.getClass() + "]");
-
- Publication pub = getPublication(session, pubId);
- getLogger().info("Resolve access controller");
- getLogger().info(
- "Publication directory: [" + pub.getDirectory().getAbsolutePath() + "]");
-
- String url = "/" + pubId + "/authoring/index.html";
- controller = (DefaultAccessController) ((PublicationAccessControllerResolver) this.accessControllerResolver)
- .resolveAccessController(url);
-
- assertNotNull(controller);
- getLogger().info("Resolved access controller: [" + controller.getClass() + "]");
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- return controller;
- }
-
- /**
- * The teardown method for JUnit
- * @exception Exception if an error occurs
- */
- public void tearDown() throws Exception {
-
- if (this.accessControllerResolverSelector != null) {
- if (this.accessControllerResolver != null) {
- if (this.accessController != null) {
- this.accessControllerResolver.release(this.accessController);
- }
- this.accessControllerResolverSelector.release(this.accessControllerResolver);
- }
- getManager().release(this.accessControllerResolverSelector);
- }
- super.tearDown();
- }
-
- protected static final String USERNAME = "lenya";
-
- /**
- * Returns the policy manager.
- * @return A policy manager.
- */
- protected PolicyManager getPolicyManager() {
- return getAccessController().getPolicyManager();
- }
-
- /**
- * Returns the accreditable manager.
- * @return An accreditable manager.
- */
- protected AccreditableManager getAccreditableManager() {
- return getAccessController().getAccreditableManager();
- }
-
- protected File getAccreditablesDirectory() throws AccessControlException {
- FileAccreditableManager accrMgr = (FileAccreditableManager) getAccreditableManager();
- return accrMgr.getConfigurationDirectory();
- }
-
- protected DocumentFactory getFactory() {
- return DocumentUtil.createDocumentFactory(getManager(), getSession());
- }
-
- protected DocumentFactory getFactory(Session session) {
- return DocumentUtil.createDocumentFactory(getManager(), session);
- }
-
- private Session session;
-
- protected Session getSession() {
- if (this.session == null) {
- try {
- this.session = login("lenya");
- } catch (AccessControlException e) {
- throw new RuntimeException(e);
- }
- }
- return this.session;
- }
-
- protected Publication getPublication(Session session, String pubId) throws PublicationException {
- return getFactory(session).getPublication(pubId);
- }
-
- protected Publication getPublication(String id) throws PublicationException {
- return getFactory().getPublication(id);
- }
-
- protected Identity getIdentity() {
- return getSession().getIdentity();
- }
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/AbstractExcaliburTest.java b/trunk/src/impl/test/org/apache/lenya/cms/AbstractExcaliburTest.java
deleted file mode 100644
index 5431c6d..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/AbstractExcaliburTest.java
+++ /dev/null
@@ -1,54 +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.
- *
- */
-
-/* $Id$ */
-
-package org.apache.lenya.cms;
-
-import java.io.InputStream;
-
-import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
-
-/**
- * Abstract base class for excalibur tests
- */
-public abstract class AbstractExcaliburTest extends ExcaliburTestCase {
-
- /**
- * <code>CONFIGURATION</code> The path to the configuration
- */
- public static final String CONFIGURATION = "/" +
- AbstractExcaliburTest.class.getPackage().getName().replace('.', '/') + "/lenya.xtest";
-
- /**
- * @param test The test.
- */
- public AbstractExcaliburTest(String test) {
- super(test);
- }
-
- /**
- * @see org.apache.avalon.excalibur.testcase.ExcaliburTestCase#prepare()
- */
- protected void prepare() throws Exception {
- System.out.println(CONFIGURATION);
- InputStream stream = AbstractExcaliburTest.class.getResourceAsStream(CONFIGURATION);
- prepare(stream);
- }
-
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/LenyaTestCase.java b/trunk/src/impl/test/org/apache/lenya/cms/LenyaTestCase.java
deleted file mode 100644
index baea69f..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/LenyaTestCase.java
+++ /dev/null
@@ -1,171 +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.lenya.cms;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.context.DefaultContext;
-import org.apache.cocoon.Constants;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.core.container.ContainerTestCase;
-import org.apache.cocoon.environment.Context;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.commandline.CommandLineContext;
-import org.apache.cocoon.environment.commandline.CommandLineRequest;
-import org.apache.cocoon.environment.mock.MockEnvironment;
-import org.apache.cocoon.util.IOUtils;
-import org.apache.commons.lang.SystemUtils;
-import org.apache.excalibur.source.SourceResolver;
-
-/**
- * Base class for Lenya tests which need the context information.
- */
-public class LenyaTestCase extends ContainerTestCase {
-
- protected DefaultContext context;
-
- protected void addContext(DefaultContext context) {
- super.addContext(context);
-
- this.context = context;
-
- String tempPath = System.getProperty("tempDir", "build/lenya/temp");
- String contextRoot = System.getProperty("contextRoot", "build/lenya/webapp");
- getLogger().info("Adding context root entry [" + contextRoot + "]");
-
- File contextRootDir = new File(contextRoot);
- context.put("context-root", contextRootDir);
-
- String testPath = System.getProperty("testPath", "build/test");
- File testRootDir = new File(testPath);
- context.put("test-path", testRootDir);
-
- Context envContext = new CommandLineContext(contextRoot);
- ContainerUtil.enableLogging(envContext, getLogger());
- context.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, envContext);
-
- File tempDir = new File(tempPath);
-
- File workDir = new File(tempDir, "work");
- context.put("work-directory", workDir);
-
- File cacheDir = new File(tempDir, "cache");
- context.put(Constants.CONTEXT_CACHE_DIR, cacheDir);
-
- File uploadDir = new File(tempDir, "upload");
- context.put(Constants.CONTEXT_UPLOAD_DIR, uploadDir);
-
- context.put(Constants.CONTEXT_CLASS_LOADER, LenyaTestCase.class.getClassLoader());
- context.put(Constants.CONTEXT_CLASSPATH, getClassPath(contextRoot));
- // context.put(Constants.CONTEXT_CONFIG_URL, conf.toURL());
- context.put(Constants.CONTEXT_DEFAULT_ENCODING, "ISO-8859-1");
- }
-
- private Request request = null;
-
- protected Request getRequest() {
- return this.request;
- }
-
- protected void prepare() throws Exception {
- File testPath = new File("build/test");
- final String resourceName = LenyaTestCase.class.getName().replace('.', '/') + ".xtest";
- File resourceFile = new File(testPath, resourceName.replace('/', File.separatorChar));
-
- if (resourceFile.isFile()) {
- getLogger().debug("Loading resource " + resourceFile.getAbsolutePath());
- prepare(new FileInputStream(resourceFile));
- } else {
- getLogger().debug("Resource not found " + resourceName);
- }
-
- SourceResolver resolver = (SourceResolver) getManager().lookup(SourceResolver.ROLE);
- MockEnvironment env = new MockEnvironment(resolver);
-
- String pathInfo = getWebappUrl();
-
- this.request = new CommandLineRequest(env,
- "",
- "",
- pathInfo,
- new HashMap(),
- getRequestParameters());
- context.put("object-model.request", this.request);
-
- Map objectModel = new HashMap();
- objectModel.put(ObjectModelHelper.REQUEST_OBJECT, request);
- Context envContext = (Context) context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT);
- objectModel.put(ObjectModelHelper.CONTEXT_OBJECT, envContext);
- context.put(ContextHelper.CONTEXT_OBJECT_MODEL, objectModel);
-
- }
-
- protected String getWebappUrl() {
- return "/test/authoring/index.html";
- }
-
- protected Map getRequestParameters() {
- return new HashMap();
- }
-
- /**
- * This builds the important ClassPath used by this class. It does so in a neutral way. It
- * iterates in alphabetical order through every file in the lib directory and adds it to the
- * classpath.
- *
- * Also, we add the files to the ClassLoader for the Cocoon system. In order to protect
- * ourselves from skitzofrantic classloaders, we need to work with a known one.
- *
- * @param context The context path
- * @return a <code>String</code> value
- */
- protected String getClassPath(final String context) {
- StringBuffer buildClassPath = new StringBuffer();
-
- String classDir = context + "/WEB-INF/classes";
- buildClassPath.append(classDir);
-
- File root = new File(context + "/WEB-INF/lib");
- if (root.isDirectory()) {
- File[] libraries = root.listFiles();
- Arrays.sort(libraries);
- for (int i = 0; i < libraries.length; i++) {
- if (libraries[i].getAbsolutePath().endsWith(".jar")) {
- buildClassPath.append(File.pathSeparatorChar)
- .append(IOUtils.getFullFilename(libraries[i]));
- }
- }
- }
-
- buildClassPath.append(File.pathSeparatorChar).append(SystemUtils.JAVA_CLASS_PATH);
-
- // Extra class path is necessary for non-classloader-aware java compilers to compile XSPs
- // buildClassPath.append(File.pathSeparatorChar)
- // .append(getExtraClassPath(context));
-
- getLogger().info("Context classpath: " + buildClassPath);
- return buildClassPath.toString();
- }
-
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/cocoon/generation/TestProxyGeneratorServlet.java b/trunk/src/impl/test/org/apache/lenya/cms/cocoon/generation/TestProxyGeneratorServlet.java
deleted file mode 100644
index 3db7121..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/cocoon/generation/TestProxyGeneratorServlet.java
+++ /dev/null
@@ -1,214 +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.
- *
- */
-
-/* $Id$ */
-
-package org.apache.lenya.cms.cocoon.generation;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Enumeration;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-
-/**
- * Proxy Generator Servlet Test
- */
-public class TestProxyGeneratorServlet extends HttpServlet {
- /**
- * Initialize, given a servlet configuration
- * @param config The configuration
- * @throws ServletException if an error occurs
- */
- public void init(ServletConfig config) throws ServletException {
- super.init(config);
- }
-
- /**
- * Get a request
- * @param request The request to get
- * @param response The response to put it in
- * @throws IOException if an IO error occurs
- * @throws ServletException if an error occurs
- */
- public void doGet(HttpServletRequest request, HttpServletResponse response)
- throws IOException, ServletException {
- response.setContentType("text/xml");
-
- PrintWriter writer = response.getWriter();
- writer.print("<?xml version=\"1.0\"?>");
- writer.print("<servlet class=\"" + this.getClass().getName() + "\">");
- writer.print("<request method=\"GET\">");
- writer.print(getRequestInfo(request));
- writer.print(getParameters(request));
- writer.print(getSession(request));
- writer.print(getCookies(request));
- writer.print("</request>");
- writer.print("</servlet>");
- }
-
- /**
- * Do a POST using the request and store the response in the response object
- * @param request The request
- * @param response The response
- * @throws ServletException if an error occurs
- * @throws IOException if an IO error occurs
- */
- public void doPost(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- response.setContentType("text/xml");
-
- PrintWriter writer = response.getWriter();
- writer.print("<?xml version=\"1.0\"?>");
- writer.print("<servlet class=\"" + this.getClass().getName() + "\">");
- writer.print("<request method=\"POST\">");
- writer.print(getRequestInfo(request));
- writer.print(getParameters(request));
- writer.print(getSession(request));
- writer.print(getCookies(request));
- writer.print("</request>");
- writer.print("</servlet>");
- }
-
- /**
- * Return the information about a request: URI, Server name and port
- * @param request The request
- * @return The information (as XML)
- */
- public String getRequestInfo(HttpServletRequest request) {
- StringBuffer sb = new StringBuffer("");
- sb.append("<URI>" + request.getRequestURI() + "</URI>");
- sb.append("<servername>" + request.getServerName() + "</servername>");
- sb.append("<serverport>" + request.getServerPort() + "</serverport>");
-
- return sb.toString();
- }
-
- /**
- * Get all parameters from a request
- * @param request The request
- * @return The parameters (as XML)
- */
- public String getParameters(HttpServletRequest request) {
- StringBuffer sb = new StringBuffer("");
- Enumeration parameters = request.getParameterNames();
- boolean hasParameters = parameters.hasMoreElements();
-
- if (hasParameters) {
- sb.append("<parameters>");
- }
-
- while (parameters.hasMoreElements()) {
- String name = (String) parameters.nextElement();
- String[] values = request.getParameterValues(name);
- sb.append("<parameter name=\"" + name + "\">");
-
- for (int i = 0; i < values.length; i++) {
- sb.append("<value>" + values[i] + "</value>");
- }
-
- sb.append("</parameter>");
- }
-
- if (hasParameters) {
- sb.append("</parameters>");
- }
-
- return sb.toString();
- }
-
- /**
- * Get all session attributes of a request
- * @param request The request
- * @return The session attributes (in XML)
- */
- public String getSession(HttpServletRequest request) {
- StringBuffer sb = new StringBuffer("");
-
- //HttpSession session=request.getSession(true);
- HttpSession session = request.getSession(false);
-
- if (session != null) {
- sb.append("<session>");
-
- Enumeration attributes = session.getAttributeNames();
-
- if (!attributes.hasMoreElements()) {
- sb.append("<noattributes/>");
- }
-
- while (attributes.hasMoreElements()) {
- String attributeName = (String) attributes.nextElement();
- sb.append("<attribute name=\"" + attributeName + "\">");
- sb.append("" + session.getAttribute(attributeName));
- sb.append("</attribute>");
- }
-
- sb.append("</session>");
- } else {
- sb.append("<nosession/>");
- }
-
- return sb.toString();
- }
-
- /**
- * Return all cookies of a request
- * @param request The request
- * @return The cookies (as XML)
- */
- public String getCookies(HttpServletRequest request) {
- StringBuffer sb = new StringBuffer("");
-
- Cookie[] cookies = request.getCookies();
-
- if (cookies != null) {
- if (cookies.length > 0) {
- sb.append("<cookies>");
-
- for (int i = 0; i < cookies.length; i++) {
- sb.append("<cookie>");
- sb.append("<comment>" + cookies[i].getComment() + "</comment>");
- sb.append("<domain>" + cookies[i].getDomain() + "</domain>");
- sb.append("<maxage>" + cookies[i].getMaxAge() + "</maxage>");
- sb.append("<name>" + cookies[i].getName() + "</name>");
- sb.append("<path>" + cookies[i].getPath() + "</path>");
- sb.append("<secure>" + cookies[i].getSecure() + "</secure>");
- sb.append("<value>" + cookies[i].getValue() + "</value>");
- sb.append("<version>" + cookies[i].getVersion() + "</version>");
- sb.append("</cookie>");
- }
-
- sb.append("</cookies>");
- } else {
- sb.append("<nocookies/>");
- }
- } else {
- sb.append("<nocookies/>");
- }
-
- return sb.toString();
- }
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/metadata/MetaDataTest.java b/trunk/src/impl/test/org/apache/lenya/cms/metadata/MetaDataTest.java
deleted file mode 100644
index e26e9b8..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/metadata/MetaDataTest.java
+++ /dev/null
@@ -1,188 +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.lenya.cms.metadata;
-
-import java.util.Map;
-
-import org.apache.lenya.ac.impl.AbstractAccessControlTest;
-import org.apache.lenya.cms.metadata.dublincore.DublinCore;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentFactory;
-import org.apache.lenya.cms.publication.Publication;
-
-/**
- * Meta data test.
- */
-public class MetaDataTest extends AbstractAccessControlTest {
-
- /**
- * Tests the meta data.
- * @throws Exception
- */
- public void testMetaData() throws Exception {
-
- Publication publication = getPublication("test");
- Document doc = publication.getArea("authoring").getSite().getNode("/index").getLink("en").getDocument();
-
- String namespaceUri = "foobar";
- Exception e = null;
- try {
- doc.getMetaData(namespaceUri);
- } catch (Exception e1) {
- e = e1;
- }
- assertNotNull(e);
-
- namespaceUri = DublinCore.DC_NAMESPACE;
- MetaData dc = doc.getMetaData(namespaceUri);
-
- doc.getRepositoryNode().lock();
-
- checkSetTitle(dc);
- checkRemoveAllValues(dc);
-
- }
-
- protected void checkSetTitle(MetaData dc) throws MetaDataException {
- Exception e = null;
- try {
- dc.setValue("foo", "bar");
- } catch (Exception e1) {
- e = e1;
- }
- assertNotNull(e);
- dc.setValue("title", "This is the title");
-
- e = null;
- // addValue() should throw an exception because a value is already set
- try {
- dc.addValue("title", "bar");
- } catch (Exception e1) {
- e = e1;
- }
- assertNotNull(e);
-
- }
-
- String NAMESPACE = "http://apache.org/lenya/test/metadata";
-
- protected void checkOnCopy(Publication pub) throws Exception {
- MetaDataRegistry registry = null;
- try {
- registry = (MetaDataRegistry) getManager().lookup(MetaDataRegistry.ROLE);
- ElementSet set = new TestElementSet();
- registry.register(NAMESPACE, set);
- }
- finally {
- getManager().release(registry);
- }
-
- DocumentFactory factory = getFactory();
- Document source = factory.get(pub, Publication.AUTHORING_AREA, "/index", "en");
- Document target = factory.get(pub, Publication.AUTHORING_AREA, "/index", "en");
-
- MetaData sourceMeta = source.getMetaData(NAMESPACE);
- sourceMeta.setValue("copy", "sourceCopy");
- sourceMeta.setValue("ignore", "sourceIgnore");
- sourceMeta.setValue("delete", "sourceDelete");
-
- MetaData targetMeta = target.getMetaData(NAMESPACE);
- targetMeta.setValue("ignore", "targetIgnore");
- targetMeta.setValue("delete", "targetDelete");
-
- targetMeta.replaceBy(sourceMeta);
-
- assertTrue(targetMeta.getValues("copy").length == 1);
- assertEquals(sourceMeta.getValues("copy"), targetMeta.getValues("copy"));
-
- assertTrue(targetMeta.getValues("ignore").length == 1);
- assertEquals(targetMeta.getFirstValue("ignore"), "targetIgnore");
-
- assertTrue(targetMeta.getValues("delete").length == 0);
- }
-
- protected void checkRemoveAllValues(MetaData dc) throws MetaDataException {
- dc.removeAllValues("title");
- assertTrue(dc.getValues("title").length == 0);
- }
-
- protected class TestElement implements Element {
-
- private String name;
- private int actionOnCopy;
-
- protected TestElement(String name, int actionOnCopy) {
- this.name = name;
- this.actionOnCopy = actionOnCopy;
- }
-
- public int getActionOnCopy() {
- return actionOnCopy;
- }
-
- public String getDescription() {
- return "";
- }
-
- public String getName() {
- return name;
- }
-
- public boolean isEditable() {
- return false;
- }
-
- public boolean isMultiple() {
- return false;
- }
-
- }
-
- protected class TestElementSet implements ElementSet {
-
- private Element[] elements = { new TestElement("copy", Element.ONCOPY_COPY),
- new TestElement("ignore", Element.ONCOPY_IGNORE),
- new TestElement("delete", Element.ONCOPY_DELETE) };
-
- private Map name2element;
-
- protected TestElementSet() {
- for (int i = 0; i < elements.length; i++) {
- this.name2element.put(elements[i].getName(), elements[i]);
- }
- }
-
- public boolean containsElement(String name) {
- return true;
- }
-
- public Element getElement(String name) throws MetaDataException {
- return (Element) this.name2element.get(name);
- }
-
- public Element[] getElements() {
- return elements;
- }
-
- public String getNamespaceUri() {
- return NAMESPACE;
- }
-
- }
-
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/publication/DefaultDocumentBuilderTest.java b/trunk/src/impl/test/org/apache/lenya/cms/publication/DefaultDocumentBuilderTest.java
deleted file mode 100644
index 3db9f45..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/publication/DefaultDocumentBuilderTest.java
+++ /dev/null
@@ -1,38 +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.
- *
- */
-
-/* $Id$ */
-
-package org.apache.lenya.cms.publication;
-
-/**
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class DefaultDocumentBuilderTest extends DefaultDocumentTest {
-
- /**
- * @throws PublicationException
- * @see org.apache.lenya.cms.publication.DefaultDocumentTest#getDocument(DocumentTestSet)
- */
- protected Document getDocument(DocumentTestSet set) throws PublicationException {
- Publication pub = getPublication("test");
- return getFactory().getFromURL("/" + pub.getId() + "/" + set.getArea() + set.getUrl());
- }
-}
\ No newline at end of file
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/publication/DefaultDocumentTest.java b/trunk/src/impl/test/org/apache/lenya/cms/publication/DefaultDocumentTest.java
deleted file mode 100644
index cd025a9..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/publication/DefaultDocumentTest.java
+++ /dev/null
@@ -1,155 +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.
- *
- */
-
-/* $Id$ */
-
-package org.apache.lenya.cms.publication;
-
-import org.apache.lenya.ac.impl.AbstractAccessControlTest;
-
-/**
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class DefaultDocumentTest extends AbstractAccessControlTest {
-
- protected static final DocumentTestSet[] testSets = {
- new DocumentTestSet("/index.html", "/index", Publication.AUTHORING_AREA, "en", "html"),
- new DocumentTestSet("/index_de.html", "/index", Publication.AUTHORING_AREA, "de",
- "html") };
-
- /**
- * Tests a document test set.
- * @param testSet The test set.
- * @throws PublicationException
- */
- protected void doDocumentTest(DocumentTestSet testSet) throws PublicationException {
- Document document = getDocument(testSet);
- getLogger().info("UUID: " + document.getUUID());
- getLogger().info("Area: " + document.getArea());
- getLogger().info("Language: " + document.getLanguage());
- getLogger().info("Document URL: " + document.getCanonicalDocumentURL());
- getLogger().info("Complete URL: " + document.getCanonicalWebappURL());
- getLogger().info("Extension: " + document.getExtension());
-
- Publication publication = getPublication("test");
- assertEquals(document.getPublication(), publication);
- assertEquals(document.getPath(), testSet.getPath());
- assertEquals(document.getArea(), testSet.getArea());
- assertEquals(document.getLanguage(), testSet.getLanguage());
- assertEquals(document.getCanonicalDocumentURL(), testSet.getUrl());
- assertEquals(document.getCanonicalWebappURL(), "/" + publication.getId() + "/"
- + document.getArea() + testSet.getUrl());
- assertEquals(document.getExtension(), testSet.getExtension());
-
- getLogger().info("-----------------------------------------------");
- }
-
- /**
- * Tests the default document.
- * @throws PublicationException
- */
- public void testDefaultDocument() throws PublicationException {
- for (int i = 0; i < testSets.length; i++) {
- doDocumentTest(testSets[i]);
- }
- }
-
- /**
- * Returns the test document for a given test set.
- * @param testSet A document test set.
- * @return A document.
- * @throws PublicationException
- */
- protected Document getDocument(DocumentTestSet testSet) throws PublicationException {
-
- Publication pub = getPublication("test");
- String uuid = pub.getArea(testSet.getArea()).getSite().getNode(testSet.getPath()).getUuid();
- DocumentIdentifier id = new DocumentIdentifier(pub.getId(), testSet.getArea(), uuid, testSet
- .getLanguage());
- DocumentImpl document = new DocumentImpl(getManager(), getFactory(), id, -1, getLogger());
- document.setExtension(testSet.getExtension());
-
- return document;
- }
-
- /**
- * Utility class to store test data for a document.
- */
- protected static class DocumentTestSet {
- private String url;
- private String path;
- private String extension;
- private String area;
- private String language;
-
- /**
- * Ctor.
- * @param _url The url.
- * @param _path The path.
- * @param _area The area.
- * @param _language The language.
- * @param _extension The extension.
- */
- public DocumentTestSet(String _url, String _path, String _area, String _language,
- String _extension) {
- this.url = _url;
- this.path = _path;
- this.area = _area;
- this.language = _language;
- this.extension = _extension;
- }
-
- /**
- * @return The area.
- */
- public String getArea() {
- return this.area;
- }
-
- /**
- * @return The extension.
- */
- public String getExtension() {
- return this.extension;
- }
-
- /**
- * @return The path.
- */
- public String getPath() {
- return this.path;
- }
-
- /**
- * @return The language.
- */
- public String getLanguage() {
- return this.language;
- }
-
- /**
- * @return The URL.
- */
- public String getUrl() {
- return this.url;
- }
- }
-
-}
\ No newline at end of file
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentFactoryTest.java b/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentFactoryTest.java
deleted file mode 100644
index 5c8275f..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentFactoryTest.java
+++ /dev/null
@@ -1,50 +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.lenya.cms.publication;
-
-import org.apache.lenya.ac.impl.AbstractAccessControlTest;
-import org.apache.lenya.cms.repository.RepositoryUtil;
-import org.apache.lenya.cms.repository.Session;
-
-/**
- * Document factory test.
- */
-public class DocumentFactoryTest extends AbstractAccessControlTest {
-
- /**
- * Tests the meta data.
- * @throws Exception
- */
- public void testDocumentFactory() throws Exception {
- Session session = RepositoryUtil.getSession(getManager(), getRequest());
- DocumentFactory factoryA = DocumentUtil.createDocumentFactory(getManager(), session);
-
- Publication publication = getPublication("test");
-
- Document docA1 = factoryA.get(publication, Publication.AUTHORING_AREA, "/index", "en");
- Document docA2 = factoryA.get(publication, Publication.AUTHORING_AREA, "/index", "en");
- assertSame(docA1, docA2);
-
- DocumentFactory factoryB = DocumentUtil.createDocumentFactory(getManager(), session);
-
- Document docB1 = factoryB.get(publication, Publication.AUTHORING_AREA, "/index", "en");
-
- assertSame(docA1, docB1);
- }
-
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentLocatorTest.java b/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentLocatorTest.java
deleted file mode 100644
index c98d536..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentLocatorTest.java
+++ /dev/null
@@ -1,61 +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.lenya.cms.publication;
-
-import junit.framework.TestCase;
-
-/**
- *
- */
-public class DocumentLocatorTest extends TestCase {
-
- /**
- *
- */
- public void testDocumentLocator() {
-
- String pubId = "pub";
- String area = "area";
- String area2 = "area2";
- String languageDe = "de";
- String languageEn = "en";
-
- DocumentLocator root = DocumentLocator.getLocator(pubId, area, "", languageDe);
- DocumentLocator foo = DocumentLocator.getLocator(pubId, area, "/foo", languageDe);
- DocumentLocator fooBar = DocumentLocator.getLocator(pubId, area, "/foo/bar", languageDe);
- DocumentLocator fooBarBaz = DocumentLocator.getLocator(pubId, area, "/foo/bar/baz", languageDe);
-
- DocumentLocator fooEn = DocumentLocator.getLocator(pubId, area, "/foo", languageEn);
- DocumentLocator foo2 = DocumentLocator.getLocator(pubId, area2, "/foo", languageDe);
-
- assertEquals(foo.getParent(), root);
- assertEquals(fooBar.getParent(), foo);
- assertEquals(fooBarBaz.getParent(), fooBar);
-
- assertEquals(root.getDescendant("foo"), foo);
- assertEquals(foo.getDescendant("bar/baz"), fooBarBaz);
-
- assertEquals(foo.getChild("bar"), fooBar);
-
- assertEquals(foo.getLanguageVersion(languageEn), fooEn);
-
- assertEquals(foo.getAreaVersion(area2), foo2);
-
- }
-
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentManagerTest.java b/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentManagerTest.java
deleted file mode 100644
index c04a9d2..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/publication/DocumentManagerTest.java
+++ /dev/null
@@ -1,198 +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.lenya.cms.publication;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.lenya.ac.impl.AbstractAccessControlTest;
-import org.apache.lenya.cms.site.NodeSet;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteNode;
-import org.apache.lenya.cms.site.SiteStructure;
-import org.apache.lenya.cms.site.SiteUtil;
-import org.apache.lenya.util.StringUtil;
-
-/**
- * Document manager test.
- */
-public class DocumentManagerTest extends AbstractAccessControlTest {
-
- /**
- * Do the test.
- * @throws Exception
- */
- public void testDocumentManager() throws Exception {
- DocumentManager docManager = null;
- try {
- docManager = (DocumentManager) getManager().lookup(DocumentManager.ROLE);
- doTestMoveAll(docManager, "/doctypes", "/tutorial/doctypes");
- doTestMoveAll(docManager, "/tutorial/doctypes", "/doctypes");
- doTestCopyAll(docManager, "/doctypes", "/tutorial/doctypes");
-
- String areaName1 = "authoring";
- String areaName2 = "live";
- String path1 = "/tutorial";
- String path2 = "/doctypes";
-
- doTestCopyToArea(docManager, areaName1, areaName2, path1, path2);
-
- } finally {
- if (docManager != null) {
- getManager().release(docManager);
- }
- }
- }
-
- protected void doTestCopyToArea(DocumentManager docManager, String sourceAreaName,
- String destAreaName, String path1, String path2) throws PublicationException,
- SiteException {
-
- DocumentFactory factory = getFactory();
- Publication pub = factory.getPublication("test");
- SiteStructure sourceArea = pub.getArea(sourceAreaName).getSite();
- SiteStructure destArea = pub.getArea(destAreaName).getSite();
-
- if (destArea.contains(path1)) {
- destArea.getNode(path1).delete();
- }
- if (destArea.contains(path2)) {
- destArea.getNode(path2).delete();
- }
-
- assertFalse(destArea.contains(path1));
- assertFalse(destArea.contains(path2));
-
- // copy second node first to test correct ordering
- doTestCopyToArea(docManager, path2, sourceAreaName, destAreaName);
- doTestCopyToArea(docManager, path1, sourceAreaName, destAreaName);
-
- List sourceNodes = Arrays.asList(sourceArea.getNodes());
-
- SiteNode authoringNode1 = sourceArea.getNode(path1);
- assertTrue(sourceNodes.contains(authoringNode1));
- int sourcePos1 = sourceNodes.indexOf(authoringNode1);
-
- SiteNode sourceNode2 = sourceArea.getNode(path2);
- int sourcePos2 = sourceNodes.indexOf(sourceNode2);
-
- assertTrue(sourcePos1 < sourcePos2);
-
- assertTrue(destArea.contains(path1));
- List liveNodes = Arrays.asList(destArea.getNodes());
- SiteNode liveNode1 = destArea.getNode(path1);
- assertTrue(liveNodes.contains(liveNode1));
- int livePos1 = liveNodes.indexOf(liveNode1);
-
- SiteNode liveNode2 = destArea.getNode(path2);
- int livePos2 = liveNodes.indexOf(liveNode2);
-
- assertTrue(livePos1 < livePos2);
- }
-
- protected void doTestCopyToArea(DocumentManager docManager, String path, String areaName1,
- String areaName2) throws PublicationException {
- DocumentFactory factory = getFactory();
- Publication pub = factory.getPublication("test");
- Area area1 = pub.getArea(areaName1);
- Document doc = area1.getSite().getNode(path).getLink("en").getDocument();
- docManager.copyToArea(doc, areaName2);
- }
-
- protected void doTestCopyAll(DocumentManager docManager, String sourcePath, String targetPath)
- throws SiteException, DocumentException, PublicationException {
- DocumentFactory factory = getFactory();
- Publication pub = factory.getPublication("test");
- Area authoring = pub.getArea("authoring");
-
- SiteNode sourceNode = authoring.getSite().getNode(sourcePath);
-
- NodeSet nodes = SiteUtil.getSubSite(getManager(), sourceNode);
- Document[] docs = nodes.getDocuments();
- Map doc2path = new HashMap();
-
- String sourceBase = sourcePath.substring(0, sourcePath.lastIndexOf("/"));
- String targetBase = targetPath.substring(0, targetPath.lastIndexOf("/"));
-
- for (int i = 0; i < docs.length; i++) {
- doc2path.put(docs[i], docs[i].getPath().substring(sourceBase.length()));
- }
-
- docManager.copyAll(authoring, sourcePath, authoring, targetPath);
- for (int i = 0; i < docs.length; i++) {
- assertTrue(docs[i].hasLink());
- String oldPath = (String) doc2path.get(docs[i]);
- String newPath = targetBase + oldPath;
- assertTrue(authoring.getSite().contains(newPath));
- SiteNode newNode = authoring.getSite().getNode(newPath);
- Document newDoc = newNode.getLink(docs[i].getLanguage()).getDocument();
- assertEquals(newDoc.getContentLength(), docs[i].getContentLength());
- assertFalse(newDoc.getUUID().equals(docs[i].getUUID()));
- }
-
- String[] sourceNames = getChildNames(sourceNode);
- SiteNode targetNode = authoring.getSite().getNode(targetPath);
- String[] targetNames = getChildNames(targetNode);
- assertEquals(StringUtil.join(sourceNames, ","), StringUtil.join(targetNames, ","));
- }
-
- protected String[] getChildNames(SiteNode node) {
- SiteNode[] sourceChildren = node.getChildren();
- String[] names = new String[sourceChildren.length];
- for (int i = 0; i < names.length; i++) {
- names[i] = sourceChildren[i].getName();
- }
- return names;
- }
-
- protected void doTestMoveAll(DocumentManager docManager, String sourcePath, String targetPath)
- throws SiteException, DocumentException, PublicationException {
- DocumentFactory factory = getFactory();
- Publication pub = factory.getPublication("test");
- Area authoring = pub.getArea("authoring");
-
- SiteNode sourceNode = authoring.getSite().getNode(sourcePath);
- String[] sourceNames = getChildNames(sourceNode);
-
- NodeSet nodes = SiteUtil.getSubSite(getManager(), sourceNode);
- Document[] docs = nodes.getDocuments();
- Map doc2path = new HashMap();
-
- String sourceBase = sourcePath.substring(0, sourcePath.lastIndexOf("/"));
- String targetBase = targetPath.substring(0, targetPath.lastIndexOf("/"));
-
- for (int i = 0; i < docs.length; i++) {
- doc2path.put(docs[i], docs[i].getPath().substring(sourceBase.length()));
- }
-
- docManager.moveAll(authoring, sourcePath, authoring, targetPath);
- for (int i = 0; i < docs.length; i++) {
- assertTrue(docs[i].hasLink());
- String oldPath = (String) doc2path.get(docs[i]);
- String newPath = docs[i].getPath();
- assertEquals(targetBase + oldPath, newPath);
- }
-
- SiteNode targetNode = authoring.getSite().getNode(targetPath);
- String[] targetNames = getChildNames(targetNode);
- assertEquals(StringUtil.join(sourceNames, ","), StringUtil.join(targetNames, ","));
-
- }
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/publication/DublinCoreTest.java b/trunk/src/impl/test/org/apache/lenya/cms/publication/DublinCoreTest.java
deleted file mode 100644
index 30e1208..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/publication/DublinCoreTest.java
+++ /dev/null
@@ -1,81 +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.lenya.cms.publication;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.impl.AbstractAccessControlTest;
-import org.apache.lenya.cms.metadata.MetaData;
-import org.apache.lenya.cms.metadata.MetaDataException;
-import org.apache.lenya.cms.metadata.dublincore.DublinCore;
-import org.apache.lenya.cms.repository.RepositoryException;
-
-/**
- * Dublin Core test.
- *
- * @version $Id$
- */
-public class DublinCoreTest extends AbstractAccessControlTest {
-
- private static final String AREA = "authoring";
- private static final String PATH = "/tutorial";
- private static final String LANGUAGE = "de";
-
- /**
- * Test the fetching, modification and refetching of a dc core object.
- * @throws PublicationException
- * @throws MetaDataException
- * @throws RepositoryException
- * @throws AccessControlException
- * @throws RepositoryException
- */
- final public void testModifySaveAndReload() throws PublicationException, MetaDataException,
- AccessControlException, RepositoryException {
-
- login("lenya");
-
- Publication publication = getPublication("test");
-
- Document doc = publication.getArea(AREA).getSite().getNode(PATH).getLink(LANGUAGE).getDocument();
-
- doc.getRepositoryNode().lock();
-
- MetaData dcCore = doc.getMetaData(DublinCore.DC_NAMESPACE);
- String title = dcCore.getFirstValue(DublinCore.ELEMENT_TITLE);
- String subject = dcCore.getFirstValue(DublinCore.ELEMENT_SUBJECT);
- String creator = dcCore.getFirstValue(DublinCore.ELEMENT_CREATOR);
-
- if (creator == null) {
- creator = "test";
- }
-
- String newCreator = creator + "-test";
- dcCore.setValue(DublinCore.ELEMENT_CREATOR, newCreator);
-
- Document doc2 = publication.getArea(AREA).getSite().getNode(PATH).getLink(LANGUAGE).getDocument();
-
- MetaData dcCore2 = doc2.getMetaData(DublinCore.DC_NAMESPACE);
- assertEquals(title, dcCore2.getFirstValue(DublinCore.ELEMENT_TITLE));
- assertEquals(subject, dcCore2.getFirstValue(DublinCore.ELEMENT_SUBJECT));
- assertFalse(creator.equals(dcCore2.getFirstValue(DublinCore.ELEMENT_CREATOR)));
- assertEquals(newCreator, dcCore2.getFirstValue(DublinCore.ELEMENT_CREATOR));
-
- doc.getRepositoryNode().unlock();
- }
-
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java b/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java
deleted file mode 100644
index cc8a28e..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/publication/PublicationTest.java
+++ /dev/null
@@ -1,95 +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.lenya.cms.publication;
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.lenya.ac.impl.AbstractAccessControlTest;
-
-/**
- * Publication test.
- */
-public class PublicationTest extends AbstractAccessControlTest {
-
- /**
- * Tests the publication functionality.
- * @throws Exception
- */
- public void testPublication() throws Exception {
-
- PublicationManager pubMgr = null;
- try {
- pubMgr = (PublicationManager) getManager().lookup(PublicationManager.ROLE);
-
- Publication[] pubs = pubMgr.getPublications(getFactory());
- for (int i = 0; i < pubs.length; i++) {
- doTestPublication(pubs[i]);
- }
-
- } finally {
- if (pubMgr != null) {
- getManager().release(pubMgr);
- }
- }
-
- }
-
- protected void doTestPublication(Publication pub) throws PublicationException {
- String contentDirPath = pub.getContentDir();
- assertNotNull(contentDirPath);
-
- File contentDir = new File(contentDirPath);
-
- assertTrue(pub.exists());
-
- String[] areaNames = pub.getAreaNames();
- for (int i = 0; i < areaNames.length; i++) {
- Area area = pub.getArea(areaNames[i]);
- if (area.getDocuments().length > 0) {
- File areaContentDir = pub.getContentDirectory(areaNames[i]);
- assertTrue(areaContentDir.isDirectory());
- assertEquals(new File(contentDir, areaNames[i]), areaContentDir);
- }
- }
-
- String[] languages = pub.getLanguages();
- assertTrue(languages.length > 0);
-
- assertNotNull(pub.getDefaultLanguage());
- assertTrue(Arrays.asList(languages).contains(pub.getDefaultLanguage()));
-
- String[] types = pub.getResourceTypeNames();
- assertTrue(types.length > 0);
-
- Set typeSet = new HashSet(Arrays.asList(types));
-
- String[] templateIds = pub.getTemplateIds();
- for (int i = 0; i < templateIds.length; i++) {
- Publication template = pub.getFactory().getPublication(templateIds[i]);
- String[] templateTypes = template.getResourceTypeNames();
- for (int t = 0; t < templateTypes.length; t++) {
- assertTrue(typeSet.contains(templateTypes[i]));
- }
- }
-
- }
-
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/publication/TestPageEnvelope.java b/trunk/src/impl/test/org/apache/lenya/cms/publication/TestPageEnvelope.java
deleted file mode 100644
index effd9d6..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/publication/TestPageEnvelope.java
+++ /dev/null
@@ -1,52 +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.
- *
- */
-
-/* $Id$ */
-
-package org.apache.lenya.cms.publication;
-
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.lenya.cms.repository.RepositoryUtil;
-import org.apache.lenya.cms.repository.Session;
-
-/**
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class TestPageEnvelope extends PageEnvelope {
- /**
- * Constructs a test page envelope.
- * @param publication The publication.
- * @param url The document url (starting with a slash).
- * @throws PageEnvelopeException when something goes wrong.
- */
- public TestPageEnvelope(Publication publication, String url, ServiceManager manager,
- Logger logger) throws PageEnvelopeException {
- super();
- setContext("");
-
- try {
- Session session = RepositoryUtil.createSession(manager, null, false);
- DocumentFactory map = DocumentUtil.createDocumentFactory(manager, session);
- setDocument(map.getFromURL(url));
- } catch (Exception e) {
- throw new PageEnvelopeException(e);
- }
- }
-}
\ No newline at end of file
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/publication/file/FilePublicationTest.java b/trunk/src/impl/test/org/apache/lenya/cms/publication/file/FilePublicationTest.java
deleted file mode 100644
index e6addee..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/publication/file/FilePublicationTest.java
+++ /dev/null
@@ -1,129 +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.
- *
- */
-
-/* $Id$ */
-
-package org.apache.lenya.cms.publication.file;
-
-import org.apache.lenya.ac.impl.AbstractAccessControlTest;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentFactory;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.site.SiteException;
-
-/**
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class FilePublicationTest extends AbstractAccessControlTest {
-
- /**
- * <code>sourceDocumentId</code> The source document id
- */
- public static final String sourceDocumentId = "/tutorial";
- /**
- * <code>destinationDocumentId</code> The destination document id
- */
- public static final String destinationDocumentId = "/doctypes/simple-document";
- /**
- * <code>sourceLanguage</code> The source language
- */
- public static final String sourceLanguage = "en";
- /**
- * <code>destinationLanguage</code> The destination language
- */
- public static final String destinationLanguage = "en";
-
- /**
- * Tests copying a document.
- * @throws PublicationException when something went wrong.
- * @throws DocumentException
- * @throws SiteException
- */
- public void testCopyDocument() throws PublicationException, DocumentException, SiteException {
- testCopyDocument(Publication.AUTHORING_AREA,
- sourceDocumentId,
- sourceLanguage,
- Publication.AUTHORING_AREA,
- destinationDocumentId,
- destinationLanguage);
- testCopyDocument(Publication.AUTHORING_AREA,
- sourceDocumentId,
- sourceLanguage,
- Publication.LIVE_AREA,
- sourceDocumentId,
- sourceLanguage);
- }
-
- /**
- * Tests copying a document.
- * @param sourceArea The source area.
- * @param _sourceDocumentId The source document ID.
- * @param _sourceLanguage The source language.
- * @param destinationArea The destination area.
- * @param _destinationDocumentId The destination document ID.
- * @param _destinationLanguage The destination language.
- * @throws PublicationException when something went wrong.
- * @throws DocumentException
- * @throws SiteException
- */
- public void testCopyDocument(String sourceArea, String _sourceDocumentId,
- String _sourceLanguage, String destinationArea, String _destinationDocumentId,
- String _destinationLanguage) throws PublicationException, DocumentException,
- SiteException {
-
- getLogger().info("Copy document");
- getLogger().info(" Source area: [" + sourceArea + "]");
- getLogger().info(" Source document ID: [" + _sourceDocumentId + "]");
- getLogger().info(" Source language: [" + _sourceLanguage + "]");
- getLogger().info(" Destination area: [" + destinationArea + "]");
- getLogger().info(" Destination document ID: [" + _destinationDocumentId + "]");
- getLogger().info(" Destination language: [" + _destinationLanguage + "]");
-
- Publication publication = getPublication("test");
- DocumentFactory map = getFactory();
-
- Document sourceDocument = map.get(publication,
- sourceArea,
- _sourceDocumentId,
- _sourceLanguage);
- Document destinationDocument = map.get(publication,
- destinationArea,
- _destinationDocumentId,
- _destinationLanguage);
-/*
- publication.copyDocument(sourceDocument, destinationDocument);
-
- assertTrue(destinationDocument.exists());
-
- TreeSiteManager manager = (TreeSiteManager) publication.getSiteManager(map);
- SiteTree destinationTree = manager.getTree(destinationArea);
- SiteTreeNode destinationNode = destinationTree.getNode(_destinationDocumentId);
- assertNotNull(destinationNode);
- Label destinationLabel = destinationNode.getLabel(_destinationLanguage);
- assertNotNull(destinationLabel);
-
- SiteTreeNode sourceNode = destinationTree.getNode(_sourceDocumentId);
- Label sourceLabel = sourceNode.getLabel(_sourceLanguage);
-
- assertTrue(destinationLabel.getLabel().equals(sourceLabel.getLabel()));
-*/
- }
-}
\ No newline at end of file
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/rc/RCMLTest.java b/trunk/src/impl/test/org/apache/lenya/cms/rc/RCMLTest.java
deleted file mode 100644
index 0a9674a..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/rc/RCMLTest.java
+++ /dev/null
@@ -1,108 +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.
- *
- */
-
-/* $Id$ */
-
-package org.apache.lenya.cms.rc;
-
-import java.io.PrintWriter;
-
-import org.w3c.dom.Document;
-import org.apache.lenya.ac.impl.AbstractAccessControlTest;
-import org.apache.lenya.xml.DocumentHelper;
-
-/**
- * RCML Test
- */
-public class RCMLTest extends AbstractAccessControlTest {
-
- /**
- * <code>co</code> Checkout
- */
- public static final short co = 0;
- /**
- * <code>ci</code> Checkin
- */
- public static final short ci = 1;
-
- private Document document = null;
-
- /**
- * Constructor.
- * @param test The test to execute.
- */
- public RCMLTest() {
- super();
- }
-
- public void testRCML() {
- String[] args = { "", "", "" };
- testRCML(args);
- }
-
- public void testRCML(String[] args) {
-
- if (args.length != 1) {
- System.out.println("Usage: java RCML rcmlDirectory datafilename rootDirectory");
-
- return;
- }
-
- try {
- org.apache.lenya.cms.publication.Document doc = null;
- doc.getRepositoryNode().checkout();
-
- (new PrintWriter(System.out)).print(this.document);
-
- System.out.println("\n");
-
- if (doc.getRepositoryNode().isCheckedOut()) {
- System.out.println("Checked out");
- } else {
- System.out.println("Not checked out");
- }
- } catch (Exception e) {
- System.out.println(e);
- }
- }
-
-/* protected static final Class[] classes = {
- };
-
- /**
- * Creates a test suite.
- * @return a test suite.
- */
-/* public static Test getSuite() {
- TestSuite suite = new TestSuite();
-
- for (int i = 0; i < classes.length; i++) {
- suite.addTestSuite(classes[i]);
- }
-
- return suite;
- }
-*/
- /** @see junit.framework.TestCase#setUp() */
- protected void setUp() throws Exception {
- /**
- * initialise the RCML-document. Delete all entries
- */
- this.document = DocumentHelper.createDocument(null, "XPSRevisionControl", null);
- }
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/rc/RevisionControllerTest.java b/trunk/src/impl/test/org/apache/lenya/cms/rc/RevisionControllerTest.java
deleted file mode 100644
index c0acd9d..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/rc/RevisionControllerTest.java
+++ /dev/null
@@ -1,84 +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.
- *
- */
-
-/* $Id$ */
-
-package org.apache.lenya.cms.rc;
-
-import org.apache.lenya.ac.impl.AbstractAccessControlTest;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentManager;
-import org.apache.lenya.cms.repository.RepositoryException;
-
-/**
- * Revision Controller test
- */
-public class RevisionControllerTest extends AbstractAccessControlTest {
-
- /**
- * @see <a
- * href="http://issues.apache.org/bugzilla/show_bug.cgi?id=41005">Bug
- * 41005</a>
- * @throws Exception
- */
- public void testCheckIn() throws Exception {
- login("lenya");
-
- DocumentManager docMgr = null;
- try {
- docMgr = (DocumentManager) getManager().lookup(DocumentManager.ROLE);
- Document source = getPublication("test").getArea("authoring").getSite().getNode(
- "/links").getLink("en").getDocument();
- Document target = docMgr.addVersion(source, "authoring", "es");
- target.delete();
- } finally {
- if (docMgr != null) {
- getManager().release(docMgr);
- }
- }
-
- getFactory().getSession().commit();
- }
-
- public void testRevisionController() throws RepositoryException, RevisionControlException {
-
- String[] args = { "", "", "", "" };
-
- // TestRunner.run(getSuite());
-
- if (args.length != 4) {
- System.out
- .println("Usage: "
- + RevisionControllerTest.class.getName()
- + " username(user who checkout) source(filename without the rootDirectory of the document to checkout) username(user who checkin) destination(filename without the rootDirectory of document to checkin)");
-
- return;
- }
-
- Document doc1 = null;
- Document doc2 = null;
-
- String identityS = args[0];
- String source = args[1];
- String identityD = args[2];
- String destination = args[3];
- //doc1.getRepositoryNode().checkout();
- //doc2.getRepositoryNode().checkin();
- }
-
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/site/SimpleSiteManagerTest.java b/trunk/src/impl/test/org/apache/lenya/cms/site/SimpleSiteManagerTest.java
deleted file mode 100644
index 9fe93c7..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/site/SimpleSiteManagerTest.java
+++ /dev/null
@@ -1,165 +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.lenya.cms.site;
-
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.ac.impl.AbstractAccessControlTest;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentFactory;
-import org.apache.lenya.cms.publication.DocumentManager;
-import org.apache.lenya.cms.publication.DocumentUtil;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.ResourceType;
-import org.apache.lenya.cms.repository.RepositoryException;
-import org.apache.lenya.cms.repository.Session;
-import org.apache.lenya.cms.site.Link;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.cms.site.SiteNode;
-import org.apache.lenya.cms.site.SiteStructure;
-import org.apache.lenya.cms.site.simple.DocumentStore;
-
-public class SimpleSiteManagerTest extends AbstractAccessControlTest {
-
- protected static final String PATH = "/foo/bar";
-
- protected static final String PARENT_PATH = "/foo";
-
- public void testSimpleSiteManager() throws Exception {
-
- Session session = login("lenya");
-
- DocumentFactory factory = DocumentUtil.createDocumentFactory(getManager(), session);
- Publication[] pubs = factory.getPublications();
-
- for (int i = 0; i < pubs.length; i++) {
- checkPublication(session, factory, pubs[i]);
- }
- }
-
- protected void checkPublication(Session session, DocumentFactory factory, Publication pub)
- throws ServiceException, SiteException, DocumentBuildException, PublicationException,
- RepositoryException {
- DocumentManager docManager = null;
- ServiceSelector selector = null;
- SiteManager siteManager = null;
- ServiceSelector resourceTypeSelector = null;
-
- try {
- selector = (ServiceSelector) getManager().lookup(SiteManager.ROLE + "Selector");
- siteManager = (SiteManager) selector.select(pub.getSiteManagerHint());
- SiteStructure structure = siteManager.getSiteStructure(factory, pub,
- Publication.AUTHORING_AREA);
-
- docManager = (DocumentManager) getManager().lookup(DocumentManager.ROLE);
-
- resourceTypeSelector = (ServiceSelector) getManager().lookup(
- ResourceType.ROLE + "Selector");
- ResourceType type = (ResourceType) resourceTypeSelector.select("entry");
- String contentSourceUri = "context://sitemap.xmap";
-
- Document doc = docManager.add(factory, type, contentSourceUri, pub,
- Publication.AUTHORING_AREA, "en", "xml");
-
- structure.add(PATH, doc);
- assertTrue(structure.contains(PATH));
- Document linkDoc = structure.getNode(PATH).getLink("en").getDocument();
- assertSame(linkDoc, doc);
-
- if (!(structure instanceof DocumentStore)) {
- Link link = doc.getLink();
- checkSetLabel(link);
- }
-
- SiteNode[] nodes = structure.getNodes();
- assertTrue(nodes.length > 0);
-
- for (int i = 0; i < nodes.length; i++) {
-
- assertTrue(structure.contains(nodes[i].getPath()));
-
- SiteNode node = structure.getNode(nodes[i].getPath());
- assertNotNull(node);
- assertEquals(nodes[i], node);
-
- checkLinks(siteManager, node);
- }
-
- doc.getLink().delete();
- assertFalse(structure.containsByUuid(doc.getUUID(), doc.getLanguage()));
- assertFalse(structure.contains(PATH));
- assertFalse(structure.contains(PARENT_PATH));
-
- } finally {
- if (selector != null) {
- if (siteManager != null) {
- selector.release(siteManager);
- }
- getManager().release(selector);
- }
- if (docManager != null) {
- getManager().release(docManager);
- }
- if (resourceTypeSelector != null) {
- getManager().release(resourceTypeSelector);
- }
- }
- // session.commit();
- }
-
- protected void checkSetLabel(Link link) {
- String newLabel = "New Label";
- String oldLabel = link.getLabel();
- assertFalse(oldLabel.equals(newLabel));
- link.setLabel(newLabel);
- assertTrue(link.getLabel().equals(newLabel));
- link.setLabel(oldLabel);
- }
-
- protected void checkLinks(SiteManager siteManager, SiteNode node) throws SiteException {
- String[] languages = node.getLanguages();
- for (int i = 0; i < languages.length; i++) {
- Link link = node.getLink(languages[i]);
- assertEquals(link.getLanguage(), languages[i]);
- assertNotNull(link.getLabel());
-
- if (node.getUuid() != null) {
- Document doc = link.getDocument();
- assertNotNull(doc);
-
- String docUuid = doc.getUUID();
- String nodeUuid = node.getUuid();
-
- assertNotNull(doc.getUUID());
- assertEquals(docUuid, nodeUuid);
- assertEquals(doc.getLanguage(), link.getLanguage());
-
- // it may not be allowed to insert the doc twice
- try {
- siteManager.add("/sidebar", doc);
- assertTrue("No exception thrown", false);
- } catch (Exception expected) {
- }
- }
- }
- }
-
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/site/usecases/LinkRewriterTest.java b/trunk/src/impl/test/org/apache/lenya/cms/site/usecases/LinkRewriterTest.java
deleted file mode 100644
index 0ca168c..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/site/usecases/LinkRewriterTest.java
+++ /dev/null
@@ -1,113 +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.lenya.cms.site.usecases;
-
-import org.apache.lenya.ac.impl.AbstractAccessControlTest;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentLocator;
-import org.apache.lenya.cms.publication.DocumentManager;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationUtil;
-import org.apache.lenya.cms.site.SiteUtil;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.xpath.XPathAPI;
-import org.w3c.dom.Attr;
-import org.w3c.dom.NodeList;
-
-/**
- * Link rewriter test.
- */
-public class LinkRewriterTest extends AbstractAccessControlTest {
-
- protected static final String DOCUMENT_ID = "/index";
- protected static final String SOURCE_DOCUMENT_ID = "/concepts";
- protected static final String TARGET_DOCUMENT_ID = "/copied";
-
- /**
- * Test method.
- * @throws Exception
- */
- public void testLinkRewriter() throws Exception {
-/*
- Publication pub = PublicationUtil.getPublication(getManager(), "test");
-
- Document document = getIdentityMap().get(pub, Publication.AUTHORING_AREA, DOCUMENT_ID, "en");
- org.w3c.dom.Document xml = DocumentHelper.readDocument(getClass().getResourceAsStream("index_en.xml"));
- document.getRepositoryNode().lock();
- SourceUtil.writeDOM(xml, document.getSourceURI(), getManager());
-
- LinkRewriter rewriter = null;
- DocumentManager docManager = null;
- Document target = null;
- try {
- docManager = (DocumentManager) getManager().lookup(DocumentManager.ROLE);
-
- Document source = getIdentityMap().get(pub,
- Publication.AUTHORING_AREA,
- SOURCE_DOCUMENT_ID,
- "en");
- source.getRepositoryNode().lock();
-
- DocumentLocator targetLoc = DocumentLocator.getLocator(pub.getId(),
- Publication.AUTHORING_AREA,
- TARGET_DOCUMENT_ID,
- "en");
-
- SiteUtil.getSiteStructure(getManager(),
- source.getFactory(),
- source.getPublication(),
- source.getArea()).getRepositoryNode().lock();
-
- docManager.move(source, targetLoc);
- target = source.getFactory().get(targetLoc);
-
- rewriter = (LinkRewriter) getManager().lookup(LinkRewriter.ROLE);
- rewriter.rewriteLinks(source, target);
-
- } finally {
- if (docManager != null) {
- getManager().release(docManager);
- }
- if (rewriter != null) {
- getManager().release(rewriter);
- }
- }
-
- String[] xPaths = document.getResourceType().getLinkAttributeXPaths();
- assertTrue(xPaths.length > 0);
-
- org.w3c.dom.Document xmlDoc = SourceUtil.readDOM(document.getSourceURI(), getManager());
- boolean matched = false;
-
- for (int i = 0; i < xPaths.length; i++) {
- NodeList nodes = XPathAPI.selectNodeList(xmlDoc, xPaths[i]);
- for (int nodeIndex = 0; nodeIndex < nodes.getLength(); nodeIndex++) {
- Attr attribute = (Attr) nodes.item(nodeIndex);
- String targetUrl = attribute.getValue();
- Document targetDoc = getIdentityMap().getFromURL(targetUrl);
- if (targetDoc.equals(target)) {
- matched = true;
- }
- }
- }
- assertTrue(matched);
- */
- }
-
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/site/usecases/index_en.xml b/trunk/src/impl/test/org/apache/lenya/cms/site/usecases/index_en.xml
deleted file mode 100644
index 960ea40..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/site/usecases/index_en.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml"
-xmlns:xhtml="http://www.w3.org/1999/xhtml"
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.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.
--->
-
-<!-- $Id: index_en.xml 169299 2005-05-09 12:00:43Z jwkaltz $ -->
- <head>
- <title>Welcome to the Default publication</title>
- </head>
- <body>
- <h1>Hello and welcome to the Lenya default publication!</h1>
-
- <p>Apache Lenya is a Java Open-Source Content Management System
- based on open standards such as XML and XSLT and the Apache
- Software Stack, in particular the XML publishing framework Apache
- Cocoon.</p>
-
- <p>For an overview of the concepts and the terminology used in
- Apache Lenya please see the <a href="/test/authoring/concepts.html">Concepts
- section</a>. To see what you can do with Apache Lenya please
- refer to the <a href="/test/authoring/features.html">Features
- section</a>.</p>
-
- <p>If you'd like to get a quick introduction on how to use Apache
- Lenya CMS please go through the <a
- href="/test/authoring/tutorial.html">tutorial</a>.</p>
-
- <p>The purpose of this publication is</p>
-
- <ul>
- <li>to show beginners the basic functionality of the Apache
- Lenya CMS,</li>
-
- <li>to provide an "out of the box" publication that can be
- easily adapted and used,</li>
-
- <li>and to provide a basis for reference implementations of new
- concepts and best practices.</li>
-
- </ul>
-
- <p>This publication does not go to the limit of what's possible
- with Apache Lenya CMS, there are no fancy bells and whistles to
- confuse you, this publication simply contains everything you need
- to get started.</p>
- </body>
-</html>
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/usecase/AbstractUsecaseTest.java b/trunk/src/impl/test/org/apache/lenya/cms/usecase/AbstractUsecaseTest.java
deleted file mode 100644
index 2e68e3c..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/usecase/AbstractUsecaseTest.java
+++ /dev/null
@@ -1,97 +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.lenya.cms.usecase;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.lenya.ac.impl.AbstractAccessControlTest;
-import org.apache.lenya.cms.repository.Session;
-import org.apache.lenya.cms.usecase.impl.TestUsecaseInvoker;
-
-/**
- * Usecase test base class.
- */
-public abstract class AbstractUsecaseTest extends AbstractAccessControlTest {
-
- /**
- * The test.
- * @throws Exception
- */
- public void testUsecase() throws Exception {
-
- Session session = getSession();
- prepareUsecase();
-
- UsecaseInvoker invoker = null;
- try {
- invoker = (UsecaseInvoker) getManager().lookup(TestUsecaseInvoker.ROLE);
- invoker.setTestSession(session);
- invoker.invoke(getRequest().getPathInfo(), getUsecaseName(), getParameters());
-
- this.targetUrl = invoker.getTargetUrl();
-
- List errorMessages = invoker.getErrorMessages();
- for (Iterator i = errorMessages.iterator(); i.hasNext();) {
- UsecaseMessage message = (UsecaseMessage) i.next();
- String m = message.getMessage();
- String[] params = message.getParameters();
- if (params != null) {
- for (int j = 0; j < params.length; j++) {
- m += " [" + params[j] + "]";
- }
- }
- getLogger().error("Usecase error: " + m);
- }
-
- assertEquals(invoker.getResult(), UsecaseInvoker.SUCCESS);
- assertEquals(invoker.getErrorMessages().size(), 0);
- } finally {
- if (invoker != null) {
- getManager().release(invoker);
- }
- }
-
- checkPostconditions();
-
- }
-
- private String targetUrl;
-
- protected String getTargetUrl() {
- if (this.targetUrl == null) {
- throw new IllegalStateException("The usecase has not yet been executed.");
- }
- return this.targetUrl;
- }
-
- protected void prepareUsecase() throws Exception {
- }
-
- protected Map getParameters() {
- return new HashMap();
- }
-
- protected abstract String getUsecaseName();
-
- protected void checkPostconditions() throws Exception {
- }
-
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/cms/workflow/WorkflowTest.java b/trunk/src/impl/test/org/apache/lenya/cms/workflow/WorkflowTest.java
deleted file mode 100644
index 5c861a7..0000000
--- a/trunk/src/impl/test/org/apache/lenya/cms/workflow/WorkflowTest.java
+++ /dev/null
@@ -1,170 +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.
- *
- */
-
-/* $Id$ */
-
-package org.apache.lenya.cms.workflow;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.impl.AbstractAccessControlTest;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentFactory;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.repository.RepositoryException;
-import org.apache.lenya.cms.repository.Session;
-import org.apache.lenya.workflow.Version;
-import org.apache.lenya.workflow.WorkflowException;
-import org.apache.lenya.workflow.Workflowable;
-
-/**
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class WorkflowTest extends AbstractAccessControlTest {
-
- private static final String variableName = "is_live";
- protected static final String URL = "/authoring/index.html";
-
- protected String getWebappUrl() {
- return "/test" + URL;
- }
-
- /**
- * Tests the workflow.
- * @throws Exception when something went wrong.
- */
- public void testWorkflow() throws Exception {
- Publication publication = getPublication("test");
- String url = "/" + publication.getId() + URL;
- DocumentFactory map = getFactory();
- Document document = map.getFromURL(url);
-
- document.getRepositoryNode().lock();
-
- Session session = getSession(submitSituation);
- Workflowable workflowable = WorkflowUtil.getWorkflowable(getManager(),
- session,
- getLogger(),
- document);
- if (workflowable.getVersions().length > 0) {
- Version version = workflowable.getLatestVersion();
- if (version.getValue(variableName) == true) {
- invoke(document, deactivateSituation);
- } else if (version.getState().equals("review")) {
- invoke(document, rejectSituation);
- }
- }
-
- for (int situationIndex = 0; situationIndex < situations.length; situationIndex++) {
- TestSituation situation = situations[situationIndex];
- invoke(document, situation);
- }
-
- document.getRepositoryNode().unlock();
-
- getLogger().info("Test completed.");
- }
-
- protected void invoke(Document document, TestSituation situation)
- throws AccessControlException, RepositoryException, WorkflowException {
- Session session = getSession(situation);
- Workflowable instance = new DocumentWorkflowable(getManager(),
- session,
- document,
- getLogger());
- assertNotNull(instance);
-
- String event = situation.getEvent();
-
- getLogger().info("Event: " + event);
-
- WorkflowUtil.invoke(getManager(), session, getLogger(), document, event);
-
- boolean value = instance.getLatestVersion().getValue(variableName);
-
- getLogger().info("Variable: " + variableName + " = " + value);
- getLogger().info("------------------------------------------------------");
-
- assertEquals(value, situation.getValue());
- }
-
- protected Session getSession(TestSituation situation) throws AccessControlException,
- RepositoryException {
- Session session = login(situation.getUser());
- getLogger().info("User: [" + session.getIdentity().getUser() + "]");
- return session;
- }
-
- private static final TestSituation submitSituation = new TestSituation("lenya", "submit", false);
- private static final TestSituation rejectSituation = new TestSituation("alice", "reject", false);
- private static final TestSituation deactivateSituation = new TestSituation("alice",
- "deactivate",
- false);
- private static final TestSituation publishSituation = new TestSituation("alice",
- "publish",
- true);
-
- private static final TestSituation[] situations = { submitSituation, rejectSituation,
- submitSituation, publishSituation, deactivateSituation };
-
- /**
- * A test situation.
- */
- public static class TestSituation {
- private String user;
- private String event;
- private boolean value;
-
- /**
- * Creates a new test situation.
- * @param _user The user.
- * @param _event The event.
- * @param _value The variable value.
- */
- public TestSituation(String _user, String _event, boolean _value) {
- this.user = _user;
- this.event = _event;
- this.value = _value;
- }
-
- /**
- * Returns the event.
- * @return An event.
- */
- public String getEvent() {
- return this.event;
- }
-
- /**
- * Returns the user.
- * @return A string.
- */
- public String getUser() {
- return this.user;
- }
-
- /**
- * Returns the value.
- * @return A value.
- */
- public boolean getValue() {
- return this.value;
- }
- }
-
-}
\ No newline at end of file
diff --git a/trunk/src/impl/test/org/apache/lenya/net/InetAddressUtilTest.java b/trunk/src/impl/test/org/apache/lenya/net/InetAddressUtilTest.java
deleted file mode 100644
index 5aec774..0000000
--- a/trunk/src/impl/test/org/apache/lenya/net/InetAddressUtilTest.java
+++ /dev/null
@@ -1,45 +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.lenya.net;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import org.apache.cocoon.core.container.ContainerTestCase;
-
-/**
- * Inet address util test
- */
-public class InetAddressUtilTest extends ContainerTestCase {
-
- public void testInetAddressUtil() throws UnknownHostException {
-
- String[] args = { "195.226.6.64", "255.255.255.0", "195.226.6.70" };
-
- if (args.length != 3) {
- System.out.println("Usage: InetAddressUtilTest network subnet ip");
- return;
- }
-
- InetAddress network = InetAddress.getByName(args[0]); // "195.226.6.64");
- InetAddress subnet = InetAddress.getByName(args[1]); // "255.255.255.0");
- InetAddress ip = InetAddress.getByName(args[2]); // "195.226.6.70");
-
- InetAddressUtil util = new InetAddressUtil(getLogger());
- System.out.println(util.contains(network, subnet, ip));
- }
-}
diff --git a/trunk/src/impl/test/org/apache/lenya/transaction/MockFactory.java b/trunk/src/impl/test/org/apache/lenya/transaction/MockFactory.java
deleted file mode 100644
index 715f20f..0000000
--- a/trunk/src/impl/test/org/apache/lenya/transaction/MockFactory.java
+++ /dev/null
@@ -1,36 +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.lenya.transaction;
-
-public class MockFactory implements IdentifiableFactory {
-
- private UnitOfWork unit;
-
- public MockFactory(UnitOfWork unit) {
- this.unit = unit;
- }
-
- public Object build(IdentityMap map, String key) throws Exception {
- return new MockTransactionable(key, this.unit);
- }
-
- public String getType() {
- return "mock";