[jboss-svn-commits] JBL Code SVN: r23348 - in labs/jbosslabs/qa/portal-extensions: configuration/to-copy/server/default/deploy and 39 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Oct 7 10:13:58 EDT 2008


Author: unibrew
Date: 2008-10-07 10:13:57 -0400 (Tue, 07 Oct 2008)
New Revision: 23348

Added:
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/roles.properties
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/users.properties.sample
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/jboss-web.xml
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/web.xml
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.classpath
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.project
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/README
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build.xml
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/wiki/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/wiki/redirect/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/wiki/redirect/WikiToClearspaceRedirect.class
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/dist/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/dist/wiki-redirect.war
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/lib/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/lib/javax.servlet.jar
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/redirect/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/redirect/WikiToClearspaceRedirect.java
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/web/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/web/WEB-INF/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/web/WEB-INF/web.xml
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/wiki/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/wiki/redirect/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/wiki/redirect/WikiToClearspaceRedirect.class
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/example-content.txt
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigration.java
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigrationStarter.java
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupTranslator.java
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupWikiTranslator.java
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/migration-howto.txt
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/sql-script.txt
Removed:
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/roles.properties
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/users.properties.sample
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/jboss-web.xml
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/web.xml
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.classpath
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.project
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/README
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build.xml
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/wiki/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/wiki/redirect/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/wiki/redirect/WikiToClearspaceRedirect.class
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/dist/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/dist/wiki-redirect.war
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/lib/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/lib/javax.servlet.jar
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/redirect/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/redirect/WikiToClearspaceRedirect.java
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/web/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/web/WEB-INF/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/web/WEB-INF/web.xml
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/wiki/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/wiki/redirect/
   labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/wiki/redirect/WikiToClearspaceRedirect.class
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/ivy.xml
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigration.java
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigrationStarter.java
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupTranslator.java
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/migration-howto.txt
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/sql-script.txt
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuAttachmentDataSource.java
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuMediaDataSource.java
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuWikiPageDictionary.java
Modified:
   labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/jboss-web.deployer/server.xml
   labs/jbosslabs/qa/portal-extensions/jbosswiki/common.xml
   labs/jbosslabs/qa/portal-extensions/jbosswiki/project.properties
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/build.xml
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/project.properties
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/project.xml
   labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/etc/org/jboss/wiki/filedatasource.properties.sample
   labs/jbosslabs/qa/portal-extensions/portal-default/src/web/WEB-INF/default-object.xml
Log:
svn merge -r 19972:23342 https://svn.jboss.org/repos/labs/labs/jbosslabs/trunk/portal-extensions .

Modified: labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/jboss-web.deployer/server.xml
===================================================================
--- labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/jboss-web.deployer/server.xml	2008-10-07 13:00:21 UTC (rev 23347)
+++ labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/jboss-web.deployer/server.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -128,6 +128,12 @@
                 pattern="common" directory="${jboss.server.home.dir}/log" 
                 resolveHosts="false" />
             -->
+                       
+            <!-- JBoss.org Access logger -->
+            <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
+                prefix="www.jboss.org_access_log." suffix=".log"
+                pattern="combined" directory="${jboss.server.home.dir}/log"
+                resolveHosts="false" />
 
             <!-- Uncomment to enable single sign-on across web apps
                 deployed to this host. Does not provide SSO across a cluster.     

Copied: labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war (from rev 21907, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/default/deploy/stats.war)

Copied: labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF (from rev 21907, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF)

Copied: labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes (from rev 21907, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes)


Property changes on: labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes
___________________________________________________________________
Name: svn:ignore
   + users.properties


Deleted: labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/roles.properties
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/roles.properties	2008-08-26 11:36:55 UTC (rev 21907)
+++ labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/roles.properties	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1 +0,0 @@
-admin=Authenticated

Copied: labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/roles.properties (from rev 21907, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/roles.properties)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/roles.properties	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/roles.properties	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1 @@
+admin=Authenticated

Deleted: labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/users.properties.sample
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/users.properties.sample	2008-08-26 11:36:55 UTC (rev 21907)
+++ labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/users.properties.sample	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1 +0,0 @@
-admin=changeit

Copied: labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/users.properties.sample (from rev 21907, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/users.properties.sample)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/users.properties.sample	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/classes/users.properties.sample	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1 @@
+admin=changeit

Deleted: labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/jboss-web.xml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/jboss-web.xml	2008-08-26 11:36:55 UTC (rev 21907)
+++ labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/jboss-web.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,4 +0,0 @@
-<!-- The jboss-web.xml for the stats war -->
-<jboss-web>
-   <context-root>/stats</context-root>
-</jboss-web>
\ No newline at end of file

Copied: labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/jboss-web.xml (from rev 21907, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/jboss-web.xml)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/jboss-web.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,4 @@
+<!-- The jboss-web.xml for the stats war -->
+<jboss-web>
+   <context-root>/stats</context-root>
+</jboss-web>
\ No newline at end of file

Deleted: labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/web.xml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/web.xml	2008-08-26 11:36:55 UTC (rev 21907)
+++ labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/web.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE web-app PUBLIC
-   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
-   "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
-
-   <description>Site Statistics</description>
-
-   <security-constraint>
-      <web-resource-collection>
-         <web-resource-name>Authenticated</web-resource-name>
-         <description></description>
-         <url-pattern>/*</url-pattern>
-      </web-resource-collection>
-      <auth-constraint>
-         <role-name>Authenticated</role-name>
-      </auth-constraint>
-   </security-constraint>
-
-   <login-config>
-      <auth-method>BASIC</auth-method>
-      <realm-name>Site Statistics</realm-name>
-   </login-config>
-
-   <security-role>
-         <role-name>Authenticated</role-name>
-   </security-role>
-   
-   <mime-mapping>
-        <extension>html</extension>
-        <mime-type>text/html</mime-type>
-   </mime-mapping>
-
-   <mime-mapping>
-        <extension>png</extension>
-        <mime-type>image/png</mime-type>
-   </mime-mapping>
-
-</web-app>
\ No newline at end of file

Copied: labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/web.xml (from rev 21907, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/web.xml)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/web.xml	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/configuration/to-copy/server/default/deploy/stats.war/WEB-INF/web.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC
+   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+   "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+
+   <description>Site Statistics</description>
+
+   <security-constraint>
+      <web-resource-collection>
+         <web-resource-name>Authenticated</web-resource-name>
+         <description></description>
+         <url-pattern>/*</url-pattern>
+      </web-resource-collection>
+      <auth-constraint>
+         <role-name>Authenticated</role-name>
+      </auth-constraint>
+   </security-constraint>
+
+   <login-config>
+      <auth-method>BASIC</auth-method>
+      <realm-name>Site Statistics</realm-name>
+   </login-config>
+
+   <security-role>
+         <role-name>Authenticated</role-name>
+   </security-role>
+   
+   <mime-mapping>
+        <extension>html</extension>
+        <mime-type>text/html</mime-type>
+   </mime-mapping>
+
+   <mime-mapping>
+        <extension>png</extension>
+        <mime-type>image/png</mime-type>
+   </mime-mapping>
+
+</web-app>
\ No newline at end of file

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect)

Deleted: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.classpath
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/.classpath	2008-10-07 09:57:33 UTC (rev 23342)
+++ labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.classpath	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src/java"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="lib" path="lib/javax.servlet.jar"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.classpath (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/.classpath)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.classpath	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.classpath	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="lib" path="lib/javax.servlet.jar"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Deleted: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.project
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/.project	2008-10-07 09:57:33 UTC (rev 23342)
+++ labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.project	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<projectDescription>
-  <name>Global Project</name>
-  <comment>
-  </comment>
-  <projects>
-  </projects>
-  <buildSpec>
-    <buildCommand>
-      <name>org.eclipse.jdt.core.javabuilder</name>
-      <arguments>
-      </arguments>
-    </buildCommand>
-  </buildSpec>
-  <natures>
-    <nature>org.eclipse.jdt.core.javanature</nature>
-  </natures>
-</projectDescription>
\ No newline at end of file

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.project (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/.project)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.project	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/.project	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<projectDescription>
+  <name>Global Project</name>
+  <comment>
+  </comment>
+  <projects>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments>
+      </arguments>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Deleted: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/README
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/README	2008-10-07 09:57:33 UTC (rev 23342)
+++ labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/README	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,48 +0,0 @@
-FORUMS REDIRECT FILTER
-----------------------
-
-1. Building
-
-During the build, data files are generated, which contain mappings of post and topic ids to forum ids. These mappings are read from the database. For this towork, connection details to the nukes DB have to be provided. This configuration is done through the properties in the first section of build.xml.
-
-After these are filled, you should run:
-
-	ant run
-
-If this completes without errors, a dist/forums-redirect.jar should be created containing the filter, with the data files bundeled.
-
-2. Configuring the filter
-
-In web.xml, add:
-
-    <filter>
-	<filter-name>forumsRedirectFilter</filter-name>
-	<filter-class>org.jboss.forums.redirect.RedirectFilter</filter-class>
-	<init-param>
-		<param-name>forumViewRedirect</param-name>
-		<param-value>/portal/portal/default/forums/JBossForumsWindow?action=1&amp;v=f&amp;f=${forumId}</param-value>
-	</init-param>
-	<init-param>
-		<param-name>topicViewRedirect</param-name>
-		<param-value>/portal/portal/default/forums/JBossForumsWindow?action=1&amp;v=t&amp;t=${topicId}</param-value>
-	</init-param>
-	<init-param>
-		<param-name>postViewRedirect</param-name>
-		<param-value>/portal/portal/default/forums/JBossForumsWindow?action=1&amp;v=t&amp;p=${postId}#${postId}</param-value>
-	</init-param>
-	<init-param>
-		<param-name>postingNewTopicRedirect</param-name>
-		<param-value>/portal/portal/default/forums/JBossForumsWindow?action=1&amp;v=p&amp;f=${forumId}</param-value>
-	</init-param>
-	<init-param>
-		<param-name>postingReplyRedirect</param-name>
-		<param-value>/portal/portal/default/forums/JBossForumsWindow?action=1&amp;v=z&amp;t=${topicId}&amp;f=${forumId}</param-value>
-	</init-param>
-   </filter>
-
-   <filter-mapping>
-	<filter-name>forumsRedirectFilter</filter-name>
-	<url-pattern>/*</url-pattern>
-   </filter-mapping>
-
-And change the values of init parameters to address appropraite for forums deployment. The ${forumId}, ${topicId} etc will be replaced with correct values by the filter.

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/README (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/README)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/README	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/README	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,48 @@
+FORUMS REDIRECT FILTER
+----------------------
+
+1. Building
+
+During the build, data files are generated, which contain mappings of post and topic ids to forum ids. These mappings are read from the database. For this towork, connection details to the nukes DB have to be provided. This configuration is done through the properties in the first section of build.xml.
+
+After these are filled, you should run:
+
+	ant run
+
+If this completes without errors, a dist/forums-redirect.jar should be created containing the filter, with the data files bundeled.
+
+2. Configuring the filter
+
+In web.xml, add:
+
+    <filter>
+	<filter-name>forumsRedirectFilter</filter-name>
+	<filter-class>org.jboss.forums.redirect.RedirectFilter</filter-class>
+	<init-param>
+		<param-name>forumViewRedirect</param-name>
+		<param-value>/portal/portal/default/forums/JBossForumsWindow?action=1&amp;v=f&amp;f=${forumId}</param-value>
+	</init-param>
+	<init-param>
+		<param-name>topicViewRedirect</param-name>
+		<param-value>/portal/portal/default/forums/JBossForumsWindow?action=1&amp;v=t&amp;t=${topicId}</param-value>
+	</init-param>
+	<init-param>
+		<param-name>postViewRedirect</param-name>
+		<param-value>/portal/portal/default/forums/JBossForumsWindow?action=1&amp;v=t&amp;p=${postId}#${postId}</param-value>
+	</init-param>
+	<init-param>
+		<param-name>postingNewTopicRedirect</param-name>
+		<param-value>/portal/portal/default/forums/JBossForumsWindow?action=1&amp;v=p&amp;f=${forumId}</param-value>
+	</init-param>
+	<init-param>
+		<param-name>postingReplyRedirect</param-name>
+		<param-value>/portal/portal/default/forums/JBossForumsWindow?action=1&amp;v=z&amp;t=${topicId}&amp;f=${forumId}</param-value>
+	</init-param>
+   </filter>
+
+   <filter-mapping>
+	<filter-name>forumsRedirectFilter</filter-name>
+	<url-pattern>/*</url-pattern>
+   </filter-mapping>
+
+And change the values of init parameters to address appropraite for forums deployment. The ${forumId}, ${topicId} etc will be replaced with correct values by the filter.

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/build)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/build/WEB-INF)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/wiki (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/wiki)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/wiki/redirect (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/wiki/redirect)

Deleted: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/wiki/redirect/WikiToClearspaceRedirect.class
===================================================================
(Binary files differ)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/wiki/redirect/WikiToClearspaceRedirect.class (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/build/WEB-INF/classes/org/jboss/wiki/redirect/WikiToClearspaceRedirect.class)
===================================================================
(Binary files differ)

Deleted: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build.xml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/build.xml	2008-10-07 09:57:33 UTC (rev 23342)
+++ labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,48 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<project name="Wiki redirect" default="run" basedir=".">
-	<!-- ====================================== -->
-	<!-- ====================================== -->
-	<!-- ====================================== -->
-	
-	<property name="src" value="src" />
-	<property name="src.java" value="${src}/java" />
-	<property name="src.web" value="${src}/web" />
-	<property name="build" value="build" />
-	<property name="dist" value="dist" />
-
-	<fileset id="lib.jars" dir="lib">
-		<include name="**/*.jar" />
-	</fileset>
-
-	<path id="base.jars">
-		<fileset refid="lib.jars" />
-	</path>
-
-	<target name="clean">
-		<delete dir="${build}" />
-		<delete dir="${dist}" />
-	</target>
-
-	<target name="build" depends="clean">
-		<mkdir dir="${build}/WEB-INF/classes" />
-		<!-- Compiling the source -->
-		<javac srcdir="${src.java}" destdir="${build}/WEB-INF/classes" target="1.5" source="1.5">
-			<classpath refid="base.jars" />
-		</javac>
-	</target>
-
-	<target name="run" depends="build">
-
-		<!-- Creating a jar with the filter -->
-		<mkdir dir="${dist}" />
-		<jar destfile="${dist}/wiki-redirect.war" basedir="${build}">
-			<fileset dir="${src.web}" />
-		</jar>
-
-		<!-- Test deployment -->
-		<copy todir="/Users/tomek/jboss/jboss/server/default/deploy">
-			<fileset dir="${dist}"><include name="**/*.war" /></fileset>
-    	</copy>
-	</target>
-</project>
\ No newline at end of file

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build.xml (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/build.xml)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build.xml	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/build.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,48 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<project name="Wiki redirect" default="run" basedir=".">
+	<!-- ====================================== -->
+	<!-- ====================================== -->
+	<!-- ====================================== -->
+	
+	<property name="src" value="src" />
+	<property name="src.java" value="${src}/java" />
+	<property name="src.web" value="${src}/web" />
+	<property name="build" value="build" />
+	<property name="dist" value="dist" />
+
+	<fileset id="lib.jars" dir="lib">
+		<include name="**/*.jar" />
+	</fileset>
+
+	<path id="base.jars">
+		<fileset refid="lib.jars" />
+	</path>
+
+	<target name="clean">
+		<delete dir="${build}" />
+		<delete dir="${dist}" />
+	</target>
+
+	<target name="build" depends="clean">
+		<mkdir dir="${build}/WEB-INF/classes" />
+		<!-- Compiling the source -->
+		<javac srcdir="${src.java}" destdir="${build}/WEB-INF/classes" target="1.5" source="1.5">
+			<classpath refid="base.jars" />
+		</javac>
+	</target>
+
+	<target name="run" depends="build">
+
+		<!-- Creating a jar with the filter -->
+		<mkdir dir="${dist}" />
+		<jar destfile="${dist}/wiki-redirect.war" basedir="${build}">
+			<fileset dir="${src.web}" />
+		</jar>
+
+		<!-- Test deployment -->
+		<copy todir="/Users/tomek/jboss/jboss/server/default/deploy">
+			<fileset dir="${dist}"><include name="**/*.war" /></fileset>
+    	</copy>
+	</target>
+</project>
\ No newline at end of file

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/dist (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/dist)

Deleted: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/dist/wiki-redirect.war
===================================================================
(Binary files differ)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/dist/wiki-redirect.war (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/dist/wiki-redirect.war)
===================================================================
(Binary files differ)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/lib (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/lib)

Deleted: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/lib/javax.servlet.jar
===================================================================
(Binary files differ)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/lib/javax.servlet.jar (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/lib/javax.servlet.jar)
===================================================================
(Binary files differ)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/src)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/src/java)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/src/java/org)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/src/java/org/jboss)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/redirect (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/redirect)

Deleted: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/redirect/WikiToClearspaceRedirect.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/redirect/WikiToClearspaceRedirect.java	2008-10-07 09:57:33 UTC (rev 23342)
+++ labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/redirect/WikiToClearspaceRedirect.java	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,94 +0,0 @@
-package org.jboss.wiki.redirect;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Properties;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-public class WikiToClearspaceRedirect extends HttpServlet {
-
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	
-	private Properties pagesMap;
-	
-	private String redirectTo;
-	
-	private static final String PROP_FILE = "propertiesFile";
-	
-	private static final String NEW_DOMAIN = "newDomain";
-
-	@Override
-	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
-			throws ServletException, IOException {
-		if (pagesMap == null || pagesMap.isEmpty() || redirectTo == null || redirectTo.length() == 0) {
-			// wrong configuration. Send internal error
-			resp.sendError(500);
-			
-			return;
-		}
-		
-		if (req.getRequestURI().equals(req.getContextPath())) {
-			resp.sendRedirect(redirectTo);
-			return;
-		}
-		
-		String page = req.getRequestURI().substring(req.getContextPath().length() + 1);
-		
-		if (pagesMap.containsKey(page)) {
-			String redirPage = redirectTo + "docs/" + pagesMap.getProperty(page);
-			
-			resp.setContentType("text/html");
-			resp.getWriter().write("<html><head>");
-			resp.getWriter().write("<meta http-equiv='refresh' content='5;url=");
-			resp.getWriter().write(redirPage);
-			resp.getWriter().write("'/>\n</head><body>\n<h3>Please update bookmars</h3>\nNew address: <a href='");
-			resp.getWriter().write(redirPage);
-			resp.getWriter().write("'>");
-			resp.getWriter().write(redirPage);
-			resp.getWriter().write("</a>\n</body></html>");
-			resp.getWriter().close();
-		} else {
-			resp.sendError(404);
-			return;
-		}
-	}
-
-	@Override
-	public void init(ServletConfig config) throws ServletException {
-		redirectTo = config.getInitParameter(NEW_DOMAIN);
-		File propFile = new File(config.getInitParameter(PROP_FILE));
-		if (propFile.exists()) {
-			
-			FileInputStream fis = null;
-			try {
-				fis = new FileInputStream(propFile);
-				
-				pagesMap = new Properties();
-				pagesMap.load(fis);
-			} catch (FileNotFoundException e) {
-				e.printStackTrace();
-			} catch (IOException e) {
-				e.printStackTrace();
-			} finally {
-				if (fis != null) {
-					try {
-						fis.close();
-					} catch (IOException e) {
-						e.printStackTrace();
-					}
-				}
-			}
-		}
-	}
-
-}

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/redirect/WikiToClearspaceRedirect.java (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/redirect/WikiToClearspaceRedirect.java)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/redirect/WikiToClearspaceRedirect.java	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/java/org/jboss/wiki/redirect/WikiToClearspaceRedirect.java	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,94 @@
+package org.jboss.wiki.redirect;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class WikiToClearspaceRedirect extends HttpServlet {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	
+	private Properties pagesMap;
+	
+	private String redirectTo;
+	
+	private static final String PROP_FILE = "propertiesFile";
+	
+	private static final String NEW_DOMAIN = "newDomain";
+
+	@Override
+	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+			throws ServletException, IOException {
+		if (pagesMap == null || pagesMap.isEmpty() || redirectTo == null || redirectTo.length() == 0) {
+			// wrong configuration. Send internal error
+			resp.sendError(500);
+			
+			return;
+		}
+		
+		if (req.getRequestURI().equals(req.getContextPath())) {
+			resp.sendRedirect(redirectTo);
+			return;
+		}
+		
+		String page = req.getRequestURI().substring(req.getContextPath().length() + 1);
+		
+		if (pagesMap.containsKey(page)) {
+			String redirPage = redirectTo + "docs/" + pagesMap.getProperty(page);
+			
+			resp.setContentType("text/html");
+			resp.getWriter().write("<html><head>");
+			resp.getWriter().write("<meta http-equiv='refresh' content='5;url=");
+			resp.getWriter().write(redirPage);
+			resp.getWriter().write("'/>\n</head><body>\n<h3>Please update bookmars</h3>\nNew address: <a href='");
+			resp.getWriter().write(redirPage);
+			resp.getWriter().write("'>");
+			resp.getWriter().write(redirPage);
+			resp.getWriter().write("</a>\n</body></html>");
+			resp.getWriter().close();
+		} else {
+			resp.sendError(404);
+			return;
+		}
+	}
+
+	@Override
+	public void init(ServletConfig config) throws ServletException {
+		redirectTo = config.getInitParameter(NEW_DOMAIN);
+		File propFile = new File(config.getInitParameter(PROP_FILE));
+		if (propFile.exists()) {
+			
+			FileInputStream fis = null;
+			try {
+				fis = new FileInputStream(propFile);
+				
+				pagesMap = new Properties();
+				pagesMap.load(fis);
+			} catch (FileNotFoundException e) {
+				e.printStackTrace();
+			} catch (IOException e) {
+				e.printStackTrace();
+			} finally {
+				if (fis != null) {
+					try {
+						fis.close();
+					} catch (IOException e) {
+						e.printStackTrace();
+					}
+				}
+			}
+		}
+	}
+
+}

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/web (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/src/web)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/web/WEB-INF (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/src/web/WEB-INF)

Deleted: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/web/WEB-INF/web.xml
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/src/web/WEB-INF/web.xml	2008-10-07 09:57:33 UTC (rev 23342)
+++ labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/web/WEB-INF/web.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.4"
-	xmlns="http://java.sun.com/xml/ns/j2ee"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-	<servlet>
-		<servlet-name>WikiRedirect</servlet-name>
-		<servlet-class>org.jboss.wiki.redirect.WikiToClearspaceRedirect</servlet-class>
-		<init-param>
-			<param-name>propertiesFile</param-name>
-			<param-value>/Users/tomek/forge/pages-2008-10-01-06-39.properties</param-value>
-		</init-param>
-		<init-param>
-			<param-name>newDomain</param-name>
-			<param-value>http://10.18.124.68:8080/</param-value>
-		</init-param>
-	</servlet>
-	<servlet-mapping>
-		<servlet-name>WikiRedirect</servlet-name>
-		<url-pattern>/*</url-pattern>
-	</servlet-mapping>
-</web-app>

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/web/WEB-INF/web.xml (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/src/web/WEB-INF/web.xml)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/web/WEB-INF/web.xml	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/src/web/WEB-INF/web.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
+	xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+	<servlet>
+		<servlet-name>WikiRedirect</servlet-name>
+		<servlet-class>org.jboss.wiki.redirect.WikiToClearspaceRedirect</servlet-class>
+		<init-param>
+			<param-name>propertiesFile</param-name>
+			<param-value>/Users/tomek/forge/pages-2008-10-01-06-39.properties</param-value>
+		</init-param>
+		<init-param>
+			<param-name>newDomain</param-name>
+			<param-value>http://10.18.124.68:8080/</param-value>
+		</init-param>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>WikiRedirect</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+</web-app>

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/target)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/target/classes)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/target/classes/org)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/wiki (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/wiki)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/wiki/redirect (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/wiki/redirect)

Deleted: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/wiki/redirect/WikiToClearspaceRedirect.class
===================================================================
(Binary files differ)

Copied: labs/jbosslabs/qa/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/wiki/redirect/WikiToClearspaceRedirect.class (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jboss-wiki-redirect/target/classes/org/jboss/wiki/redirect/WikiToClearspaceRedirect.class)
===================================================================
(Binary files differ)

Modified: labs/jbosslabs/qa/portal-extensions/jbosswiki/common.xml
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/common.xml	2008-10-07 13:00:21 UTC (rev 23347)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/common.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -52,18 +52,6 @@
 	    <jar>portal-portlet-lib.jar</jar>
 	</dependency>
 	
-        <dependency>
-            <groupId>shotoku</groupId>
-            <artifactId>shotoku-base</artifactId>
-            <jar>shotoku-base.jar</jar>
-        </dependency>
-	
-	<dependency>
-		<groupId>shotoku</groupId>
-		<artifactId>shotoku-aop</artifactId>
-		<jar>shotoku-aop.jar</jar>
-	</dependency>
-
 	 <dependency>
                 <groupId>guice</groupId>
                 <artifactId>guice</artifactId>

Modified: labs/jbosslabs/qa/portal-extensions/jbosswiki/project.properties
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/project.properties	2008-10-07 13:00:21 UTC (rev 23347)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/project.properties	2008-10-07 14:13:57 UTC (rev 23348)
@@ -4,10 +4,6 @@
 
 maven.jar.override=on
 
-maven.jar.shotoku-base=${ext.root.dir}/shotoku/shotoku-base/target/shotoku-base.jar
-maven.jar.shotoku-aop=${ext.root.dir}/shotoku/shotoku-aop/target/shotoku-aop.jar
-
-maven.jar.shotoku-cache=${ext.root.dir}/shotoku/shotoku-cache/cache-base/dist/shotoku-cache.jar
 maven.jar.jboss-cache=${ext.root.dir}/shotoku/lib/jboss-cache/jboss-cache.jar
 maven.jar.jgroups=${ext.root.dir}/shotoku/lib/jboss-cache/jgroups.jar
 

Modified: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/build.xml
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/build.xml	2008-10-07 13:00:21 UTC (rev 23347)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/build.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,44 +1,43 @@
-<project xmlns:ivy="antlib:fr.jayasoft.ivy.ant" name="wiki-common" default="all">
+<project name="wiki-common" default="all">
 	<!-- some variables used -->
 	<property name="lib.dir" value="lib" />
-	<property name="build.dir" value="build-ant" />
-	<property name="src.dir" value="src/java" />
+	<property name="clearspace.dir" value="/Users/tomek/jboss/cs/webapps/ROOT.war/WEB-INF/lib" />
+	<property name="build.dir" value="build-migration" />
+	<property name="src.dir" value="src/java-migration" />
 	<property name="target.dir" value="target" />
 	<property name="etc.dir" value="src/etc" />
 	
 	<!-- paths used for compilation and run  -->
 	<path id="lib.path.id">
-		<fileset dir="${lib.dir}" />
-		<fileset dir="../../binaries/portal/to-copy/jboss-portal.sar/lib/" />
-		<fileset dir="../../binaries/as/to-copy/lib" />
-		<fileset dir="../../binaries/as/to-copy/server/default/lib" />
-		<fileset dir="../../shotoku/shotoku-base/target" />
-		<fileset dir="../../shotoku/shotoku-cache/cache-base/dist" />
-		<fileset dir="../../shotoku/shotoku-aop/target" />
 		<fileset dir="../lib" />
+		<fileset dir="${target.dir}" />
+		<fileset dir="${clearspace.dir}" />
 	</path>
 	
-	<target name="all" description="--> build package and create distribution binaries">
+	<target name="all" depends="clean, build, package, deploy" description="--> build package and create distribution binaries">
 		
 	</target>
 	
-	<target name="build" depends="resolve">
+	<target name="clean">
+		<delete dir="${build.dir}"></delete>
+	</target>
+	
+	<target name="build" >
 		<mkdir dir="${build.dir}" />
 		<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.path.id" />
 	</target>
 	
 	<target name="package">
 		<mkdir dir="${target.dir}" />
-		<jar destfile="${target.dir}/wiki-common.jar">
+		<jar destfile="${target.dir}/cs-migration.jar">
+			<fileset dir="${target.dir}/classes"/>
 			<fileset dir="${build.dir}"/>
 			<fileset dir="${etc.dir}"/>
 		</jar>
 	</target>
-		
-    <!-- ================================= 
-          target: resolve              
-         ================================= -->
-    <target name="resolve" description="--> retrieve dependencies with ivy">
-        <ivy:retrieve />
-    </target>
+	
+	<target name="deploy">
+		<copy file="${target.dir}/cs-migration.jar" todir="${clearspace.dir}" overwrite="true"></copy>
+	</target>
+
 </project>

Copied: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/example-content.txt (from rev 21907, labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/example-content.txt)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/example-content.txt	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/example-content.txt	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,2524 @@
+\\ 
+\\ 
+----
+\\ 
+- Package: javax.xml.namespace\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 2\\ 
+    Concrete Classes: 1\\ 
+    Abstract Classes: 1\\ 
+\\ 
+    Ca: 8\\ 
+    Ce: 4\\ 
+\\ 
+    A: 0.5\\ 
+    I: 0.33\\ 
+    D: 0.17\\ 
+\\ 
+Abstract Classes:\\ 
+    javax.xml.namespace.NamespaceContext\\ 
+\\ 
+Concrete Classes:\\ 
+    javax.xml.namespace.QName\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.util\\ 
+    org.jboss.util.id\\ 
+\\ 
+Used By:\\ 
+    org.jboss.util.xml \\ 
+    org.jboss.xb\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.group\\ 
+    org.jboss.xb.binding.metadata\\ 
+    org.jboss.xb.binding.sunday\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.impl.runtime\\ 
+\\ 
+\\ 
+----
+\\ 
+- Package: org.apache.xerces.impl.xs\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 1\\ 
+    Concrete Classes: 1\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 1\\ 
+    Ce: 2\\ 
+\\ 
+    A: 0\\ 
+    I: 0.67\\ 
+    D: 0.33\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.apache.xerces.impl.xs.JBossXBSchemaValidator\\ 
+\\ 
+Depends Upon:\\ 
+    org.apache.xerces.xni\\ 
+    org.apache.xerces.xs\\ 
+\\ 
+Used By:\\ 
+    org.jboss.xb.binding.parser.xni\\ 
+\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.logging\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 8\\ 
+    Concrete Classes: 7\\ 
+    Abstract Classes: 1\\ 
+\\ 
+    Ca: 24\\ 
+    Ce: 4\\ 
+\\ 
+    A: 0.12\\ 
+    I: 0.14\\ 
+    D: 0.73\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.logging.LoggerPlugin\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.logging.DynamicLogger\\ 
+    org.jboss.logging.JBossJDKLogManager\\ 
+    org.jboss.logging.JDK14LoggerPlugin\\ 
+    org.jboss.logging.Log4jLoggerPlugin\\ 
+    org.jboss.logging.Logger\\ 
+    org.jboss.logging.NullLoggerPlugin\\ 
+    org.jboss.logging.XLevel\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.util.logging\\ 
+    org.apache.log4j\\ 
+\\ 
+Used By:\\ 
+    org.jboss.logging.jdk\\ 
+    org.jboss.logging.util\\ 
+    org.jboss.net.protocol\\ 
+    org.jboss.net.protocol.file\\ 
+    org.jboss.net.protocol.njar\\ 
+    org.jboss.net.protocol.resource\\ 
+    org.jboss.util\\ 
+    org.jboss.util.file\\ 
+    org.jboss.util.naming\\ 
+    org.jboss.util.property.jmx\\ 
+    org.jboss.util.propertyeditor\\ 
+    org.jboss.util.state\\ 
+    org.jboss.util.state.xml\\ 
+    org.jboss.util.stream\\ 
+    org.jboss.util.threadpool\\ 
+    org.jboss.util.xml\\ 
+    org.jboss.xb\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.metadata\\ 
+    org.jboss.xb.binding.parser.sax\\ 
+    org.jboss.xb.binding.parser.xni\\ 
+    org.jboss.xb.binding.sunday\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.impl.runtime\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.logging.appender\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 5\\ 
+    Concrete Classes: 5\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 8\\ 
+\\ 
+    A: 0\\ 
+    I: 1\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.logging.appender.DailyRollingFileAppender\\ 
+    org.jboss.logging.appender.FileAppender\\ 
+    org.jboss.logging.appender.FileAppender$Helper\\ 
+    org.jboss.logging.appender.RegexEventEvaluator\\ 
+    org.jboss.logging.appender.RollingFileAppender\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.net\\ 
+    java.util\\ 
+    java.util.regex\\ 
+    org.apache.log4j\\ 
+    org.apache.log4j.helpers\\ 
+    org.apache.log4j.spi\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.logging.filter\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 1\\ 
+    Concrete Classes: 1\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 5\\ 
+\\ 
+    A: 0\\ 
+    I: 1\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.logging.filter.TCLFilter\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+    java.lang.reflect\\ 
+    java.net\\ 
+    org.apache.log4j.spi\\ 
+    org.jboss.util.collection\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.logging.jdk\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 12\\ 
+    Concrete Classes: 11\\ 
+    Abstract Classes: 1\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 7\\ 
+\\ 
+    A: 0.08\\ 
+    I: 1\\ 
+    D: 0.08\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.logging.jdk.SecurityActions$Actions\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.logging.jdk.JDK14LoggerPlugin\\ 
+    org.jboss.logging.jdk.JDKLogManager\\ 
+    org.jboss.logging.jdk.SecurityActions\\ 
+    org.jboss.logging.jdk.SecurityActions$1\\ 
+    org.jboss.logging.jdk.SecurityActions$2\\ 
+    org.jboss.logging.jdk.SecurityActions$3\\ 
+    org.jboss.logging.jdk.SecurityActions$4\\ 
+    org.jboss.logging.jdk.SecurityActions$Actions$1\\ 
+    org.jboss.logging.jdk.SecurityActions$Actions$2\\ 
+    org.jboss.logging.jdk.SecurityActions$Actions$2$1\\ 
+    org.jboss.logging.jdk.SecurityActions$Actions$2$2\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.net\\ 
+    java.security\\ 
+    java.util.logging\\ 
+    org.jboss.logging\\ 
+    org.jboss.logging.jdk.xml\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.logging.jdk.format\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 15\\ 
+    Concrete Classes: 13\\ 
+    Abstract Classes: 2\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 5\\ 
+\\ 
+    A: 0.13\\ 
+    I: 1\\ 
+    D: 0.13\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.logging.jdk.format.PatternConverter\\ 
+    org.jboss.logging.jdk.format.PatternParser$NamedPatternConverter\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.logging.jdk.format.AbsoluteTimeDateFormat\\ 
+    org.jboss.logging.jdk.format.DateTimeDateFormat\\ 
+    org.jboss.logging.jdk.format.FormattingInfo\\ 
+    org.jboss.logging.jdk.format.ISO8601DateFormat\\ 
+    org.jboss.logging.jdk.format.PatternFormatter\\ 
+    org.jboss.logging.jdk.format.PatternParser\\ 
+    org.jboss.logging.jdk.format.PatternParser$BasicPatternConverter\\ 
+    org.jboss.logging.jdk.format.PatternParser$CategoryPatternConverter\\ 
+    org.jboss.logging.jdk.format.PatternParser$ClassNamePatternConverter\\ 
+    org.jboss.logging.jdk.format.PatternParser$DatePatternConverter\\ 
+    org.jboss.logging.jdk.format.PatternParser$LiteralPatternConverter\\ 
+    org.jboss.logging.jdk.format.PatternParser$LocationPatternConverter\\ 
+    org.jboss.logging.jdk.format.PatternParser$MDCPatternConverter\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.text\\ 
+    java.util\\ 
+    java.util.logging\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.logging.jdk.handlers\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 5\\ 
+    Concrete Classes: 4\\ 
+    Abstract Classes: 1\\ 
+\\ 
+    Ca: 1\\ 
+    Ce: 5\\ 
+\\ 
+    A: 0.2\\ 
+    I: 0.83\\ 
+    D: 0.03\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.logging.jdk.handlers.HandlerSkeleton\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.logging.jdk.handlers.DailyRollingFileHandler\\ 
+    org.jboss.logging.jdk.handlers.FileHandler\\ 
+    org.jboss.logging.jdk.handlers.RollingCalendar\\ 
+    org.jboss.logging.jdk.handlers.WriterHandler\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.text\\ 
+    java.util\\ 
+    java.util.logging\\ 
+\\ 
+Used By:\\ 
+    org.jboss.logging.jdk.xml\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.logging.jdk.xml\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 7\\ 
+    Concrete Classes: 6\\ 
+    Abstract Classes: 1\\ 
+\\ 
+    Ca: 1\\ 
+    Ce: 13\\ 
+\\ 
+    A: 0.14\\ 
+    I: 0.93\\ 
+    D: 0.07\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.logging.jdk.xml.DOMConfigurator$ParseAction\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.logging.jdk.xml.DOMConfigurator\\ 
+    org.jboss.logging.jdk.xml.DOMConfigurator$1\\ 
+    org.jboss.logging.jdk.xml.DOMConfigurator$2\\ 
+    org.jboss.logging.jdk.xml.DOMConfigurator$3\\ 
+    org.jboss.logging.jdk.xml.DOMConfigurator$4\\ 
+    org.jboss.logging.jdk.xml.DOMConfigurator$5\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.lang.reflect\\ 
+    java.net\\ 
+    java.util\\ 
+    java.util.logging\\ 
+    javax.xml.parsers\\ 
+    org.jboss.logging.jdk.handlers\\ 
+    org.jboss.util\\ 
+    org.jboss.util.propertyeditor\\ 
+    org.jboss.util.xml\\ 
+    org.w3c.dom\\ 
+    org.xml.sax\\ 
+\\ 
+Used By:\\ 
+    org.jboss.logging.jdk\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.logging.layout\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 4\\ 
+    Concrete Classes: 4\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 4\\ 
+\\ 
+    A: 0\\ 
+    I: 1\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.logging.layout.PatternLayout\\ 
+    org.jboss.logging.layout.PatternParserEx\\ 
+    org.jboss.logging.layout.ThreadMDCConverter\\ 
+    org.jboss.logging.layout.ThreadNDCConverter\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+    org.apache.log4j\\ 
+    org.apache.log4j.helpers\\ 
+    org.apache.log4j.spi\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.logging.util\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 9\\ 
+    Concrete Classes: 9\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 5\\ 
+\\ 
+    A: 0\\ 
+    I: 1\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.logging.util.CategoryStream\\ 
+    org.jboss.logging.util.CategoryWriter\\ 
+    org.jboss.logging.util.CategoryWriter$InternalCategoryWriter\\ 
+    org.jboss.logging.util.LoggerPluginWriter\\ 
+    org.jboss.logging.util.LoggerPluginWriter$PluginWriter\\ 
+    org.jboss.logging.util.LoggerStream\\ 
+    org.jboss.logging.util.LoggerWriter\\ 
+    org.jboss.logging.util.LoggerWriter$InternalLoggerWriter\\ 
+    org.jboss.logging.util.OnlyOnceErrorHandler\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    org.apache.log4j\\ 
+    org.apache.log4j.spi\\ 
+    org.jboss.logging\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.net.protocol\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 8\\ 
+    Concrete Classes: 5\\ 
+    Abstract Classes: 3\\ 
+\\ 
+    Ca: 3\\ 
+    Ce: 6\\ 
+\\ 
+    A: 0.38\\ 
+    I: 0.67\\ 
+    D: 0.04\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.net.protocol.URLLister\\ 
+    org.jboss.net.protocol.URLLister$URLFilter\\ 
+    org.jboss.net.protocol.URLListerBase\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.net.protocol.DelegatingURLConnection\\ 
+    org.jboss.net.protocol.URLListerBase$1\\ 
+    org.jboss.net.protocol.URLListerBase$URLFilterImpl\\ 
+    org.jboss.net.protocol.URLListerFactory\\ 
+    org.jboss.net.protocol.URLStreamHandlerFactory\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.net\\ 
+    java.security\\ 
+    java.util\\ 
+    org.jboss.logging\\ 
+\\ 
+Used By:\\ 
+    org.jboss.net.protocol.file\\ 
+    org.jboss.net.protocol.http\\ 
+    org.jboss.net.protocol.resource\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.net.protocol.file\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 4\\ 
+    Concrete Classes: 4\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 7\\ 
+\\ 
+    A: 0\\ 
+    I: 1\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.net.protocol.file.FileURLConnection\\ 
+    org.jboss.net.protocol.file.FileURLLister\\ 
+    org.jboss.net.protocol.file.FileURLLister$1\\ 
+    org.jboss.net.protocol.file.Handler\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.net\\ 
+    java.security\\ 
+    java.util\\ 
+    org.jboss.logging\\ 
+    org.jboss.net.protocol\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.net.protocol.http\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 1\\ 
+    Concrete Classes: 1\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 7\\ 
+\\ 
+    A: 0\\ 
+    I: 1\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.net.protocol.http.DavURLLister\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.net\\ 
+    java.util\\ 
+    org.apache.commons.httpclient\\ 
+    org.apache.webdav.lib\\ 
+    org.jboss.net.protocol\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.net.protocol.njar\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 1\\ 
+    Concrete Classes: 1\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 7\\ 
+\\ 
+    A: 0\\ 
+    I: 1\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.net.protocol.njar.Handler\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.net\\ 
+    java.util\\ 
+    org.jboss.logging\\ 
+    org.jboss.util\\ 
+    org.jboss.util.stream\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.net.protocol.resource\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 2\\ 
+    Concrete Classes: 2\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 5\\ 
+\\ 
+    A: 0\\ 
+    I: 1\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.net.protocol.resource.Handler\\ 
+    org.jboss.net.protocol.resource.ResourceURLConnection\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.net\\ 
+    org.jboss.logging\\ 
+    org.jboss.net.protocol\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.net.sockets\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 12\\ 
+    Concrete Classes: 11\\ 
+    Abstract Classes: 1\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 11\\ 
+\\ 
+    A: 0.08\\ 
+    I: 1\\ 
+    D: 0.08\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.net.sockets.RMIMultiSocket\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.net.sockets.DefaultSocketFactory\\ 
+    org.jboss.net.sockets.InterruptableInputStream\\ 
+    org.jboss.net.sockets.MethodHash\\ 
+    org.jboss.net.sockets.QueuedClientSocketFactory\\ 
+    org.jboss.net.sockets.RMIMultiSocketClient\\ 
+    org.jboss.net.sockets.RMIMultiSocketHandler\\ 
+    org.jboss.net.sockets.RMIMultiSocketServer\\ 
+    org.jboss.net.sockets.TimeoutClientSocketFactory\\ 
+    org.jboss.net.sockets.TimeoutServerSocket\\ 
+    org.jboss.net.sockets.TimeoutServerSocketFactory\\ 
+    org.jboss.net.sockets.TimeoutSocket\\ 
+\\ 
+Depends Upon:\\ 
+    EDU.oswego.cs.dl.util.concurrent\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.lang.reflect\\ 
+    java.net\\ 
+    java.nio.channels\\ 
+    java.rmi\\ 
+    java.rmi.server\\ 
+    java.security\\ 
+    java.util\\ 
+    javax.net\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.net.ssl\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 1\\ 
+    Concrete Classes: 0\\ 
+    Abstract Classes: 1\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 2\\ 
+\\ 
+    A: 1\\ 
+    I: 1\\ 
+    D: 1\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.net.ssl.SSLSocketFactoryBuilder\\ 
+\\ 
+Concrete Classes:\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+    javax.net.ssl\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 96\\ 
+    Concrete Classes: 79\\ 
+    Abstract Classes: 17\\ 
+\\ 
+    Ca: 17\\ 
+    Ce: 15\\ 
+\\ 
+    A: 0.18\\ 
+    I: 0.47\\ 
+    D: 0.35\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.AbstractNestedThrowable\\ 
+    org.jboss.util.CachePolicy\\ 
+    org.jboss.util.CloneableObject$Cloneable\\ 
+    org.jboss.util.Coercible\\ 
+    org.jboss.util.Executable\\ 
+    org.jboss.util.JBossInterface\\ 
+    org.jboss.util.NestedThrowable\\ 
+    org.jboss.util.PrettyString\\ 
+    org.jboss.util.PrettyString$Appendable\\ 
+    org.jboss.util.Sync\\ 
+    org.jboss.util.SysPropertyActions$SysProps\\ 
+    org.jboss.util.ThrowableHandler$Type\\ 
+    org.jboss.util.ThrowableListener\\ 
+    org.jboss.util.TimedCachePolicy$TimedEntry\\ 
+    org.jboss.util.TimerTask\\ 
+    org.jboss.util.WaitSync\\ 
+    org.jboss.util.WeakClassCache\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.Base64\\ 
+    org.jboss.util.Base64$InputStream\\ 
+    org.jboss.util.Base64$OutputStream\\ 
+    org.jboss.util.Classes\\ 
+    org.jboss.util.Classes$1\\ 
+    org.jboss.util.CloneableObject\\ 
+    org.jboss.util.CoercionException\\ 
+    org.jboss.util.CollectionsFactory\\ 
+    org.jboss.util.Counter\\ 
+    org.jboss.util.Counter$1\\ 
+    org.jboss.util.Counter$2\\ 
+    org.jboss.util.Counter$3\\ 
+    org.jboss.util.Counter$Wrapper\\ 
+    org.jboss.util.DataConversionException\\ 
+    org.jboss.util.DirectoryBuilder\\ 
+    org.jboss.util.EmptyStringException\\ 
+    org.jboss.util.FieldInstance\\ 
+    org.jboss.util.HashCode\\ 
+    org.jboss.util.Heap\\ 
+    org.jboss.util.JBossObject\\ 
+    org.jboss.util.JBossStringBuilder\\ 
+    org.jboss.util.LRUCachePolicy\\ 
+    org.jboss.util.LRUCachePolicy$LRUCacheEntry\\ 
+    org.jboss.util.LRUCachePolicy$LRUList\\ 
+    org.jboss.util.LongCounter\\ 
+    org.jboss.util.LongCounter$1\\ 
+    org.jboss.util.LongCounter$2\\ 
+    org.jboss.util.LongCounter$3\\ 
+    org.jboss.util.LongCounter$Wrapper\\ 
+    org.jboss.util.MethodHashing\\ 
+    org.jboss.util.NestedError\\ 
+    org.jboss.util.NestedException\\ 
+    org.jboss.util.NestedRuntimeException\\ 
+    org.jboss.util.NestedSQLException\\ 
+    org.jboss.util.NestedThrowable$1\\ 
+    org.jboss.util.NestedThrowable$Util\\ 
+    org.jboss.util.NoSuchMethodException\\ 
+    org.jboss.util.NotCoercibleException\\ 
+    org.jboss.util.NotImplementedException\\ 
+    org.jboss.util.Null\\ 
+    org.jboss.util.NullArgumentException\\ 
+    org.jboss.util.Objects\\ 
+    org.jboss.util.Primitives\\ 
+    org.jboss.util.Semaphore\\ 
+    org.jboss.util.Semaphore$Info\\ 
+    org.jboss.util.SoftObject\\ 
+    org.jboss.util.StackTrace\\ 
+    org.jboss.util.StackTrace$Entry\\ 
+    org.jboss.util.StackTrace$Parser\\ 
+    org.jboss.util.StopWatch\\ 
+    org.jboss.util.StopWatch$1\\ 
+    org.jboss.util.StopWatch$Wrapper\\ 
+    org.jboss.util.StringPropertyReplacer\\ 
+    org.jboss.util.Strings\\ 
+    org.jboss.util.Strings$Range\\ 
+    org.jboss.util.SynchronizedCachePolicy\\ 
+    org.jboss.util.SysPropertyActions\\ 
+    org.jboss.util.SysPropertyActions$1\\ 
+    org.jboss.util.SysPropertyActions$2\\ 
+    org.jboss.util.SysPropertyActions$3\\ 
+    org.jboss.util.SysPropertyActions$SysProps$1\\ 
+    org.jboss.util.SysPropertyActions$SysProps$2\\ 
+    org.jboss.util.SysPropertyActions$SysProps$2$1\\ 
+    org.jboss.util.ThrowableHandler\\ 
+    org.jboss.util.Throwables\\ 
+    org.jboss.util.TimedCachePolicy\\ 
+    org.jboss.util.TimedCachePolicy$1\\ 
+    org.jboss.util.TimedCachePolicy$DefaultTimedEntry\\ 
+    org.jboss.util.TimedCachePolicy$ResolutionTimer\\ 
+    org.jboss.util.TimerQueue\\ 
+    org.jboss.util.TimerQueue$TimerTaskLoop\\ 
+    org.jboss.util.UnexpectedThrowable\\ 
+    org.jboss.util.UnreachableStatementException\\ 
+    org.jboss.util.WaitSemaphore\\ 
+    org.jboss.util.WeakObject\\ 
+    org.jboss.util.WorkerQueue\\ 
+    org.jboss.util.WorkerQueue$1\\ 
+    org.jboss.util.WorkerQueue$JobItem\\ 
+    org.jboss.util.WorkerQueue$QueueLoop\\ 
+\\ 
+Depends Upon:\\ 
+    EDU.oswego.cs.dl.util.concurrent\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.lang.ref\\ 
+    java.lang.reflect\\ 
+    java.net\\ 
+    java.security\\ 
+    java.sql\\ 
+    java.util\\ 
+    java.util.zip\\ 
+    org.jboss.logging\\ 
+    org.jboss.util.coerce\\ 
+    org.jboss.util.collection\\ 
+    org.jboss.util.platform\\ 
+    org.jboss.util.stream\\ 
+\\ 
+Used By:\\ 
+    org.jboss.logging.jdk.xml\\ 
+    org.jboss.net.protocol.njar\\ 
+    org.jboss.util.coerce\\ 
+    org.jboss.util.collection\\ 
+    org.jboss.util.id\\ 
+    org.jboss.util.platform\\ 
+    org.jboss.util.property\\ 
+    org.jboss.util.propertyeditor\\ 
+    org.jboss.util.stream\\ 
+    org.jboss.util.timeout\\ 
+    org.jboss.util.xml\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.group\\ 
+    org.jboss.xb.binding.metadata\\ 
+    org.jboss.xb.binding.sunday\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.impl.runtime\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.coerce\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 5\\ 
+    Concrete Classes: 3\\ 
+    Abstract Classes: 2\\ 
+\\ 
+    Ca: 1\\ 
+    Ce: 4\\ 
+\\ 
+    A: 0.4\\ 
+    I: 0.8\\ 
+    D: 0.2\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.coerce.BoundCoercionHandler\\ 
+    org.jboss.util.coerce.CoercionHandler\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.coerce.CharacterHandler\\ 
+    org.jboss.util.coerce.ClassHandler\\ 
+    org.jboss.util.coerce.FileHandler\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.util\\ 
+    org.jboss.util\\ 
+\\ 
+Used By:\\ 
+    org.jboss.util\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.collection\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 42\\ 
+    Concrete Classes: 39\\ 
+    Abstract Classes: 3\\ 
+\\ 
+    Ca: 3\\ 
+    Ce: 5\\ 
+\\ 
+    A: 0.07\\ 
+    I: 0.62\\ 
+    D: 0.3\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.collection.AbstractQueue\\ 
+    org.jboss.util.collection.Queue\\ 
+    org.jboss.util.collection.WeakIdentityHashMap$HashIterator\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.collection.ArrayIterator\\ 
+    org.jboss.util.collection.CachedCollection\\ 
+    org.jboss.util.collection.CachedCollection$MyIterator\\ 
+    org.jboss.util.collection.CachedList\\ 
+    org.jboss.util.collection.CollectionException\\ 
+    org.jboss.util.collection.CollectionsUtil\\ 
+    org.jboss.util.collection.CompoundIterator\\ 
+    org.jboss.util.collection.CompoundKey\\ 
+    org.jboss.util.collection.EmptyCollectionException\\ 
+    org.jboss.util.collection.FullCollectionException\\ 
+    org.jboss.util.collection.Iterators\\ 
+    org.jboss.util.collection.Iterators$1\\ 
+    org.jboss.util.collection.Iterators$EmptyIterator\\ 
+    org.jboss.util.collection.Iterators$Enum2Iterator\\ 
+    org.jboss.util.collection.Iterators$ImmutableIterator\\ 
+    org.jboss.util.collection.Iterators$Iter2Enumeration\\ 
+    org.jboss.util.collection.Iterators$SyncEnumeration\\ 
+    org.jboss.util.collection.Iterators$SyncIterator\\ 
+    org.jboss.util.collection.LazyList\\ 
+    org.jboss.util.collection.LazyMap\\ 
+    org.jboss.util.collection.LazySet\\ 
+    org.jboss.util.collection.ListQueue\\ 
+    org.jboss.util.collection.ListSet\\ 
+    org.jboss.util.collection.ReverseListIterator\\ 
+    org.jboss.util.collection.SerializableEnumeration\\ 
+    org.jboss.util.collection.WeakIdentityHashMap\\ 
+    org.jboss.util.collection.WeakIdentityHashMap$1\\ 
+    org.jboss.util.collection.WeakIdentityHashMap$Entry\\ 
+    org.jboss.util.collection.WeakIdentityHashMap$EntryIterator\\ 
+    org.jboss.util.collection.WeakIdentityHashMap$EntrySet\\ 
+    org.jboss.util.collection.WeakIdentityHashMap$KeyIterator\\ 
+    org.jboss.util.collection.WeakIdentityHashMap$KeySet\\ 
+    org.jboss.util.collection.WeakIdentityHashMap$SimpleEntry\\ 
+    org.jboss.util.collection.WeakIdentityHashMap$ValueIterator\\ 
+    org.jboss.util.collection.WeakIdentityHashMap$Values\\ 
+    org.jboss.util.collection.WeakSet\\ 
+    org.jboss.util.collection.WeakSet$1\\ 
+    org.jboss.util.collection.WeakValueHashMap\\ 
+    org.jboss.util.collection.WeakValueHashMap$WeakValueRef\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.lang.ref\\ 
+    java.util\\ 
+    org.jboss.util\\ 
+\\ 
+Used By:\\ 
+    org.jboss.logging.filter\\ 
+    org.jboss.util\\ 
+    org.jboss.util.threadpool\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.deadlock\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 3\\ 
+    Concrete Classes: 2\\ 
+    Abstract Classes: 1\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 2\\ 
+\\ 
+    A: 0.33\\ 
+    I: 1\\ 
+    D: 0.33\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.deadlock.Resource\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.deadlock.ApplicationDeadlockException\\ 
+    org.jboss.util.deadlock.DeadlockDetector\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+    java.util\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.file\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 12\\ 
+    Concrete Classes: 10\\ 
+    Abstract Classes: 2\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 8\\ 
+\\ 
+    A: 0.17\\ 
+    I: 1\\ 
+    D: 0.17\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.file.ArchiveBrowser\\ 
+    org.jboss.util.file.ArchiveBrowser$Filter\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.file.ClassFileFilter\\ 
+    org.jboss.util.file.DirectoryArchiveBrowser\\ 
+    org.jboss.util.file.FilePrefixFilter\\ 
+    org.jboss.util.file.FileSuffixFilter\\ 
+    org.jboss.util.file.FilenamePrefixFilter\\ 
+    org.jboss.util.file.FilenameSuffixFilter\\ 
+    org.jboss.util.file.Files\\ 
+    org.jboss.util.file.JarArchiveBrowser\\ 
+    org.jboss.util.file.JarUtils\\ 
+    org.jboss.util.file.JarUtils$JarInfo\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.net\\ 
+    java.util\\ 
+    java.util.jar\\ 
+    java.util.zip\\ 
+    org.jboss.logging\\ 
+    org.jboss.util.stream\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.id\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 7\\ 
+    Concrete Classes: 6\\ 
+    Abstract Classes: 1\\ 
+\\ 
+    Ca: 1\\ 
+    Ce: 7\\ 
+\\ 
+    A: 0.14\\ 
+    I: 0.88\\ 
+    D: 0.02\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.id.ID\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.id.GUID\\ 
+    org.jboss.util.id.SerialVersion\\ 
+    org.jboss.util.id.SerialVersion$1\\ 
+    org.jboss.util.id.UID\\ 
+    org.jboss.util.id.VMID\\ 
+    org.jboss.util.id.VMID$1\\ 
+\\ 
+Depends Upon:\\ 
+    EDU.oswego.cs.dl.util.concurrent\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.net\\ 
+    java.security\\ 
+    org.jboss.util\\ 
+    org.jboss.util.platform\\ 
+\\ 
+Used By:\\ 
+    javax.xml.namespace\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.loading\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 10\\ 
+    Concrete Classes: 8\\ 
+    Abstract Classes: 2\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 3\\ 
+\\ 
+    A: 0.2\\ 
+    I: 1\\ 
+    D: 0.2\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.loading.Translatable\\ 
+    org.jboss.util.loading.Translator\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.loading.ContextClassLoader\\ 
+    org.jboss.util.loading.ContextClassLoader$1\\ 
+    org.jboss.util.loading.ContextClassLoader$NewInstance\\ 
+    org.jboss.util.loading.ContextClassLoaderSwitcher\\ 
+    org.jboss.util.loading.ContextClassLoaderSwitcher$1\\ 
+    org.jboss.util.loading.ContextClassLoaderSwitcher$NewInstance\\ 
+    org.jboss.util.loading.ContextClassLoaderSwitcher$SwitchContext\\ 
+    org.jboss.util.loading.DelegatingClassLoader\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+    java.net\\ 
+    java.security\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.naming\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 4\\ 
+    Concrete Classes: 4\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 5\\ 
+\\ 
+    A: 0\\ 
+    I: 1\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.naming.ENCThreadLocalKey\\ 
+    org.jboss.util.naming.NonSerializableFactory\\ 
+    org.jboss.util.naming.ReadOnlyContext\\ 
+    org.jboss.util.naming.Util\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+    java.util\\ 
+    javax.naming\\ 
+    javax.naming.spi\\ 
+    org.jboss.logging\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.platform\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 3\\ 
+    Concrete Classes: 2\\ 
+    Abstract Classes: 1\\ 
+\\ 
+    Ca: 2\\ 
+    Ce: 5\\ 
+\\ 
+    A: 0.33\\ 
+    I: 0.71\\ 
+    D: 0.05\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.platform.Constants\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.platform.Java\\ 
+    org.jboss.util.platform.PID\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.util\\ 
+    org.jboss.util\\ 
+    org.jboss.util.property\\ 
+\\ 
+Used By:\\ 
+    org.jboss.util\\ 
+    org.jboss.util.id\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.property\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 24\\ 
+    Concrete Classes: 18\\ 
+    Abstract Classes: 6\\ 
+\\ 
+    Ca: 1\\ 
+    Ce: 7\\ 
+\\ 
+    A: 0.25\\ 
+    I: 0.88\\ 
+    D: 0.12\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.property.BoundPropertyAdapter\\ 
+    org.jboss.util.property.BoundPropertyListener\\ 
+    org.jboss.util.property.Configurable\\ 
+    org.jboss.util.property.PropertyAdapter\\ 
+    org.jboss.util.property.PropertyListener\\ 
+    org.jboss.util.property.PropertyReader\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.property.DefaultPropertyReader\\ 
+    org.jboss.util.property.FieldBoundPropertyListener\\ 
+    org.jboss.util.property.FilePropertyReader\\ 
+    org.jboss.util.property.MethodBoundPropertyListener\\ 
+    org.jboss.util.property.Property\\ 
+    org.jboss.util.property.Property$1\\ 
+    org.jboss.util.property.PropertyContainer\\ 
+    org.jboss.util.property.PropertyError\\ 
+    org.jboss.util.property.PropertyEvent\\ 
+    org.jboss.util.property.PropertyException\\ 
+    org.jboss.util.property.PropertyGroup\\ 
+    org.jboss.util.property.PropertyGroup$1\\ 
+    org.jboss.util.property.PropertyGroup$1$1\\ 
+    org.jboss.util.property.PropertyGroup$2\\ 
+    org.jboss.util.property.PropertyManager\\ 
+    org.jboss.util.property.PropertyManager$1\\ 
+    org.jboss.util.property.PropertyMap\\ 
+    org.jboss.util.property.PropertyMap$1\\ 
+\\ 
+Depends Upon:\\ 
+    java.beans\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.lang.reflect\\ 
+    java.security\\ 
+    java.util\\ 
+    org.jboss.util\\ 
+\\ 
+Used By:\\ 
+    org.jboss.util.platform\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.property.jmx\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 2\\ 
+    Concrete Classes: 1\\ 
+    Abstract Classes: 1\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 2\\ 
+\\ 
+    A: 0.5\\ 
+    I: 1\\ 
+    D: 0.5\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.property.jmx.SystemPropertyClassValueMBean\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.property.jmx.SystemPropertyClassValue\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+    org.jboss.logging\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.propertyeditor\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 28\\ 
+    Concrete Classes: 28\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 1\\ 
+    Ce: 17\\ 
+\\ 
+    A: 0\\ 
+    I: 0.94\\ 
+    D: 0.06\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.propertyeditor.BigDecimalEditor\\ 
+    org.jboss.util.propertyeditor.BlockingModeEditor\\ 
+    org.jboss.util.propertyeditor.BooleanEditor\\ 
+    org.jboss.util.propertyeditor.ByteArrayEditor\\ 
+    org.jboss.util.propertyeditor.ByteEditor\\ 
+    org.jboss.util.propertyeditor.CharacterEditor\\ 
+    org.jboss.util.propertyeditor.ClassArrayEditor\\ 
+    org.jboss.util.propertyeditor.ClassEditor\\ 
+    org.jboss.util.propertyeditor.DateEditor\\ 
+    org.jboss.util.propertyeditor.DateEditor$1\\ 
+    org.jboss.util.propertyeditor.DocumentEditor\\ 
+    org.jboss.util.propertyeditor.DoubleEditor\\ 
+    org.jboss.util.propertyeditor.ElementEditor\\ 
+    org.jboss.util.propertyeditor.FileEditor\\ 
+    org.jboss.util.propertyeditor.FloatEditor\\ 
+    org.jboss.util.propertyeditor.InetAddressEditor\\ 
+    org.jboss.util.propertyeditor.IntArrayEditor\\ 
+    org.jboss.util.propertyeditor.IntegerEditor\\ 
+    org.jboss.util.propertyeditor.LongEditor\\ 
+    org.jboss.util.propertyeditor.PropertiesEditor\\ 
+    org.jboss.util.propertyeditor.PropertyEditors\\ 
+    org.jboss.util.propertyeditor.PropertyEditors$Initialize\\ 
+    org.jboss.util.propertyeditor.ShortEditor\\ 
+    org.jboss.util.propertyeditor.StringArrayEditor\\ 
+    org.jboss.util.propertyeditor.StringEditor\\ 
+    org.jboss.util.propertyeditor.TextPropertyEditorSupport\\ 
+    org.jboss.util.propertyeditor.URIEditor\\ 
+    org.jboss.util.propertyeditor.URLEditor\\ 
+\\ 
+Depends Upon:\\ 
+    java.beans\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.lang.reflect\\ 
+    java.math\\ 
+    java.net\\ 
+    java.security\\ 
+    java.text\\ 
+    java.util\\ 
+    java.util.regex\\ 
+    javax.xml.parsers\\ 
+    org.jboss.logging\\ 
+    org.jboss.util\\ 
+    org.jboss.util.threadpool\\ 
+    org.jboss.util.xml\\ 
+    org.w3c.dom\\ 
+    org.xml.sax\\ 
+\\ 
+Used By:\\ 
+    org.jboss.logging.jdk.xml\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.state\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 4\\ 
+    Concrete Classes: 4\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 1\\ 
+    Ce: 3\\ 
+\\ 
+    A: 0\\ 
+    I: 0.75\\ 
+    D: 0.25\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.state.IllegalTransitionException\\ 
+    org.jboss.util.state.State\\ 
+    org.jboss.util.state.StateMachine\\ 
+    org.jboss.util.state.Transition\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+    java.util\\ 
+    org.jboss.logging\\ 
+\\ 
+Used By:\\ 
+    org.jboss.util.state.xml\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.state.xml\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 1\\ 
+    Concrete Classes: 1\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 7\\ 
+\\ 
+    A: 0\\ 
+    I: 1\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.state.xml.StateMachineParser\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+    java.net\\ 
+    java.util\\ 
+    org.dom4j\\ 
+    org.dom4j.io\\ 
+    org.jboss.logging\\ 
+    org.jboss.util.state\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.stream\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 13\\ 
+    Concrete Classes: 9\\ 
+    Abstract Classes: 4\\ 
+\\ 
+    Ca: 3\\ 
+    Ce: 4\\ 
+\\ 
+    A: 0.31\\ 
+    I: 0.57\\ 
+    D: 0.12\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.stream.IMarshalledValue\\ 
+    org.jboss.util.stream.ObjectOutputStreamAdapter\\ 
+    org.jboss.util.stream.Printable\\ 
+    org.jboss.util.stream.StreamListener\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.stream.AppendObjectOutputStream\\ 
+    org.jboss.util.stream.AppendingObjectOutputStream\\ 
+    org.jboss.util.stream.AutoResetObjectOutputStream\\ 
+    org.jboss.util.stream.CRLFPrintWriter\\ 
+    org.jboss.util.stream.NotifyingBufferedInputStream\\ 
+    org.jboss.util.stream.NotifyingBufferedOutputStream\\ 
+    org.jboss.util.stream.NullInputStream\\ 
+    org.jboss.util.stream.NullOutputStream\\ 
+    org.jboss.util.stream.Streams\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    org.jboss.logging\\ 
+    org.jboss.util\\ 
+\\ 
+Used By:\\ 
+    org.jboss.net.protocol.njar\\ 
+    org.jboss.util\\ 
+    org.jboss.util.file\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.threadpool\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 18\\ 
+    Concrete Classes: 13\\ 
+    Abstract Classes: 5\\ 
+\\ 
+    Ca: 2\\ 
+    Ce: 6\\ 
+\\ 
+    A: 0.28\\ 
+    I: 0.75\\ 
+    D: 0.03\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.threadpool.BasicThreadPoolMBean\\ 
+    org.jboss.util.threadpool.Task\\ 
+    org.jboss.util.threadpool.TaskWrapper\\ 
+    org.jboss.util.threadpool.ThreadPool\\ 
+    org.jboss.util.threadpool.ThreadPoolMBean\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.threadpool.BasicTaskWrapper\\ 
+    org.jboss.util.threadpool.BasicThreadPool\\ 
+    org.jboss.util.threadpool.BasicThreadPool$1\\ 
+    org.jboss.util.threadpool.BasicThreadPool$ThreadPoolThreadFactory\\ 
+    org.jboss.util.threadpool.BasicThreadPool$TimeoutInfo\\ 
+    org.jboss.util.threadpool.BasicThreadPool$TimeoutMonitor\\ 
+    org.jboss.util.threadpool.BlockingMode\\ 
+    org.jboss.util.threadpool.MinPooledExecutor\\ 
+    org.jboss.util.threadpool.RunnableTaskWrapper\\ 
+    org.jboss.util.threadpool.StartTimeoutException\\ 
+    org.jboss.util.threadpool.TaskStoppedException\\ 
+    org.jboss.util.threadpool.ThreadPoolFullException\\ 
+    org.jboss.util.threadpool.ThreadPoolStoppedException\\ 
+\\ 
+Depends Upon:\\ 
+    EDU.oswego.cs.dl.util.concurrent\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.util\\ 
+    org.jboss.logging\\ 
+    org.jboss.util.collection\\ 
+\\ 
+Used By:\\ 
+    org.jboss.util.propertyeditor\\ 
+    org.jboss.util.timeout\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.timeout\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 7\\ 
+    Concrete Classes: 5\\ 
+    Abstract Classes: 2\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 3\\ 
+\\ 
+    A: 0.29\\ 
+    I: 1\\ 
+    D: 0.29\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.timeout.Timeout\\ 
+    org.jboss.util.timeout.TimeoutTarget\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.timeout.TimeoutFactory\\ 
+    org.jboss.util.timeout.TimeoutFactory$1\\ 
+    org.jboss.util.timeout.TimeoutFactory$TimeoutImpl\\ 
+    org.jboss.util.timeout.TimeoutFactory$TimeoutTargetImpl\\ 
+    org.jboss.util.timeout.TimeoutFactory$TimeoutWorker\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+    org.jboss.util\\ 
+    org.jboss.util.threadpool\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.util.xml\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 11\\ 
+    Concrete Classes: 8\\ 
+    Abstract Classes: 3\\ 
+\\ 
+    Ca: 5\\ 
+    Ce: 15\\ 
+\\ 
+    A: 0.27\\ 
+    I: 0.75\\ 
+    D: 0.02\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.util.xml.SchemaResolverConfigMBean\\ 
+    org.jboss.util.xml.SchemaResolverFactory\\ 
+    org.jboss.util.xml.XmlLoadable\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.util.xml.DOMUtils\\ 
+    org.jboss.util.xml.DOMWriter\\ 
+    org.jboss.util.xml.Dom2Sax\\ 
+    org.jboss.util.xml.JBossEntityResolver\\ 
+    org.jboss.util.xml.JBossErrorHandler\\ 
+    org.jboss.util.xml.SchemaResolverConfig\\ 
+    org.jboss.util.xml.SingletonSchemaResolverFactory\\ 
+    org.jboss.util.xml.XmlHelper\\ 
+\\ 
+Depends Upon:\\ 
+    EDU.oswego.cs.dl.util.concurrent\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.net\\ 
+    java.util\\ 
+    javax.xml.namespace\\ 
+    javax.xml.parsers\\ 
+    javax.xml.transform\\ 
+    org.jboss.logging\\ 
+    org.jboss.util\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+    org.w3c.dom\\ 
+    org.xml.sax\\ 
+    org.xml.sax.helpers\\ 
+\\ 
+Used By:\\ 
+    org.jboss.logging.jdk.xml\\ 
+    org.jboss.util.propertyeditor\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.parser.sax\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.xb\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 1\\ 
+    Concrete Classes: 1\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 4\\ 
+\\ 
+    A: 0\\ 
+    I: 1\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.xb.QNameBuilder\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+    javax.xml.namespace\\ 
+    org.jboss.logging\\ 
+    org.w3c.dom\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.xb.binding\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 86\\ 
+    Concrete Classes: 68\\ 
+    Abstract Classes: 18\\ 
+\\ 
+    Ca: 9\\ 
+    Ce: 26\\ 
+\\ 
+    A: 0.21\\ 
+    I: 0.74\\ 
+    D: 0.05\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.xb.binding.AbstractMarshaller\\ 
+    org.jboss.xb.binding.AbstractMarshaller$Stack\\ 
+    org.jboss.xb.binding.Constants\\ 
+    org.jboss.xb.binding.Content$Node\\ 
+    org.jboss.xb.binding.GenericObjectModelFactory\\ 
+    org.jboss.xb.binding.GenericObjectModelProvider\\ 
+    org.jboss.xb.binding.GenericValueContainer\\ 
+    org.jboss.xb.binding.Marshaller\\ 
+    org.jboss.xb.binding.MarshallingContext\\ 
+    org.jboss.xb.binding.ObjectLocalMarshaller\\ 
+    org.jboss.xb.binding.ObjectModelBuilder$Stack\\ 
+    org.jboss.xb.binding.ObjectModelFactory\\ 
+    org.jboss.xb.binding.ObjectModelProvider\\ 
+    org.jboss.xb.binding.TypeBinding\\ 
+    org.jboss.xb.binding.Unmarshaller\\ 
+    org.jboss.xb.binding.UnmarshallerFactory\\ 
+    org.jboss.xb.binding.UnmarshallingContext\\ 
+    org.jboss.xb.binding.Util$XMLNameToJavaIdentifierConverter\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.xb.binding.AbstractMarshaller$ClassMapping\\ 
+    org.jboss.xb.binding.AbstractMarshaller$ContentHandlerAdaptor\\ 
+    org.jboss.xb.binding.AbstractMarshaller$FieldToWildcardMapping\\ 
+    org.jboss.xb.binding.AbstractMarshaller$StackImpl\\ 
+    org.jboss.xb.binding.AttributesImpl\\ 
+    org.jboss.xb.binding.AttributesImpl$AttributeImpl\\ 
+    org.jboss.xb.binding.Content\\ 
+    org.jboss.xb.binding.Content$Characters\\ 
+    org.jboss.xb.binding.Content$EndElement\\ 
+    org.jboss.xb.binding.Content$EndPrefixMapping\\ 
+    org.jboss.xb.binding.Content$StartElement\\ 
+    org.jboss.xb.binding.Content$StartPrefixMapping\\ 
+    org.jboss.xb.binding.ContentPopulator\\ 
+    org.jboss.xb.binding.ContentWriter\\ 
+    org.jboss.xb.binding.DelegatingObjectModelFactory\\ 
+    org.jboss.xb.binding.DelegatingObjectModelFactory$AddMethods\\ 
+    org.jboss.xb.binding.DelegatingObjectModelProvider\\ 
+    org.jboss.xb.binding.DtdMarshaller\\ 
+    org.jboss.xb.binding.DtdMarshaller$Element\\ 
+    org.jboss.xb.binding.GenericValueContainer$1\\ 
+    org.jboss.xb.binding.GenericValueContainer$FACTORY\\ 
+    org.jboss.xb.binding.GenericValueContainer$FACTORY$1\\ 
+    org.jboss.xb.binding.Immutable\\ 
+    org.jboss.xb.binding.JBossXBException\\ 
+    org.jboss.xb.binding.JBossXBRuntimeException\\ 
+    org.jboss.xb.binding.JBossXBValueFormatException\\ 
+    org.jboss.xb.binding.MappingObjectModelFactory\\ 
+    org.jboss.xb.binding.MappingObjectModelFactory$ElementToClassMapping\\ 
+    org.jboss.xb.binding.MappingObjectModelFactory$ElementToFieldMapping\\ 
+    org.jboss.xb.binding.MappingObjectModelFactory$ElementToFieldMappingKey\\ 
+    org.jboss.xb.binding.MappingObjectModelProvider\\ 
+    org.jboss.xb.binding.MappingObjectModelProvider$ClassToElementMapping\\ 
+    org.jboss.xb.binding.MappingObjectModelProvider$FieldToElementMapping\\ 
+    org.jboss.xb.binding.Marshaller$FACTORY\\ 
+    org.jboss.xb.binding.NamespaceRegistry\\ 
+    org.jboss.xb.binding.ObjectModelBuilder\\ 
+    org.jboss.xb.binding.ObjectModelBuilder$1\\ 
+    org.jboss.xb.binding.ObjectModelBuilder$AllElement\\ 
+    org.jboss.xb.binding.ObjectModelBuilder$StackImpl\\ 
+    org.jboss.xb.binding.SchemalessMarshaller\\ 
+    org.jboss.xb.binding.SchemalessObjectModelFactory\\ 
+    org.jboss.xb.binding.SimpleTypeBindings\\ 
+    org.jboss.xb.binding.SimpleTypeBindings$1\\ 
+    org.jboss.xb.binding.SimpleTypeBindings$2\\ 
+    org.jboss.xb.binding.SimpleTypeBindings$3\\ 
+    org.jboss.xb.binding.SimpleTypeBindings$4\\ 
+    org.jboss.xb.binding.SimpleTypeBindings$5\\ 
+    org.jboss.xb.binding.SimpleTypeBindings$6\\ 
+    org.jboss.xb.binding.SimpleTypeBindings$7\\ 
+    org.jboss.xb.binding.SimpleTypeBindings$8\\ 
+    org.jboss.xb.binding.SimpleTypeBindings$9\\ 
+    org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl\\ 
+    org.jboss.xb.binding.UnmarshallerImpl\\ 
+    org.jboss.xb.binding.Util\\ 
+    org.jboss.xb.binding.Util$1\\ 
+    org.jboss.xb.binding.Util$2\\ 
+    org.jboss.xb.binding.Util$3\\ 
+    org.jboss.xb.binding.Util$4\\ 
+    org.jboss.xb.binding.Util$5\\ 
+    org.jboss.xb.binding.Util$XMLNameToJavaIdentifierConverter$1\\ 
+    org.jboss.xb.binding.Util$XMLNameToJavaIdentifierConverter$2\\ 
+    org.jboss.xb.binding.Util$XMLNameToJavaIdentifierConverter$3\\ 
+    org.jboss.xb.binding.Util$XMLNameToJavaIdentifierConverter$PARSER\\ 
+    org.jboss.xb.binding.XercesXsMarshaller\\ 
+    org.jboss.xb.binding.XercesXsMarshaller$1\\ 
+    org.jboss.xb.binding.XercesXsMarshaller$2\\ 
+    org.jboss.xb.binding.XercesXsMarshaller$3\\ 
+    org.jboss.xb.binding.XsMarshaller\\ 
+\\ 
+Depends Upon:\\ 
+    com.wutka.dtd\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.lang.reflect\\ 
+    java.math\\ 
+    java.net\\ 
+    java.security\\ 
+    java.text\\ 
+    java.util\\ 
+    javax.xml.namespace\\ 
+    javax.xml.parsers\\ 
+    org.apache.ws.jaxme.xs\\ 
+    org.apache.ws.jaxme.xs.xml\\ 
+    org.apache.xerces.xs\\ 
+    org.jboss.logging\\ 
+    org.jboss.util\\ 
+    org.jboss.util.xml\\ 
+    org.jboss.xb.binding.metadata.marshalling\\ 
+    org.jboss.xb.binding.metadata.unmarshalling\\ 
+    org.jboss.xb.binding.parser\\ 
+    org.jboss.xb.binding.parser.sax\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+    org.w3c.dom\\ 
+    org.w3c.dom.bootstrap\\ 
+    org.w3c.dom.ls\\ 
+    org.xml.sax\\ 
+\\ 
+Used By:\\ 
+    org.jboss.util.xml\\ 
+    org.jboss.xb.binding.group\\ 
+    org.jboss.xb.binding.metadata\\ 
+    org.jboss.xb.binding.parser\\ 
+    org.jboss.xb.binding.parser.sax\\ 
+    org.jboss.xb.binding.parser.xni\\ 
+    org.jboss.xb.binding.sunday\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.impl.runtime\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.xb.binding.group\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 7\\ 
+    Concrete Classes: 6\\ 
+    Abstract Classes: 1\\ 
+\\ 
+    Ca: 2\\ 
+    Ce: 7\\ 
+\\ 
+    A: 0.14\\ 
+    I: 0.78\\ 
+    D: 0.08\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.xb.binding.group.ValueListHandler\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.xb.binding.group.ValueList\\ 
+    org.jboss.xb.binding.group.ValueList$NonRequiredValue\\ 
+    org.jboss.xb.binding.group.ValueListHandler$1\\ 
+    org.jboss.xb.binding.group.ValueListHandler$2\\ 
+    org.jboss.xb.binding.group.ValueListHandler$3\\ 
+    org.jboss.xb.binding.group.ValueListInitializer\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+    java.lang.reflect\\ 
+    java.util\\ 
+    javax.xml.namespace\\ 
+    org.jboss.util\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+\\ 
+Used By:\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.impl.runtime\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.xb.binding.metadata\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 45\\ 
+    Concrete Classes: 43\\ 
+    Abstract Classes: 2\\ 
+\\ 
+    Ca: 3\\ 
+    Ce: 8\\ 
+\\ 
+    A: 0.04\\ 
+    I: 0.73\\ 
+    D: 0.23\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$AbstractGOMF\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$AttributeSetter\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.xb.binding.metadata.AddMethodMetaData\\ 
+    org.jboss.xb.binding.metadata.CharactersMetaData\\ 
+    org.jboss.xb.binding.metadata.ClassMetaData\\ 
+    org.jboss.xb.binding.metadata.MapEntryMetaData\\ 
+    org.jboss.xb.binding.metadata.PackageMetaData\\ 
+    org.jboss.xb.binding.metadata.PropertyMetaData\\ 
+    org.jboss.xb.binding.metadata.PutMethodMetaData\\ 
+    org.jboss.xb.binding.metadata.SchemaMetaData\\ 
+    org.jboss.xb.binding.metadata.ValueMetaData\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$1\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$10\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$11\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$12\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$13\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$14\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$2\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$3\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$4\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$5\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$6\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$7\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$8\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$9\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JaxbObjectModelFactory\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JaxbObjectModelFactory$1\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JaxbObjectModelFactory$2\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JaxbObjectModelFactory$3\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JaxbObjectModelFactory$4\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JaxbObjectModelFactory$5\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JbxbObjectModelFactory\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JbxbObjectModelFactory$1\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JbxbObjectModelFactory$2\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JbxbObjectModelFactory$3\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JbxbObjectModelFactory$4\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JbxbObjectModelFactory$5\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JbxbObjectModelFactory$6\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JbxbObjectModelFactory$7\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JbxbObjectModelFactory$8\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$JbxbObjectModelFactory$9\\ 
+    org.jboss.xb.binding.metadata.XsdAnnotation$XsdObjectModelFactory\\ 
+    org.jboss.xb.binding.metadata.XsdAppInfo\\ 
+    org.jboss.xb.binding.metadata.XsdElement\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.util\\ 
+    javax.xml.namespace\\ 
+    org.jboss.logging\\ 
+    org.jboss.util\\ 
+    org.jboss.xb.binding\\ 
+    org.xml.sax\\ 
+\\ 
+Used By:\\ 
+    org.jboss.xb.binding.sunday\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.impl.runtime\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.xb.binding.metadata.marshalling\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 1\\ 
+    Concrete Classes: 0\\ 
+    Abstract Classes: 1\\ 
+\\ 
+    Ca: 2\\ 
+    Ce: 1\\ 
+\\ 
+    A: 1\\ 
+    I: 0.33\\ 
+    D: 0.33\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.xb.binding.metadata.marshalling.FieldBinding\\ 
+\\ 
+Concrete Classes:\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+\\ 
+Used By:\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.sunday\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.xb.binding.metadata.unmarshalling\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 4\\ 
+    Concrete Classes: 2\\ 
+    Abstract Classes: 2\\ 
+\\ 
+    Ca: 1\\ 
+    Ce: 1\\ 
+\\ 
+    A: 0.5\\ 
+    I: 0.5\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.xb.binding.metadata.unmarshalling.BindingCursor\\ 
+    org.jboss.xb.binding.metadata.unmarshalling.DocumentBinding\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.xb.binding.metadata.unmarshalling.BindingCursor$Factory\\ 
+    org.jboss.xb.binding.metadata.unmarshalling.BindingCursor$Factory$NoopBindingCursor\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+\\ 
+Used By:\\ 
+    org.jboss.xb.binding\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.xb.binding.parser\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 2\\ 
+    Concrete Classes: 0\\ 
+    Abstract Classes: 2\\ 
+\\ 
+    Ca: 4\\ 
+    Ce: 5\\ 
+\\ 
+    A: 1\\ 
+    I: 0.56\\ 
+    D: 0.56\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.xb.binding.parser.JBossXBParser\\ 
+    org.jboss.xb.binding.parser.JBossXBParser$ContentHandler\\ 
+\\ 
+Concrete Classes:\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    org.apache.xerces.xs\\ 
+    org.jboss.xb.binding\\ 
+    org.xml.sax\\ 
+\\ 
+Used By:\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.parser.sax\\ 
+    org.jboss.xb.binding.parser.xni\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.xb.binding.parser.sax\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 4\\ 
+    Concrete Classes: 4\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 1\\ 
+    Ce: 8\\ 
+\\ 
+    A: 0\\ 
+    I: 0.89\\ 
+    D: 0.11\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.xb.binding.parser.sax.SaxJBossXBParser\\ 
+    org.jboss.xb.binding.parser.sax.SaxJBossXBParser$1\\ 
+    org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler\\ 
+    org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    javax.xml.parsers\\ 
+    org.jboss.logging\\ 
+    org.jboss.util.xml\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.parser\\ 
+    org.xml.sax\\ 
+\\ 
+Used By:\\ 
+    org.jboss.xb.binding\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.xb.binding.parser.xni\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 6\\ 
+    Concrete Classes: 6\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 16\\ 
+\\ 
+    A: 0\\ 
+    I: 1\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.xb.binding.parser.xni.XniJBossXBParser\\ 
+    org.jboss.xb.binding.parser.xni.XniJBossXBParser$1\\ 
+    org.jboss.xb.binding.parser.xni.XniJBossXBParser$2\\ 
+    org.jboss.xb.binding.parser.xni.XniJBossXBParser$DocumentParser\\ 
+    org.jboss.xb.binding.parser.xni.XniJBossXBParser$ParserConfiguration\\ 
+    org.jboss.xb.binding.parser.xni.XniJBossXBParser$SAXAttributes\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.util\\ 
+    org.apache.xerces.impl\\ 
+    org.apache.xerces.impl.dtd\\ 
+    org.apache.xerces.impl.xs\\ 
+    org.apache.xerces.parsers\\ 
+    org.apache.xerces.util\\ 
+    org.apache.xerces.xni\\ 
+    org.apache.xerces.xni.grammars\\ 
+    org.apache.xerces.xni.parser\\ 
+    org.apache.xerces.xs\\ 
+    org.jboss.logging\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.parser\\ 
+    org.xml.sax\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.xb.binding.sunday\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 4\\ 
+    Concrete Classes: 4\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 0\\ 
+    Ce: 13\\ 
+\\ 
+    A: 0\\ 
+    I: 1\\ 
+    D: 0\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.xb.binding.sunday.MarshallerImpl\\ 
+    org.jboss.xb.binding.sunday.MarshallerImpl$1\\ 
+    org.jboss.xb.binding.sunday.MarshallerImpl$2\\ 
+    org.jboss.xb.binding.sunday.MarshallerImpl$3\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.lang.reflect\\ 
+    java.util\\ 
+    javax.xml.namespace\\ 
+    javax.xml.parsers\\ 
+    org.jboss.logging\\ 
+    org.jboss.util\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.metadata\\ 
+    org.jboss.xb.binding.metadata.marshalling\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+    org.xml.sax\\ 
+\\ 
+Used By:\\ 
+    Not used by any packages.\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.xb.binding.sunday.unmarshalling\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 47\\ 
+    Concrete Classes: 36\\ 
+    Abstract Classes: 11\\ 
+\\ 
+    Ca: 5\\ 
+    Ce: 19\\ 
+\\ 
+    A: 0.23\\ 
+    I: 0.79\\ 
+    D: 0.03\\ 
+\\ 
+Abstract Classes:\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.AttributeHandler\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.ElementHandler\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.ElementInterceptor\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding$Cursor\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingInitializer\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.TermBinding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.ValueAdapter\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.AllBinding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.AllBinding$1\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.AttributeHandler$1\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.AttributesHandler\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler$1\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler$2\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding$1\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.DefaultHandlers\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.DefaultHandlers$1\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.DefaultWildcardHandler\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.ElementBinding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.LSInputAdaptor\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding$1\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding$2\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding$1\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.SimpleTypeBinding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler$StackImpl\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler$StackItem\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.TypeBinding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.ValueAdapter$1\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.XsdBinder\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.XsdBinder$1\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.XsdBinder$SharedElements\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.XsdBinder$XsdBinding\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.XsdBinderLoggingErrorHandler\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.XsdBinderTerminatingErrorHandler\\ 
+\\ 
+Depends Upon:\\ 
+    java.io\\ 
+    java.lang\\ 
+    java.lang.reflect\\ 
+    java.net\\ 
+    java.util\\ 
+    javax.xml.namespace\\ 
+    org.apache.xerces.xs\\ 
+    org.jboss.logging\\ 
+    org.jboss.util\\ 
+    org.jboss.util.xml\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.group\\ 
+    org.jboss.xb.binding.metadata\\ 
+    org.jboss.xb.binding.parser\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.impl.runtime\\ 
+    org.w3c.dom\\ 
+    org.w3c.dom.ls\\ 
+    org.xml.sax\\ 
+    org.xml.sax.helpers\\ 
+\\ 
+Used By:\\ 
+    org.jboss.util.xml\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.group\\ 
+    org.jboss.xb.binding.sunday\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.impl.runtime\\ 
+\\ 
+----
+\\ 
+- Package: org.jboss.xb.binding.sunday.unmarshalling.impl.runtime\\ 
+----
+\\ 
+\\ 
+Stats:\\ 
+    Total Classes: 5\\ 
+    Concrete Classes: 5\\ 
+    Abstract Classes: 0\\ 
+\\ 
+    Ca: 1\\ 
+    Ce: 11\\ 
+\\ 
+    A: 0\\ 
+    I: 0.92\\ 
+    D: 0.08\\ 
+\\ 
+Abstract Classes:\\ 
+\\ 
+Concrete Classes:\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.MapEntry\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtAttributeHandler\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtCharactersHandler\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler\\ 
+    org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtUtil\\ 
+\\ 
+Depends Upon:\\ 
+    java.lang\\ 
+    java.lang.reflect\\ 
+    java.util\\ 
+    javax.xml.namespace\\ 
+    org.jboss.logging\\ 
+    org.jboss.util\\ 
+    org.jboss.xb.binding\\ 
+    org.jboss.xb.binding.group\\ 
+    org.jboss.xb.binding.metadata\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+    org.xml.sax\\ 
+\\ 
+Used By:\\ 
+    org.jboss.xb.binding.sunday.unmarshalling\\ 
+\\ 
+\\ 
+\\ 
+----
+\\ 
+- Package Dependency Cycles:\\ 
+----
+\\ 
+\\ 
+javax.xml.namespace\\ 
+    |\\ 
+    |   org.jboss.util.id\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.logging.filter\\ 
+    |\\ 
+    |-> org.jboss.util.collection\\ 
+    |   org.jboss.util\\ 
+    |-> org.jboss.util.collection\\ 
+\\ 
+org.jboss.logging.jdk\\ 
+    |\\ 
+    |   org.jboss.logging.jdk.xml\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.logging.jdk.xml\\ 
+    |\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.net.protocol.njar\\ 
+    |\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.util\\ 
+    |\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.util.coerce\\ 
+    |\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.util.collection\\ 
+    |\\ 
+    |   org.jboss.util\\ 
+    |-> org.jboss.util.collection\\ 
+\\ 
+org.jboss.util.file\\ 
+    |\\ 
+    |   org.jboss.util.stream\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.util.id\\ 
+    |\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.util.platform\\ 
+    |\\ 
+    |   org.jboss.util.property\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.util.property\\ 
+    |\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.util.propertyeditor\\ 
+    |\\ 
+    |   org.jboss.util.threadpool\\ 
+    |-> org.jboss.util.collection\\ 
+    |   org.jboss.util\\ 
+    |-> org.jboss.util.collection\\ 
+\\ 
+org.jboss.util.stream\\ 
+    |\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.util.threadpool\\ 
+    |\\ 
+    |-> org.jboss.util.collection\\ 
+    |   org.jboss.util\\ 
+    |-> org.jboss.util.collection\\ 
+\\ 
+org.jboss.util.timeout\\ 
+    |\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.util.xml\\ 
+    |\\ 
+    |   org.jboss.xb.binding\\ 
+    |   javax.xml.namespace\\ 
+    |   org.jboss.util.id\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.xb\\ 
+    |\\ 
+    |   javax.xml.namespace\\ 
+    |   org.jboss.util.id\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.xb.binding\\ 
+    |\\ 
+    |   javax.xml.namespace\\ 
+    |   org.jboss.util.id\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.xb.binding.group\\ 
+    |\\ 
+    |   javax.xml.namespace\\ 
+    |   org.jboss.util.id\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.xb.binding.metadata\\ 
+    |\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.xb.binding.parser\\ 
+    |\\ 
+    |   org.jboss.xb.binding\\ 
+    |   javax.xml.namespace\\ 
+    |   org.jboss.util.id\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.xb.binding.parser.sax\\ 
+    |\\ 
+    |   org.jboss.xb.binding.parser\\ 
+    |   org.jboss.xb.binding\\ 
+    |   javax.xml.namespace\\ 
+    |   org.jboss.util.id\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.xb.binding.parser.xni\\ 
+    |\\ 
+    |   org.jboss.xb.binding\\ 
+    |   javax.xml.namespace\\ 
+    |   org.jboss.util.id\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.xb.binding.sunday\\ 
+    |\\ 
+    |   org.jboss.xb.binding\\ 
+    |   javax.xml.namespace\\ 
+    |   org.jboss.util.id\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.xb.binding.sunday.unmarshalling\\ 
+    |\\ 
+    |   org.jboss.xb.binding\\ 
+    |   javax.xml.namespace\\ 
+    |   org.jboss.util.id\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+org.jboss.xb.binding.sunday.unmarshalling.impl.runtime\\ 
+    |\\ 
+    |   org.jboss.xb.binding\\ 
+    |   javax.xml.namespace\\ 
+    |   org.jboss.util.id\\ 
+    |-> org.jboss.util\\ 
+    |   org.jboss.util.collection\\ 
+    |-> org.jboss.util\\ 
+\\ 
+\\ 
+

Deleted: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/ivy.xml
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/ivy.xml	2008-10-07 13:00:21 UTC (rev 23347)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/ivy.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,7 +0,0 @@
-<ivy-module version="1.0">
-    <info organisation="org.jboss.wiki" module="wiki-common" />
-    <dependencies>
-        <dependency org="log4j" name="log4j" rev="1.2.9" />
-        <dependency org="jboss" name="jboss-client" rev="4.0.2" />
-    </dependencies>
-</ivy-module>
\ No newline at end of file

Modified: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/project.properties
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/project.properties	2008-10-07 13:00:21 UTC (rev 23347)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/project.properties	2008-10-07 14:13:57 UTC (rev 23348)
@@ -4,8 +4,6 @@
 
 maven.jar.override=on
 
-maven.jar.shotoku-base=${ext.root.dir}/shotoku/shotoku-base/target/shotoku-base.jar
-maven.jar.shotoku-aop=${ext.root.dir}/shotoku/shotoku-aop/target/shotoku-aop.jar
 maven.jar.liferay=${ext.root.dir}/jbosswiki/lib/liferay-portal-impl.jar
 maven.jar.liferay-service=${ext.root.dir}/jbosswiki/lib/liferay-portal-service.jar
 maven.jar.liferay-kernel=${ext.root.dir}/jbosswiki/lib/liferay-portal-kernel.jar

Modified: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/project.xml
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/project.xml	2008-10-07 13:00:21 UTC (rev 23347)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/project.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -164,11 +164,6 @@
 			<version>3.2.3</version>
 		</dependency>
 
-		<dependency>
-			<groupId>shotoku-cache</groupId>
-			<artifactId>shotoku-cache</artifactId>
-			<jar>shotoku-cache.jar</jar>
-		</dependency>
 
 		<dependency>
 			<groupId>jboss-cache</groupId>

Modified: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/etc/org/jboss/wiki/filedatasource.properties.sample
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/etc/org/jboss/wiki/filedatasource.properties.sample	2008-10-07 13:00:21 UTC (rev 23347)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/etc/org/jboss/wiki/filedatasource.properties.sample	2008-10-07 14:13:57 UTC (rev 23348)
@@ -2,8 +2,8 @@
 
 # pathToMedia - points, where JSPWiki file structure is situated
 #pathToMedia=/usr/local/forge/wiki
-pathToMedia=
+pathToMedia=/services/jbossorg/clearspace/wiki
 
 # pathToAttachements - points, where JSPWiki attachemets are situated
 #pathToAttachements=/usr/local/forge/wiki
-pathToAttachements=
+pathToAttachements=/services/jbossorg/clearspace/wiki

Deleted: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuAttachmentDataSource.java
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuAttachmentDataSource.java	2008-10-07 13:00:21 UTC (rev 23347)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuAttachmentDataSource.java	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,303 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wiki;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.apache.log4j.Logger;
-import org.jboss.shotoku.ContentManager;
-import org.jboss.shotoku.Node;
-import org.jboss.shotoku.Resource;
-import org.jboss.shotoku.exceptions.DeleteException;
-import org.jboss.shotoku.exceptions.NameFormatException;
-import org.jboss.shotoku.exceptions.ResourceAlreadyExists;
-import org.jboss.shotoku.exceptions.ResourceDoesNotExist;
-import org.jboss.shotoku.exceptions.SaveException;
-import org.jboss.wiki.configuration.ConfigurationParser;
-
-public class ShotokuAttachmentDataSource implements AttachmentDataSource{
-
-	private static final String AUTHOR = "ShotokuDataSource:pageAuthor";
-	
-	private static final String EDIT_DATE = "ShotokuDataSource:editDate";
-	
-	private static final String ATT_PREFIX = "att-";
-	
-	private static final String PROP_FILE = "shotokudatasource.properties";
-	
-	private Logger log = Logger.getLogger(this.getClass());
-	
-	private ContentManager attManager;
-
-	private String langCode;
-	
-	private WikiEngine wikiEngine;
-
-	public ShotokuAttachmentDataSource() {
-		attManager = ContentManager.getContentManager(getPathToAtt());
-	}
-	
-	private String getPathToAtt() {
-		// load paths
-		InputStream is = ShotokuMediaDataSource.class.getResourceAsStream(PROP_FILE);
-
-		Properties props = new Properties();
-
-		try {
-			props.load(is);
-		} catch (IOException e) {
-			log.error(e);
-		} finally {
-			try {
-				is.close();
-			} catch (IOException e) {
-				log.error(e);
-			}
-		}
-
-		return props.getProperty("pathToAttachements");
-	}
-	
-	public void addAttachment(InputStream attFile, String attName,
-			 String uid, String user) {
-
-		Node attNode = null;
-
-		try {
-			attNode = attManager.getNode(uid + "/" + attName);
-		} catch (ResourceDoesNotExist e) {
-			try {
-				attNode = attManager.getRootDirectory().newNode(
-						uid + "/" + ATT_PREFIX + attName);
-			} catch (ResourceAlreadyExists e1) {
-				// shouldn't happen
-				log.error(e);
-				return;
-			} catch (NameFormatException e1) {
-				log.error(e);
-				return;
-			}
-		}
-
-		attNode.setContent(attFile);
-
-		// set author
-		attNode.setProperty(AUTHOR, user);
-
-		// set date
-		attNode.setProperty(EDIT_DATE, String.valueOf(new Date().getTime()));
-
-		try {
-			attNode.save("Saving attachment: " + attName + " for page: "
-					+ uid);
-		} catch (SaveException e) {
-			log.error(e);
-		}
-	}
-
-	public Set<String> getAttachmentsSet(String uid) {
-		Set<String> attSet = new TreeSet<String>();
-
-		try {
-			List<Node> nodeList = attManager.getDirectory(uid)
-					.getNodes().toList();
-
-			for (Node node : nodeList) {
-				if (node.getName().startsWith(ATT_PREFIX)) {
-					attSet.add(node.getName().substring(ATT_PREFIX.length()));
-				}
-			}
-
-		} catch (ResourceDoesNotExist e) {
-			// just return empty set
-		}
-
-		return attSet;
-	}
-
-	public WikiAttachment getAttachment(String pageName, String attachmentName) {
-		try {
-			Node attNode = attManager.getNode(pageName + "/" + ATT_PREFIX
-					+ attachmentName);
-
-			Date editDate = new Date(Long.valueOf(attNode
-					.getProperty(EDIT_DATE)));
-
-			String author = attNode.getProperty(AUTHOR);
-
-			return new WikiAttachment(attachmentName, editDate, author, attNode
-					.getLength(), attNode.getContentInputStream(), attNode
-					.getRevisionNumber());
-			
-		} catch (ResourceDoesNotExist e) {
-			// no such attachment
-
-			return null;
-		}
-	}
-
-	public WikiAttachment getAttachment(String pageName, String attachmentName,
-			int version) {
-		try {
-			Node attNode = attManager.getNode(pageName + "/" + ATT_PREFIX
-					+ attachmentName).getHistory().getNodeAtRevision(version-1);
-
-			Date editDate = new Date(Long.valueOf(attNode
-					.getProperty(EDIT_DATE)));
-
-			String author = attNode.getProperty(AUTHOR);
-
-			return new WikiAttachment(attachmentName, editDate, author, attNode
-					.getLength(), attNode.getContentInputStream(), attNode
-					.getRevisionNumber());
-			
-		} catch (ResourceDoesNotExist e) {
-			// no such attachment
-
-			return null;
-		}
-	}
-
-	public int getLastAttachmentVersion(String pageName, String attachmentName) {
-		try {
-			Node attNode = attManager.getNode(pageName + "/" + ATT_PREFIX
-					+ attachmentName);
-
-			return attNode.getRevisionNumber();
-			
-		} catch (ResourceDoesNotExist e) {
-			log.error(e);
-			return 0;
-		}
-	}
-
-	public long getAttachmentSize(String pageName, String attachmentName,
-			int version) {
-		try {
-			Node attNode = attManager.getNode(pageName + "/" + ATT_PREFIX
-					+ attachmentName).getHistory().getNodeAtRevision(version);
-
-			return attNode.getLength();
-			
-		} catch (ResourceDoesNotExist e) {
-			log.error(e);
-			return 0;
-		}
-	}
-
-	public boolean deleteAttachment(String pageName, String attachmentName) {
-		try {
-			Node attNode = attManager.getNode(pageName + "/" + ATT_PREFIX
-					+ attachmentName);
-
-			// TODO trash
-			attNode.delete();
-			
-			return true;
-			
-		} catch (ResourceDoesNotExist e) {
-			log.error(e);
-			return false;
-		} catch (DeleteException e) {
-			log.error(e);
-			return false;
-		}
-	}
-
-	public boolean deleteAttachments(String pageName) {
-		try {
-			List<Node> nodeList = attManager.getDirectory(pageName).getNodes().toList();
-
-			for (Node node : nodeList) {
-				if (node.getName().startsWith(ATT_PREFIX)) {
-					// TODO trash
-					node.delete();
-				}
-			}
-			
-			return true;
-			
-		} catch (ResourceDoesNotExist e) {
-			log.error(e);
-			return false;
-		} catch (DeleteException e) {
-			log.error(e);
-			return false;
-		}
-	}
-
-	public void setWikiEngine(WikiEngine wikiEngine) {
-		this.wikiEngine = wikiEngine;
-		
-		if (langCode == null) {
-			langCode = ConfigurationParser.getDefaultLangugeCode();
-		}
-	}
-
-	public void setLanguageCode(String langCode) {
-		attManager = ContentManager.getContentManager(getPathToAtt() + "/"
-				+ ShotokuMediaDataSource.LANG_DIR + "/" + langCode);
-		
-		this.langCode = langCode;
-		
-		log.info("Lang code set: "+langCode+" path is: "+attManager.getPrefix());
-	}
-
-	public void addLangCode(String langCode, String langDesc) {
-		ContentManager baseAtt = ContentManager
-		.getContentManager(getPathToAtt());
-		
-		List<Resource> newDirs = new ArrayList<Resource>();
-		
-		try {
-			baseAtt.getDirectory(ShotokuMediaDataSource.LANG_DIR + "/" + langCode);
-		} catch (ResourceDoesNotExist e) {
-			try {
-				newDirs.add(baseAtt.getRootDirectory().newDirectory(
-						ShotokuMediaDataSource.LANG_DIR + "/" + langCode));
-			} catch (ResourceAlreadyExists e1) {
-				// wont happen
-				log.error(e1);
-			} catch (NameFormatException e1) {
-				log.error(e1);
-				return;
-			}
-		}
-
-		if (newDirs.size() > 0) {
-			try {
-				attManager.save("Adding new language: " + langCode, newDirs);
-			} catch (SaveException e) {
-				log.error(e);
-				return;
-			}
-		}
-	}
-
-}

Deleted: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuMediaDataSource.java
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuMediaDataSource.java	2008-10-07 13:00:21 UTC (rev 23347)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuMediaDataSource.java	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,691 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wiki;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import org.apache.log4j.Logger;
-import org.jboss.shotoku.ContentManager;
-import org.jboss.shotoku.Directory;
-import org.jboss.shotoku.Node;
-import org.jboss.shotoku.Resource;
-import org.jboss.shotoku.cache.CacheItem;
-import org.jboss.shotoku.cache.CacheItemUser;
-import org.jboss.shotoku.cache.ShotokuResourceWatcher;
-import org.jboss.shotoku.cache.ValueChange;
-import org.jboss.shotoku.cache.ValueInit;
-import org.jboss.shotoku.exceptions.DeleteException;
-import org.jboss.shotoku.exceptions.NameFormatException;
-import org.jboss.shotoku.exceptions.RepositoryException;
-import org.jboss.shotoku.exceptions.ResourceAlreadyExists;
-import org.jboss.shotoku.exceptions.ResourceDoesNotExist;
-import org.jboss.shotoku.exceptions.SaveException;
-import org.jboss.wiki.configuration.ConfigurationParser;
-import org.jboss.wiki.credentials.SimpleCredentials;
-import org.jboss.wiki.exceptions.DataSourceException;
-import org.jboss.wiki.exceptions.WikiSaveException;
-
-/**
- * <p>
- * </p>
- * 
- */
-public class ShotokuMediaDataSource implements MediaDataSource {
-
-	private static final String AUTHOR = "ShotokuDataSource:pageAuthor";
-
-	private static final String LAST_VERSION = "ShotokuDataSource:lastVersion";
-
-	private static final String MODS = "ShotokuDataSource:mods";
-
-	private static final String ROLE_PREFIX_EDITABLE = "ShotokuDataSource:rolesEditable";
-
-	private static final String ROLE_PREFIX_VIEWABLE = "ShotokuDataSource:rolesViewable";
-
-	private static final String EDIT_DATE = "ShotokuDataSource:editDate";
-
-	private static final String NODE_NAME = "page";
-
-	private static final String PROPS_PREFIX = "ShotokuDataSource:props";
-
-	private static final String PROP_FILE = "shotokudatasource.properties";
-
-	public static final String LANG_DIR = "lang";
-
-	private Logger log = Logger.getLogger(this.getClass());
-
-	private WikiEngine wikiEngine;
-
-	private ContentManager manager;
-
-	private String langCode = null;
-
-	public ShotokuMediaDataSource() {
-
-		// load props and get content managers
-
-		manager = ContentManager.getContentManager(getPathToMedia());
-
-	}
-
-	private String getPathToMedia() {
-		// load paths
-		InputStream is = ShotokuMediaDataSource.class
-				.getResourceAsStream(PROP_FILE);
-
-		Properties props = new Properties();
-
-		try {
-			props.load(is);
-		} catch (IOException e) {
-			log.error(e);
-		} finally {
-			try {
-				is.close();
-			} catch (IOException e) {
-				log.error(e);
-			}
-		}
-
-		return props.getProperty("pathToMedia");
-	}
-
-	public void preSave()  throws WikiSaveException{
-		// do noting
-	}
-
-	private String getPagePath(String uid) {
-		return uid + "/" + NODE_NAME;
-	}
-
-	public void savePage(String uid, WikiPage page) throws WikiSaveException{
-		Node pageNode = null;
-
-		try {
-			pageNode = manager.getNode(getPagePath(uid));
-		} catch (ResourceDoesNotExist e) {
-			// page is saved for the first time
-			Directory nodeDir = null;
-
-			try {
-				nodeDir = manager.getDirectory(uid);
-			} catch (ResourceDoesNotExist e1) {
-				// This dir is not yet created
-				try {
-					nodeDir = manager.getRootDirectory().newDirectory(uid);
-				} catch (ResourceAlreadyExists e2) {
-					// This shouldn't happen
-					throw new WikiSaveException(e2);
-				} catch (NameFormatException e2) {
-					throw new WikiSaveException(e2);
-				}
-				try {
-					nodeDir.save("Directory for page: " + uid + " (revision: "
-							+ page.getLastVersion() + ") by "
-							+ page.getLastAuthor().getName());
-				} catch (SaveException e2) {
-					throw new WikiSaveException(e2);
-				}
-			}
-
-			try {
-				pageNode = nodeDir.newNode(NODE_NAME);
-			} catch (ResourceAlreadyExists e1) {
-				// This shouldn't happen
-				throw new WikiSaveException(e1);
-			} catch (NameFormatException e1) {
-				throw new WikiSaveException(e1);
-			}
-		}
-
-		// set content
-		pageNode.setContent(page.getContent());
-
-		// set version
-		pageNode.setProperty(LAST_VERSION, String
-				.valueOf(page.getLastVersion()));
-
-		// set mods
-		pageNode.setProperty(MODS, String
-				.valueOf((page.isViewableForAll() ? VIEWABLE : 0)
-						+ (page.isEditableForAll() ? EDITABLE : 0)));
-
-		// set edit date
-		pageNode.setProperty(EDIT_DATE, String.valueOf(page.getEditDate()
-				.getTime()));
-
-		// set author
-		pageNode.setProperty(AUTHOR, page.getLastAuthor().getName());
-
-		try {
-			pageNode.save("Page: " + uid + " (revision: "
-					+ page.getLastVersion() + ") by "
-					+ page.getLastAuthor().getName());
-		} catch (SaveException e) {
-			throw new WikiSaveException(e);
-		}
-
-	}
-
-	public void postSave()  throws WikiSaveException{
-		// do nothing
-	}
-
-	public boolean preGet() {
-		return true;
-	}
-
-	public WikiPage getPage(String pageName) {
-		try {
-			Node page = manager.getNode(getPagePath(pageName));
-
-			String key = getLangCode() + getPagePath(pageName);
-
-			CacheItemUser<String, String> pgch = CacheItem.create(new PageChangeWatcher(key));
-
-			// initialize watcher
-			pgch.get(key);
-
-			WikiPage wikiPage = getPageFromNode(page);
-
-			wikiPage.setMetaDataProps(getMetadataProps(pageName));
-
-			return wikiPage;
-
-		} catch (ResourceDoesNotExist e) {
-			return null;
-		}
-	}
-
-	private WikiPage getPageFromNode(Node page) {
-		// gets WikiPage from node
-
-		int pageMods = Integer.valueOf(page.getProperty(MODS));
-
-		WikiPage wikiPage = new WikiPage(page.getFullName(),
-				new SimpleCredentials(page.getProperty(AUTHOR)), page
-						.getContent(), Integer.valueOf(page
-						.getProperty(LAST_VERSION)), page.getRevisionNumber(),
-				new Date(Long.valueOf(page.getProperty(EDIT_DATE))),
-				wikiEngine, (pageMods & VIEWABLE) == VIEWABLE,
-				(pageMods & EDITABLE) == EDITABLE, getRoles(page, EDITABLE),
-				getRoles(page, EDITABLE), page.getLength(), langCode);
-
-		return wikiPage;
-	}
-
-	private Set<String> getRoles(Node page, int action) {
-		String prefix = (action == VIEWABLE) ? ROLE_PREFIX_VIEWABLE
-				: ROLE_PREFIX_EDITABLE;
-
-		Set<String> roles = new TreeSet<String>();
-
-		int i = 0;
-
-		if (page.getProperty(prefix + i) != null) {
-			roles.add(page.getProperty(prefix + i));
-			i++;
-		}
-
-		if (roles.size() > 0) {
-			return roles;
-		} else {
-			return null;
-		}
-	}
-
-	public boolean postGet() {
-		return true;
-	}
-
-	private Node getNodeAtVersion(Node pageNode, int version)
-			throws ResourceDoesNotExist {
-
-		Node retNode = pageNode.getHistory().getNodeAtRevision(version);
-
-		if (Integer.valueOf(retNode.getProperty(LAST_VERSION)) <= version) {
-			int i = version + 1;
-
-			Node compNode = pageNode.getHistory().getNodeAtRevision(i);
-
-			while (Integer.valueOf(compNode.getProperty(LAST_VERSION)) < (version + 1)) {
-				retNode = compNode;
-				compNode = pageNode.getHistory().getNodeAtRevision(++i);
-			}
-
-			return retNode;
-		} else {
-			int i = version - 1;
-
-			retNode = pageNode.getHistory().getNodeAtRevision(i);
-
-			while (Integer.valueOf(retNode.getProperty(LAST_VERSION)) > version) {
-				retNode = pageNode.getHistory().getNodeAtRevision(--i);
-			}
-
-			return retNode;
-		}
-
-	}
-
-	public WikiPage getPageAtVersion(WikiPage originPage, String uid,
-			boolean loadContent, int version) {
-
-		if (version >= originPage.getLastVersion()) {
-			return null;
-		}
-
-		Node pageNode = null;
-		try {
-			pageNode = manager.getNode(getPagePath(uid));
-		} catch (ResourceDoesNotExist e) {
-			return null;
-		}
-
-		WikiPage pageToReturn = null;
-
-		try {
-			pageToReturn = (WikiPage) originPage.clone();
-		} catch (CloneNotSupportedException e) {
-			log.error(e);
-			return null;
-		}
-
-		try {
-			pageNode = getNodeAtVersion(pageNode, version);
-		} catch (ResourceDoesNotExist e) {
-			log.error(e);
-			return null;
-		}
-
-		// set version
-		pageToReturn.setVersion(Integer.valueOf(pageNode
-				.getProperty(LAST_VERSION)));
-		
-
-		int pageMods = Integer.valueOf(pageNode.getProperty(MODS));
-
-		// set viewable
-		pageToReturn.setViewable((pageMods & VIEWABLE) == VIEWABLE);
-
-		// set editable
-		pageToReturn.setViewable((pageMods & EDITABLE) == EDITABLE);
-
-		// set edit date
-		pageToReturn.setEditDate(new Date(Long.valueOf(pageNode
-				.getProperty(EDIT_DATE))));
-
-		// set author
-		pageToReturn.setLastAuthor(new SimpleCredentials(pageNode
-				.getProperty(AUTHOR)));
-
-		// set content
-		if (loadContent) {
-			pageToReturn.setContent(pageNode.getContent());
-		}
-
-		// set meta props
-		pageToReturn.setMetaDataProps(getMetadataProps(uid));
-		
-		return pageToReturn;
-	}
-
-	public boolean pageExists(String pageName) {
-		try {
-			manager.getNode(getPagePath(pageName));
-			return true;
-		} catch (ResourceDoesNotExist e) {
-			return false;
-		}
-	}
-
-	public void getContentAtVersion(WikiPage page, String uid,
-			boolean loadContent, int version) {
-		if (loadContent) {
-			Node pageNode = null;
-			try {
-				pageNode = getNodeAtVersion(manager.getNode(getPagePath(uid)),
-						version);
-			} catch (ResourceDoesNotExist e) {
-				log.error(e);
-				return;
-			}
-
-			page.setContent(pageNode.getContent());
-		}
-	}
-
-	public Set<String> getAllPageNames() {
-		Directory dir = manager.getRootDirectory();
-
-		Set<String> names = new TreeSet<String>();
-
-		List<Directory> dirList = dir.getDirectories();
-		
-		try {
-			dirList.remove(manager.getDirectory(LANG_DIR));
-		} catch (ResourceDoesNotExist e) {
-			// no lang dir - do nothing
-		}
-		
-		getNodesNamesInDir(dirList, names);
-
-		return names;
-	}
-
-	private void getNodesNamesInDir(List<Directory> dirList, Set<String> names) {
-
-		for (Directory dirIn : dirList) {
-
-			try {
-				dirIn.getNode(NODE_NAME);
-				names.add(dirIn.getFullName());
-			} catch (ResourceDoesNotExist e) {
-				// / no page in this directory
-			}
-
-			getNodesNamesInDir(dirIn.getDirectories(), names);
-		}
-	}
-
-	public Set<String> getPagesFor(String pageName) {
-		Set<String> retSet = new TreeSet<String>();
-
-		try {
-			Directory dir = manager.getDirectory(pageName);
-
-			List<Directory> dirList = dir.getDirectories();
-
-			for (Directory inDir : dirList) {
-				try {
-					// if subdir contain a NODE_NAME node - there's a page
-					// inside
-					inDir.getNode(NODE_NAME);
-					retSet.add(inDir.getFullName());
-				} catch (RepositoryException e) {
-					// there's no page - just directory
-				}
-			}
-		} catch (ResourceDoesNotExist e) {
-			// there is no such page
-		}
-
-		return retSet;
-	}
-
-	public int getPageMod(String pageName) {
-		try {
-			Node pageNode = manager.getNode(getPagePath(pageName));
-
-			return Integer.valueOf(pageNode.getProperty(MODS));
-		} catch (ResourceDoesNotExist e) {
-			log.error(e);
-			return 0;
-		}
-	}
-
-	public void setPageMod(String pageName, int mods) {
-		try {
-			Node pageNode = manager.getNode(getPagePath(pageName));
-
-			pageNode.setProperty(MODS, String.valueOf(mods));
-		} catch (ResourceDoesNotExist e) {
-			log.error(e);
-		}
-	}
-
-	public boolean deletePage(String pageName) {
-		// TODO make trash
-		try {
-			Node pageNode = manager.getNode(getPagePath(pageName));
-
-			try {
-				pageNode.delete();
-			} catch (DeleteException e) {
-				log.error(e);
-				return false;
-			}
-
-			return true;
-		} catch (ResourceDoesNotExist e) {
-			log.error(e);
-			return false;
-		}
-	}
-
-	public void setWikiEngine(WikiEngine wikiEngine) {
-		this.wikiEngine = wikiEngine;
-		
-		if (langCode == null) {
-			langCode = ConfigurationParser.getDefaultLangugeCode();
-		}
-	}
-
-	public void saveRolesSet(String uid, Set<String> roles, int action)
-			throws DataSourceException {
-
-		Node pageNode = null;
-
-		try {
-			pageNode = manager.getNode(getPagePath(uid));
-		} catch (ResourceDoesNotExist e) {
-			throw new DataSourceException(e);
-		}
-
-		String prefix = (action == VIEWABLE) ? ROLE_PREFIX_VIEWABLE
-				: ROLE_PREFIX_EDITABLE;
-
-		clearProps(prefix, pageNode);
-
-		int i = 0;
-
-		for (String role : roles) {
-			pageNode.setProperty(prefix + i, role);
-		}
-
-		try {
-			pageNode.save("Saving roles set for page " + uid);
-		} catch (SaveException e) {
-			log.error(e);
-		}
-
-	}
-
-	private void clearProps(String prefix, Node pageNode) {
-		Map<String, String> props = pageNode.getProperties();
-
-		for (String key : props.keySet()) {
-			if (key.startsWith(prefix)) {
-				pageNode.deleteProperty(key);
-				log.info("Removed prop: " + key);
-			}
-		}
-	}
-
-	public void saveMetadataProps(String uid, Properties props) {
-		try {
-			Node pageNode = manager.getNode(getPagePath(uid));
-
-			clearProps(PROPS_PREFIX, pageNode);
-
-			for (Object key : props.keySet()) {
-				pageNode.setProperty(PROPS_PREFIX + key, props
-						.getProperty((String) key));
-				log.info("added prop: " + key);
-			}
-
-			pageNode.save("Saving metaProps for page: " + uid);
-
-			log.info("props set for: " + manager.getPrefix()+ " " +pageNode.getFullName());
-
-		} catch (ResourceDoesNotExist e) {
-			log.error(e);
-			return;
-		} catch (SaveException e) {
-			log.error(e);
-		}
-	}
-
-public Properties getMetadataProps(String uid) {
-		try {
-			Node pageNode = manager.getNode(getPagePath(uid));
-
-			Properties retProps = new Properties();
-
-			Map<String, String> props = pageNode.getProperties();
-
-			// get all properties starting with PROPS_PREFIX (those are meta
-			// props for page)
-			for (String key : props.keySet()) {
-				if (key.startsWith(PROPS_PREFIX)) {
-					retProps.setProperty(key.substring(PROPS_PREFIX.length()),
-							props.get(key));
-				}
-			}
-
-			return retProps;
-		} catch (ResourceDoesNotExist e) {
-			log.error(e);
-			return null;
-		}
-	}	public void setLanguageCode(String langCode) {
-		manager = ContentManager.getContentManager(getPathToMedia() + "/"
-				+ LANG_DIR + "/" + langCode);
-
-		this.langCode = langCode;
-
-		log.info("Lang code set: " + langCode + " path is: "
-				+ manager.getPrefix());
-	}
-
-	public Map<String, String> getAvailableLanguages() {
-		Map<String, String> map = new TreeMap<String, String>();
-
-		map.put(ConfigurationParser.getDefaultLangugeCode(), wikiEngine.getAllLanguageCodes()
-				.get(ConfigurationParser.getDefaultLangugeCode()));
-
-		try {
-			Directory dir = getBaseManager().getDirectory(LANG_DIR);
-
-			List<Directory> dirList = dir.getDirectories();
-
-			for (Directory inDir : dirList) {
-				if (wikiEngine.getAllLanguageCodes().get(inDir.getName()) != null) {
-					map.put(inDir.getName(), wikiEngine.getAllLanguageCodes()
-							.get(inDir.getName()));
-				}
-			}
-		} catch (ResourceDoesNotExist e) {
-			// no other langs then default
-		}
-
-		return map;
-	}
-
-	private ContentManager getBaseManager() {
-		return ContentManager.getContentManager(getPathToMedia());
-	}
-
-	public void addLangCode(String langCode, String langDesc) {
-		ContentManager baseMngr = ContentManager
-				.getContentManager(getPathToMedia());
-
-		List<Resource> newDirs = new ArrayList<Resource>();
-
-		try {
-			baseMngr.getDirectory(LANG_DIR + "/" + langCode);
-		} catch (ResourceDoesNotExist e) {
-			try {
-				newDirs.add(baseMngr.getRootDirectory().newDirectory(
-						LANG_DIR + "/" + langCode));
-			} catch (ResourceAlreadyExists e1) {
-				// wont happen
-				log.error(e1);
-			} catch (NameFormatException e1) {
-				log.error(e1);
-				return;
-			}
-		}
-
-		if (newDirs.size() > 0) {
-			try {
-				manager.save("Adding new language: " + langCode, newDirs);
-			} catch (SaveException e) {
-				log.error(e);
-				return;
-			}
-		}
-
-	}
-
-	public String getLangCode() {
-		return langCode;
-	}
-
-	class PageChangeWatcher extends ShotokuResourceWatcher<String, String> {
-
-		private String keyBase;
-
-		public PageChangeWatcher(String keyBase) {
-			super();
-			this.keyBase = keyBase;
-		}
-
-		protected ValueChange<String> update(String key, String currentObject, Map changes) {
-			wikiEngine.refreshPage(keyBase.substring(getLangCode().length(),
-					keyBase.length() - ("/" + NODE_NAME).length()),
-					getLangCode());
-			
-			return ValueChange.noChange();
-		}
-
-		public ValueInit<String> init(String key) {
-			addWatchedPath(key, keyBase.substring(getLangCode().length()));
-
-			return ValueInit.realValue("not changed");
-		}
-
-		protected ContentManager initContentManager(String key) {
-			return manager;
-		}
-
-	}
-
-	public void setGlobalProperty(String key, String value) throws DataSourceException {
-		// TODO Auto-generated method stub
-		
-	}
-
-	public String getGlobalProperty(String key) throws DataSourceException {
-		// TODO Auto-generated method stub
-		return null;
-	}
-}

Deleted: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuWikiPageDictionary.java
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuWikiPageDictionary.java	2008-10-07 13:00:21 UTC (rev 23347)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuWikiPageDictionary.java	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,275 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wiki;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.log4j.Logger;
-import org.jboss.shotoku.ContentManager;
-import org.jboss.shotoku.Directory;
-import org.jboss.shotoku.exceptions.NameFormatException;
-import org.jboss.shotoku.exceptions.ResourceAlreadyExists;
-import org.jboss.shotoku.exceptions.ResourceDoesNotExist;
-import org.jboss.shotoku.exceptions.SaveException;
-import org.jboss.wiki.configuration.ConfigurationParser;
-import org.jboss.wiki.exceptions.PageRenamingException;
-
-public class ShotokuWikiPageDictionary implements WikiPageDictionary {
-
-	private static final String WIKI_DICT_PREFIX = "ShotokuDataSource:wikiDict";
-
-	private static final String PROP_FILE = "shotokudatasource.properties";
-
-	private Directory dictDir;
-
-	private Logger log = Logger.getLogger(this.getClass());
-
-	private Map<String, String> uidToReal;
-
-	private Map<String, String> realToUid;
-
-	// private DictChangeWatcher dictChange;
-
-	private WikiEngine wikiEngine;
-
-	private String langCode;
-
-	private Long lastLangModDate = null;
-
-	// wikipage dictionary
-
-	public ShotokuWikiPageDictionary() {
-		ContentManager manager = ContentManager
-				.getContentManager(getPathToMedia());
-
-		try {
-			dictDir = manager.getDirectory(ShotokuMediaDataSource.LANG_DIR);
-		} catch (ResourceDoesNotExist e) {
-			try {
-				dictDir = manager.getRootDirectory().newDirectory(
-						ShotokuMediaDataSource.LANG_DIR);
-			} catch (ResourceAlreadyExists e1) {
-				// shoudln't happen
-				log.error(e);
-			} catch (NameFormatException e1) {
-				log.error(e);
-			}
-		}
-
-		uidToReal = new HashMap<String, String>();
-		realToUid = new HashMap<String, String>();
-
-		loadDictionary();
-
-	}
-
-	private String getPathToMedia() {
-		// load paths
-		InputStream is = ShotokuMediaDataSource.class
-				.getResourceAsStream(PROP_FILE);
-
-		Properties props = new Properties();
-
-		try {
-			props.load(is);
-		} catch (IOException e) {
-			log.error(e);
-		} finally {
-			try {
-				is.close();
-			} catch (IOException e) {
-				log.error(e);
-			}
-		}
-
-		return props.getProperty("pathToMedia");
-	}
-
-	public String getRealName(String uid) {
-		loadDictionary();
-
-		return (uidToReal.get(uid) != null) ? uidToReal.get(uid) : uid;
-	}
-
-	public String getUid(String realName) {
-		loadDictionary();
-
-		return (realToUid.get(realName) != null) ? realToUid.get(realName)
-				: realName;
-	}
-
-	public void rename(String uid, String newName) throws PageRenamingException {
-		loadDictionary();
-
-		synchronized (this) {
-			if (uidInDictionary(uid)) {
-				realToUid.remove(uidToReal.get(uid));
-				uidToReal.remove(uid);
-			}
-
-			realToUid.put(newName, uid);
-			uidToReal.put(uid, newName);
-
-			try {
-				saveDictionary();
-			} catch (SaveException e) {
-				throw new PageRenamingException(e);
-			}
-		}
-	}
-
-	private void saveDictionary() throws SaveException {
-		removeDictionary();
-
-		for (String key : uidToReal.keySet()) {
-			dictDir.setProperty(WIKI_DICT_PREFIX + key, uidToReal.get(key));
-		}
-
-		dictDir.save("New dictionary for language: " + dictDir.getName());
-	}
-
-	private void removeDictionary() {
-		Map<String, String> props = dictDir.getProperties();
-
-		// remove all props
-		for (String key : props.keySet()) {
-			if (key.startsWith(WIKI_DICT_PREFIX)) {
-				dictDir.deleteProperty(key);
-			}
-		}
-	}
-
-	public boolean uidInDictionary(String uid) {
-		loadDictionary();
-
-		return uidToReal.containsKey(uid);
-	}
-
-	public boolean realNameInDictionary(String realName) {
-		loadDictionary();
-
-		return realToUid.containsKey(realName);
-	}
-
-	public void removeDictForPage(String uid) throws PageRenamingException {
-		loadDictionary();
-
-		synchronized (this) {
-			realToUid.remove(uidToReal.get(uid));
-			uidToReal.remove(uid);
-
-			try {
-				saveDictionary();
-			} catch (SaveException e) {
-				throw new PageRenamingException(e);
-			}
-		}
-	}
-
-	public void setWikiEngine(WikiEngine wikiEngine) {
-		this.wikiEngine = wikiEngine;
-
-		if (langCode == null) {
-			langCode = ConfigurationParser.getDefaultLangugeCode();
-		}
-	}
-
-	public void setLanguageCode(String langCode) {
-		// TODO ShotokuCache.remove(dictDir.getFullName());
-
-		ContentManager manager = ContentManager
-				.getContentManager(getPathToMedia());
-
-		try {
-			dictDir = manager.getDirectory(ShotokuMediaDataSource.LANG_DIR
-					+ "/" + langCode);
-		} catch (ResourceDoesNotExist e) {
-			// something's wrong
-			log.error(e);
-		}
-
-		// make lastLangModDate null - this will force reloading dictionary
-		lastLangModDate = null;
-
-		loadDictionary();
-
-		/*
-		 * dictChange = new DictChangeWatcher(dictDir.getFullName());
-		 * 
-		 * dictChange.get(dictDir.getFullName());
-		 */
-
-		this.langCode = langCode;
-	}
-
-	private void loadDictionary() {
-		// reload dictionary if it's executed for first time (lastLangModDate is
-		// null) or dicLang have changed
-		if (lastLangModDate == null
-				|| dictDir.getLastModification() != lastLangModDate) {
-			synchronized (this) {
-				Map<String, String> props = dictDir.getProperties();
-
-				// load all mapings and build 2 maps
-				for (String key : props.keySet()) {
-					if (key.startsWith(WIKI_DICT_PREFIX)) {
-						String uid = key.substring(WIKI_DICT_PREFIX.length());
-						String real = props.get(key);
-
-						realToUid.put(real, uid);
-						uidToReal.put(uid, real);
-					}
-				}
-			}
-		}
-	}
-
-	public Map<String, String> getRenameMapings() {
-		loadDictionary();
-
-		return new HashMap<String, String>(uidToReal);
-	}
-
-	/*
-	 * class DictChangeWatcher extends ShotokuResourceWatcher<String, String> {
-	 * 
-	 * private String keyBase;
-	 * 
-	 * public DictChangeWatcher(String keyBase) { super(); this.keyBase =
-	 * keyBase; }
-	 * 
-	 * protected void update(String key, String currentObject, Map changes) {
-	 * loadDictionary(); }
-	 * 
-	 * public String init(String key) { addWatchedPath(key, keyBase);
-	 * 
-	 * return "not changed"; }
-	 * 
-	 * protected ContentManager initContentManager(String key) { return
-	 * ContentManager.getContentManager(getPathToMedia()); } }
-	 */
-
-}

Copied: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration (from rev 21907, labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration)

Copied: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org (from rev 21907, labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org)

Copied: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss (from rev 21907, labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss)

Copied: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs (from rev 21907, labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs)

Copied: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace (from rev 21907, labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace)

Deleted: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigration.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigration.java	2008-08-26 11:36:55 UTC (rev 21907)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigration.java	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,698 +0,0 @@
-package org.jboss.labs.clearspace;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.TreeSet;
-
-import javax.activation.MimetypesFileTypeMap;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.ws.soap.SOAPFaultException;
-
-import org.acegisecurity.providers.AuthenticationProvider;
-import org.jboss.wiki.WikiAttachment;
-import org.jboss.wiki.WikiEngine;
-import org.jboss.wiki.WikiPage;
-import org.jboss.wiki.configuration.ConfigurationParser;
-import org.pdfbox.examples.fdf.PrintFields;
-import org.w3c.dom.Text;
-
-import com.jivesoftware.base.UnauthorizedException;
-import com.jivesoftware.base.User;
-import com.jivesoftware.base.UserAlreadyExistsException;
-import com.jivesoftware.base.UserManager;
-import com.jivesoftware.base.UserNotFoundException;
-import com.jivesoftware.base.UserTemplate;
-import com.jivesoftware.base.wiki.WikiContentHelper;
-import com.jivesoftware.community.AttachmentException;
-import com.jivesoftware.community.AttachmentManager;
-import com.jivesoftware.community.Community;
-import com.jivesoftware.community.CommunityManager;
-import com.jivesoftware.community.CommunityNotFoundException;
-import com.jivesoftware.community.Document;
-import com.jivesoftware.community.DocumentAlreadyExistsException;
-import com.jivesoftware.community.DocumentManager;
-import com.jivesoftware.community.DocumentObjectNotFoundException;
-import com.jivesoftware.community.DocumentState;
-import com.jivesoftware.community.DocumentTypeManager;
-import com.jivesoftware.community.DuplicateIDException;
-import com.jivesoftware.community.JiveIterator;
-import com.jivesoftware.community.RejectedException;
-import com.jivesoftware.community.renderer.impl.v2.JAXPUtils;
-import com.jivesoftware.community.util.WikiUtils;
-
-public class CSMigration {
-
-	private static final String CS_HREF = "http://localhost:8080";
-	private static final String COMM_NAME = "JBossWiki";
-	private User unknownUser;
-	private Map<String, User> users;
-
-	private MimetypesFileTypeMap mimeTypes;
-
-	private UserManager userManager;
-	private DocumentManager documentManager;
-	private CommunityManager communityManager;
-	private DocumentTypeManager documentTypeManager;
-	private AttachmentManager attachmentManager;
-
-	private String dbNukesUserName = "portal";
-	private String dbNukesPass = "portalpassword";
-	private String dbNukesUrl = "jdbc:mysql://localhost:3306/nukes3";
-
-	private Map<String, String> pageDictionary;
-	private Map<String, String> pageDictionaryRev;
-	private Community jbossWikiCom;
-	private WikiEngine we;
-	private Set<String> pages;
-
-	private final static Map parameters = new HashMap();
-	private User adminUser;
-	private JSP2CSMarkupTranslator translator = new JSP2CSMarkupTranslator();
-	private FileWriter sqlScript;
-	private FileWriter log;
-	private String pagesToTranslateRegexp;
-
-	public CSMigration() {
-
-	}
-
-	private void init() throws CommunityNotFoundException,
-			UserNotFoundException {
-		we = new WikiEngine();
-		pages = we.getAllPageNames(ConfigurationParser.getDefaultLangugeCode());
-		pageDictionary = new HashMap<String, String>();
-		pageDictionaryRev = new HashMap<String, String>();
-		adminUser = userManager.getUser("admin");
-
-		JiveIterator<Community> communities = communityManager
-				.getCommunities(communityManager.getRootCommunity());
-
-		jbossWikiCom = null;
-		for (Community community : communities) {
-			if (community.getName().equals(COMM_NAME)) {
-				System.out.println("Found community: "
-						+ community.getDisplayName());
-				communityManager.deleteCommunity(community);
-				System.out.println("Community deleted");
-			}
-		}
-
-		if (jbossWikiCom == null) {
-			jbossWikiCom = communityManager.createCommunity(communityManager
-					.getRootCommunity(), COMM_NAME, COMM_NAME,
-					"JBoss Wiki migration");
-			System.out.println("Community JBossWiki created");
-		}
-		mimeTypes = new MimetypesFileTypeMap(CSMigration.class
-				.getResourceAsStream("/org/jboss/wiki/fileaccess/mime.types"));
-
-		try {
-			unknownUser = userManager.getUser("unknown");
-		} catch (UserNotFoundException e) {
-			try {
-				UserTemplate ut = new UserTemplate("unknown");
-				ut.setPassword("Un4N0w&");
-				ut.setEmail("unknown at nowhere.org");
-
-				ut.setFederated(true);
-
-				userManager.createApplicationUser(ut);
-
-				System.out.println("User unknown added");
-
-				unknownUser = userManager.getUser("unknown");
-			} catch (UserAlreadyExistsException e1) {
-				// not going to happen
-			}
-		}
-
-	}
-
-	private void importAllPages(Set<String> toTransform) throws IOException {
-		// prepare dictionary
-		Set<String> removePages = new HashSet<String>();
-		log.write("\nAll pages import START\n");
-		for (String pageName : toTransform) {
-			try {
-				Document wsd = documentManager.createDocument(adminUser,
-						documentTypeManager.getDefaultDocumentType(), null,
-						pageName, "");
-
-				WikiPage page = we.getByName(pageName, null, 1,
-						ConfigurationParser.getDefaultLangugeCode());
-
-				String content = "Page " + pageName
-						+ " imported by JSP to CS migration";
-
-				org.w3c.dom.Document body = WikiContentHelper
-						.wikiToJiveDocument(content);
-
-				wsd.setBody(body);
-
-				wsd.setDocumentState(DocumentState.PUBLISHED);
-				wsd.save();
-
-				documentManager.addDocument(jbossWikiCom, wsd, parameters);
-
-				pageDictionary.put(pageName, wsd.getDocumentID());
-				pageDictionaryRev.put(wsd.getDocumentID(), pageName);
-				System.out.println("Added page: " + pageName + "  as "
-						+ wsd.getDocumentID());
-			} catch (DocumentAlreadyExistsException e) {
-				log.write("Couldnt add page: " + pageName
-						+ " - DocumentAlreadyExistsException\n");
-				e.printStackTrace();
-			} catch (SOAPFaultException e) {
-				e.printStackTrace();
-				System.out.println("Error while processing page: " + pageName);
-
-			} catch (DuplicateIDException e) {
-				log.write("Couldnt add page : " + pageName
-						+ " - duplicate id\n");
-				e.printStackTrace();
-			} catch (RejectedException e) {
-				log.write("Couldnt add page: " + pageName + " - Rejected\n");
-				e.printStackTrace();
-			} catch (NullPointerException e) {
-				// ignore - page coudln't be open
-				log.write("Page couldn't be open: " + pageName + "\n");
-				log.write(e.toString());
-				removePages.add(pageName);
-			}
-		}
-
-		// remove wrong pages
-		toTransform.removeAll(removePages);
-		log.write("\nAll pages import END\n");
-	}
-
-	private void importAttachments(Set<String> toTransform) throws IOException {
-		log.write("\nAttachment import START\n");
-		for (String pageName : toTransform) {
-
-			WikiPage page = we.getByName(pageName, null, ConfigurationParser
-					.getDefaultLangugeCode());
-			try {
-				Document original = documentManager.getDocument(pageDictionary
-						.get(pageName));
-
-				// add attachments
-
-				Set<String> atts = we.getAttachmentsSet(page,
-						ConfigurationParser.getDefaultLangugeCode());
-
-				if (atts != null)
-					for (String att : atts) {
-						try {
-							WikiAttachment wa = we.getAttachment(
-									page.getName(), att, ConfigurationParser
-											.getDefaultLangugeCode());
-
-							attachmentManager.createAttachment(original, att,
-									mimeTypes.getContentType(att), wa
-											.getInputStream(), null);
-
-							wa.getInputStream().close();
-							original.setMinorEdit(true);
-							original.save();
-
-							long creation = wa.getDate().getTime();
-							User user = getUser(wa.getUser());
-
-							String sql = "UPDATE jiveDocVersion j SET modificationDate='"
-									+ creation
-									+ "', userID='"
-									+ user.getID()
-									+ "' WHERE j.internalDocID='"
-									+ original.getID()
-									+ "' and j.versionID='"
-									+ (original.getVersionManager()
-											.getDocumentVersionCount()) + "';";
-							// System.out.println("SQL: " + sql);
-
-							sqlScript.write(sql + "\n");
-
-							System.out.println("Attachment " + att
-									+ " added for " + page.getName());
-						} catch (AttachmentException e) {
-							System.err
-									.println("Problem with adding attachment "
-											+ att + " for page " + pageName);
-							log.write("Problem with adding attachment " + att
-									+ " for page " + pageName + "\n");
-							e.printStackTrace();
-						} catch (NullPointerException e) {
-							// ignore - page coudln't be open
-							log.write("Problem with adding attachment " + att
-									+ " for page " + pageName + "\n");
-							log.write(e.toString());
-						}
-					}
-			} catch (DocumentObjectNotFoundException e) {
-				log.write("Problem with migrating attachments for page "
-						+ pageName + " DocumentObjectNotFound\n");
-				e.printStackTrace();
-			} catch (UnauthorizedException e) {
-				log.write("Problem with migrating attachments for page "
-						+ pageName + " Unuthorized\n");
-				e.printStackTrace();
-			}
-		}
-		log.write("\nAttachment import END\n");
-	}
-
-	private void importVersions(Set<String> toTransform) throws IOException {
-		// Connection c = getCSConnection();
-		log.write("\nVersion import START\n");
-		try {
-			for (String pageName : toTransform) {
-				try {
-					WikiPage page = we.getByName(pageName, null,
-							ConfigurationParser.getDefaultLangugeCode());
-
-					Document original = documentManager
-							.getDocument(pageDictionary.get(pageName));
-
-					// add versions
-					for (int ver = 1; ver <= page.getLastVersion(); ver++) {
-						Date startWhole = new Date();
-
-						WikiPage pageVer = we.getByName(pageName, null, ver,
-								ConfigurationParser.getDefaultLangugeCode());
-
-						double wikiGetTime = ((double) (new Date().getTime() - startWhole
-								.getTime()) / 1000);
-
-						Date start = new Date();
-
-						String content = translator.parse(pageName, pageVer
-								.getContent(), pageDictionary,
-								pageDictionaryRev, log);
-
-						double parsingTime = ((double) (new Date().getTime() - start
-								.getTime()) / 1000);
-
-						start = new Date();
-
-						org.w3c.dom.Document body = WikiContentHelper
-								.wikiToJiveDocument(content);
-
-						double innerParsingTime = ((double) (new Date()
-								.getTime() - start.getTime()) / 1000);
-
-						Date startDocSet = new Date();
-						start = new Date();
-						
-						JAXPUtils.toXmlString(body);
-						
-						double convertXml = ((double) (new Date()
-						.getTime() - start.getTime()) / 1000);
-						start = new Date();
-						
-						original.setBody(body);
-						
-						double setBody = ((double) (new Date()
-						.getTime() - start.getTime()) / 1000);
-						start = new Date();
-						
-						original.setCreationDate(pageVer.getEditDate());
-						
-						double setDate = ((double) (new Date()
-						.getTime() - start.getTime()) / 1000);
-						start = new Date();
-						
-						original.setModificationDate(pageVer.getEditDate());
-
-						double setModDate = ((double) (new Date()
-						.getTime() - start.getTime()) / 1000);
-						start = new Date();
-						
-						User user = getUser(pageVer.getLastAuthor().getName());
-
-						double getUser = ((double) (new Date()
-						.getTime() - start.getTime()) / 1000);
-						start = new Date();
-						
-						if (user == null) {
-							System.err.println("User "
-									+ pageVer.getLastAuthor().getName()
-									+ " null !");
-							user = unknownUser;
-						}
-
-						original.setUser(user);
-
-						double setUser = ((double) (new Date()
-						.getTime() - start.getTime()) / 1000);
-						start = new Date();
-						
-						// original.addAuthor(user);
-						original.setMinorEdit(true);
-
-						double docSetTime = ((double) (new Date().getTime() - startDocSet
-								.getTime()) / 1000);
-
-						start = new Date();
-
-						original.save();
-
-						long creation = pageVer.getEditDate().getTime();
-
-						// update user and last modification date
-
-						String sql = "UPDATE jiveDocVersion j SET modificationDate='"
-								+ creation
-								+ "', userID='"
-								+ user.getID()
-								+ "' WHERE j.internalDocID='"
-								+ original.getID()
-								+ "' and j.versionID='"
-								+ (original.getVersionManager()
-										.getDocumentVersionCount()) + "';";
-						// System.out.println("SQL: " + sql);
-
-						if (ver == 1) {
-							// update also frist version by clearspace
-							sqlScript
-									.write("UPDATE jiveDocVersion j SET modificationDate='"
-											+ creation
-											+ "', userID='"
-											+ user.getID()
-											+ "' WHERE j.internalDocID='"
-											+ original.getID()
-											+ "' and j.versionID='"
-											+ (ver)
-											+ "';\n");
-						}
-
-						sqlScript.write(sql + "\n");
-
-						double savingTime = ((double) (new Date().getTime() - start
-								.getTime()) / 1000);
-
-						// c.createStatement().execute(sql);
-
-						start = new Date();
-
-						original = documentManager.getDocument(original
-								.getDocumentID());
-
-						double gettingTime = ((double) (new Date().getTime() - start
-								.getTime()) / 1000);
-
-						if (innerParsingTime > 20) {
-							// long parsing
-							log
-									.write("Long parsing:=========================================\n"
-											+ content
-											+ "\n=========================================\n\n");
-						}
-
-						double wholeTime = ((double) (new Date().getTime() - startWhole
-								.getTime()) / 1000);
-
-						System.out
-								.println("Version "
-										+ ver
-										+ " updated for "
-										+ pageVer.getName()
-										+ String
-												.format(
-														"jive parsing took %.4f setBody %.4f setDate %.4f setModeDate %.4f getUser %.4f setUser %.4f docset %.4f convertxml %.4f",
-														innerParsingTime, setBody, setDate, setModDate, getUser, setUser,
-														docSetTime, convertXml));
-					}
-				} catch (NullPointerException e) {
-					// ignore - page coudln't be open
-					log.write("Problem with migrating versions for page "
-							+ pageName + "\n");
-					log.write(e.toString());
-				} catch (DocumentObjectNotFoundException e) {
-					log.write("Problem with migrating versions for page "
-							+ pageName + " DocumentObjectNotFound\n");
-					e.printStackTrace();
-				} catch (UnauthorizedException e) {
-					log.write("Problem with migrating versions for page "
-							+ pageName + " Unuthorized\n");
-					e.printStackTrace();
-				}
-			}
-		} catch (IOException e) {
-			e.printStackTrace();
-		} finally {
-			/*
-			 * if (c != null) { c.close(); }
-			 */
-		}
-		log.write("\nVersion import END\n");
-	}
-
-	/**
-	 * @param args
-	 * @throws Exception
-	 * @throws DocumentAlreadyExistsException
-	 */
-	public void migrate() throws Exception {
-
-		try {
-			Date start = new Date();
-
-			init();
-
-			Set<String> toTransform = new TreeSet<String>();
-
-			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HH-mm");
-
-			File fSqlScript = new File("versions_and_users-"
-					+ sdf.format(start) + ".sql");
-
-			sqlScript = new FileWriter(fSqlScript);
-
-			log = new FileWriter(new File("log-" + sdf.format(start) + ".txt"));
-			for (String pageName : pages) {
-				if (pageName.matches(pagesToTranslateRegexp)) {
-					toTransform.add(pageName);
-				}
-			}
-
-			importAllPages(toTransform);
-
-			importAttachments(toTransform);
-
-			importVersions(toTransform);
-
-			Date end = new Date();
-
-			createMigrationInfoPage(start, end);
-
-			System.out
-					.println("Migration DONE ! Please stop clearspace and run script "
-							+ fSqlScript.getAbsolutePath());
-		} finally {
-			sqlScript.close();
-			log.close();
-		}
-	}
-
-	private void createMigrationInfoPage(Date start, Date end)
-			throws DuplicateIDException, UnauthorizedException,
-			DocumentAlreadyExistsException, RejectedException {
-		// save dictionary
-		Properties p = new Properties();
-		p.putAll(pageDictionary);
-		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HH-mm");
-
-		try {
-			p.store(new FileOutputStream("pages-" + sdf.format(start)
-					+ ".properties"), "migration from " + end.toString());
-		} catch (FileNotFoundException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		} catch (IOException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-		StringBuffer migration = new StringBuffer();
-
-		migration.append("h3. Migration from JSPWiki to Clearspace\n").append(
-				"Started on ").append(start.toString())
-				.append(" and ended on ").append(end.toString()).append(
-						" taking ").append(
-						(end.getTime() - start.getTime()) / 1000).append(
-						" seconds\n\n").append("h3. List of pages\n").append(
-						"||Original||Clearspace ID||\n");
-
-		for (String key : pageDictionary.keySet()) {
-			migration.append("|").append(key).append("|").append(
-					pageDictionary.get(key)).append("|\n");
-		}
-
-		migration.append("\n\n");
-
-		Document d = documentManager.createDocument(adminUser,
-				documentTypeManager.getDefaultDocumentType(), null,
-				"JSPWikiToClearspaceMigrationDetails", migration.toString());
-		d.setDocumentState(DocumentState.PUBLISHED);
-		d.setBody(WikiContentHelper.wikiToJiveDocument(migration.toString()));
-		d.save();
-
-		documentManager.addDocument(jbossWikiCom, d, parameters);
-
-		System.out.println("Page JSPWikiToClearspaceMigrationDetails added as "
-				+ d.getDocumentID());
-
-	}
-
-	private User getUser(String userName) {
-		if (users == null) {
-			users = new HashMap<String, User>();
-		}
-
-		// maybe we know it already
-		if (users.containsKey(userName)) {
-			return users.get(userName);
-		}
-
-		User user = null;
-		Connection c = null;
-
-		// try to get from clearspace
-		try {
-			user = userManager.getUser(userName);
-		} catch (UserNotFoundException e) {
-			// there's no user - try to migrate it
-			try {
-				c = getNukesConnection();
-				ResultSet rs = c.createStatement().executeQuery(
-						"SELECT * FROM nuke_users WHERE pn_uname='" + userName
-								+ "';");
-				if (rs.next()) {
-					LabsUser nukeUser = new LabsUser(rs);
-
-					try {
-						UserTemplate ut = new UserTemplate(userName);
-						ut.setFederated(true);
-
-						ut = mapDetails(ut, nukeUser);
-						userManager.createApplicationUser(ut);
-
-						user = userManager.getUser(userName);
-						users.put(userName, user);
-
-						return user;
-					} catch (Exception ex) {
-						// TODO Auto-generated catch block
-						e.printStackTrace();
-					}
-				} else {
-					users.put(userName, unknownUser);
-					return unknownUser;
-				}
-			} catch (SQLException e1) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			} catch (Exception e1) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-		} finally {
-			if (c != null) {
-				try {
-					c.close();
-				} catch (SQLException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				}
-			}
-		}
-
-		users.put(userName, user);
-
-		return user;
-	}
-
-	private UserTemplate mapDetails(UserTemplate ut, LabsUser nukeUser) {
-		ut.setEmail(nukeUser.getEmail());
-		ut.setName(nukeUser.getName());
-		ut.setPasswordHash(nukeUser.getPasswordHash());
-
-		return ut;
-	}
-
-	private Connection getNukesConnection() throws Exception {
-		Class.forName("com.mysql.jdbc.Driver").newInstance();
-		return DriverManager.getConnection(dbNukesUrl, dbNukesUserName,
-				dbNukesPass);
-	}
-
-	public void setUserManager(UserManager userManager) {
-		this.userManager = userManager;
-		checkIfCanStart();
-	}
-
-	public void setDocumentManager(DocumentManager documentManager) {
-		this.documentManager = documentManager;
-		checkIfCanStart();
-	}
-
-	public void setCommunityManager(CommunityManager communityManager) {
-		this.communityManager = communityManager;
-		checkIfCanStart();
-	}
-
-	public void setDocumentTypeManager(DocumentTypeManager documentTypeManager) {
-		this.documentTypeManager = documentTypeManager;
-		checkIfCanStart();
-	}
-
-	public void setAttachmentManager(AttachmentManager attachmentManager) {
-		this.attachmentManager = attachmentManager;
-		checkIfCanStart();
-	}
-
-	private void checkIfCanStart() {
-		/*
-		 * if (userManager != null && documentManager != null &&
-		 * communityManager != null && documentTypeManager != null &&
-		 * attachmentManager != null) { System.out.println("\n\nMigration
-		 * started"); try {
-		 * 
-		 * migrate(); } catch (Exception e) { // TODO Auto-generated catch block
-		 * e.printStackTrace(); } System.out.println("Migration finished\n\n"); }
-		 */
-	}
-
-	public void setDbNukesUserName(String dbNukesUserName) {
-		this.dbNukesUserName = dbNukesUserName;
-	}
-
-	public void setDbNukesPass(String dbNukesPass) {
-		this.dbNukesPass = dbNukesPass;
-	}
-
-	public void setDbNukesUrl(String dbNukesUrl) {
-		this.dbNukesUrl = dbNukesUrl;
-	}
-
-	public String getPagesToTranslateRegexp() {
-		return pagesToTranslateRegexp;
-	}
-
-	public void setPagesToTranslateRegexp(String pagesToTranslateRegexp) {
-		this.pagesToTranslateRegexp = pagesToTranslateRegexp;
-	}
-}

Copied: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigration.java (from rev 21907, labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigration.java)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigration.java	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigration.java	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,643 @@
+package org.jboss.labs.clearspace;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeSet;
+
+import javax.activation.MimetypesFileTypeMap;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import org.acegisecurity.providers.AuthenticationProvider;
+import org.jboss.wiki.WikiAttachment;
+import org.jboss.wiki.WikiEngine;
+import org.jboss.wiki.WikiPage;
+import org.jboss.wiki.configuration.ConfigurationParser;
+import org.pdfbox.examples.fdf.PrintFields;
+import org.w3c.dom.Text;
+
+import com.jivesoftware.base.UnauthorizedException;
+import com.jivesoftware.base.User;
+import com.jivesoftware.base.UserAlreadyExistsException;
+import com.jivesoftware.base.UserManager;
+import com.jivesoftware.base.UserNotFoundException;
+import com.jivesoftware.base.UserTemplate;
+import com.jivesoftware.base.wiki.WikiContentHelper;
+import com.jivesoftware.community.AttachmentException;
+import com.jivesoftware.community.AttachmentManager;
+import com.jivesoftware.community.Community;
+import com.jivesoftware.community.CommunityManager;
+import com.jivesoftware.community.CommunityNotFoundException;
+import com.jivesoftware.community.Document;
+import com.jivesoftware.community.DocumentAlreadyExistsException;
+import com.jivesoftware.community.DocumentManager;
+import com.jivesoftware.community.DocumentObjectNotFoundException;
+import com.jivesoftware.community.DocumentState;
+import com.jivesoftware.community.DocumentTypeManager;
+import com.jivesoftware.community.DuplicateIDException;
+import com.jivesoftware.community.JiveContentObject;
+import com.jivesoftware.community.JiveIterator;
+import com.jivesoftware.community.RejectedException;
+import com.jivesoftware.community.renderer.impl.v2.JAXPUtils;
+import com.jivesoftware.community.util.WikiUtils;
+
+public class CSMigration {
+
+	private static final String UNKNOWN_USER = "unknownMigrationUser";
+	private static final String CS_HREF = "http://localhost:8080";
+	private static final String COMM_NAME = "wiki";
+	private User unknownUser;
+	private Map<String, User> users;
+
+	private MimetypesFileTypeMap mimeTypes;
+
+	private UserManager userManager;
+	private DocumentManager documentManager;
+	private CommunityManager communityManager;
+	private DocumentTypeManager documentTypeManager;
+	private AttachmentManager attachmentManager;
+
+	private Map<String, String> pageDictionary;
+	private Map<String, String> pageDictionaryRev;
+	private Community jbossWikiCom;
+	private WikiEngine we;
+	private Set<String> pages;
+
+	private final static Map parameters = new HashMap();
+	private User adminUser;
+	// private JSP2CSMarkupTranslator translator = new JSP2CSMarkupTranslator();
+	private JSP2CSMarkupWikiTranslator translator = new JSP2CSMarkupWikiTranslator();
+	private FileWriter sqlScript;
+	private FileWriter log;
+	private String pagesToTranslateRegexp;
+
+	private UserImporter userImporter;
+
+	public CSMigration() {
+
+	}
+
+	private void init() throws CommunityNotFoundException,
+			UserNotFoundException {
+		we = new WikiEngine();
+		pages = we.getAllPageNames(ConfigurationParser.getDefaultLangugeCode());
+		pageDictionary = new HashMap<String, String>();
+		pageDictionaryRev = new HashMap<String, String>();
+		adminUser = userManager.getUser("admin");
+
+		JiveIterator<Community> communities = communityManager
+				.getCommunities(communityManager.getRootCommunity());
+
+		jbossWikiCom = null;
+		for (Community community : communities) {
+			if (community.getName().equals(COMM_NAME)) {
+				System.out.println("Found community: "
+						+ community.getDisplayName());
+				communityManager.deleteCommunity(community);
+				System.out.println("Community deleted");
+			}
+		}
+
+		if (jbossWikiCom == null) {
+			jbossWikiCom = communityManager.createCommunity(communityManager
+					.getRootCommunity(), COMM_NAME, COMM_NAME,
+					"JBoss Wiki migration");
+			System.out.println("Community JBossWiki created");
+		}
+		mimeTypes = new MimetypesFileTypeMap(CSMigration.class
+				.getResourceAsStream("/org/jboss/wiki/fileaccess/mime.types"));
+
+		try {
+			unknownUser = userManager.getUser(UNKNOWN_USER);
+		} catch (UserNotFoundException e) {
+			try {
+				UserTemplate ut = new UserTemplate(UNKNOWN_USER);
+				ut.setPassword("Un4N0w&");
+				ut.setEmail("unknown at nowhere.org");
+
+				ut.setFederated(true);
+
+				userManager.createApplicationUser(ut);
+
+				System.out.println("User unknown added");
+
+				unknownUser = userManager.getUser(UNKNOWN_USER);
+			} catch (UserAlreadyExistsException e1) {
+				// not going to happen
+			}
+		}
+
+	}
+
+	private void importAllPages(Set<String> toTransform) throws IOException {
+		// prepare dictionary
+		Set<String> removePages = new HashSet<String>();
+		log.write("\nAll pages import START\n");
+		for (String pageName : toTransform) {
+			try {
+				Document wsd = documentManager.createDocument(adminUser,
+						documentTypeManager.getDefaultDocumentType(), null,
+						pageName, "");
+
+				WikiPage page = we.getByName(pageName, null, 1,
+						ConfigurationParser.getDefaultLangugeCode());
+
+				String content = "Page " + pageName
+						+ " imported by JSP to CS migration";
+
+				org.w3c.dom.Document body = WikiContentHelper
+						.wikiToJiveDocument(content);
+
+				wsd.setBody(body);
+
+				wsd.setUser(getUser(page.getLastAuthor().getName()));
+
+				wsd.setDocumentState(DocumentState.PUBLISHED);
+				wsd.save();
+
+				documentManager.addDocument(jbossWikiCom, wsd, parameters);
+
+				pageDictionary.put(pageName, wsd.getDocumentID());
+				pageDictionaryRev.put(wsd.getDocumentID(), pageName);
+				System.out.println("Added page: " + pageName + "  as "
+						+ wsd.getDocumentID());
+			} catch (DocumentAlreadyExistsException e) {
+				log.write("Couldnt add page: " + pageName
+						+ " - DocumentAlreadyExistsException\n");
+				e.printStackTrace();
+			} catch (SOAPFaultException e) {
+				e.printStackTrace();
+				System.out.println("Error while processing page: " + pageName);
+
+			} catch (DuplicateIDException e) {
+				log.write("Couldnt add page : " + pageName
+						+ " - duplicate id\n");
+				e.printStackTrace();
+			} catch (RejectedException e) {
+				log.write("Couldnt add page: " + pageName + " - Rejected\n");
+				e.printStackTrace();
+			} catch (NullPointerException e) {
+				// ignore - page coudln't be open
+				log.write("Page couldn't be open: " + pageName + "\n");
+				log.write(e.toString());
+				removePages.add(pageName);
+			}
+		}
+
+		// remove wrong pages
+		toTransform.removeAll(removePages);
+		log.write("\nAll pages import END\n");
+	}
+
+	private void importAttachments(Set<String> toTransform) throws IOException {
+		log.write("\nAttachment import START\n");
+		for (String pageName : toTransform) {
+
+			WikiPage page = we.getByName(pageName, null, ConfigurationParser
+					.getDefaultLangugeCode());
+			try {
+				Document original = documentManager.getDocument(pageDictionary
+						.get(pageName));
+
+				// add attachments
+
+				Set<String> atts = we.getAttachmentsSet(page,
+						ConfigurationParser.getDefaultLangugeCode());
+
+				if (atts != null)
+					for (String att : atts) {
+						try {
+							WikiAttachment wa = we.getAttachment(
+									page.getName(), att, ConfigurationParser
+											.getDefaultLangugeCode());
+
+							attachmentManager.createAttachment(original, att,
+									mimeTypes.getContentType(att), wa
+											.getInputStream(), null);
+
+							wa.getInputStream().close();
+							original.setMinorEdit(true);
+							original.save();
+
+							long creation = wa.getDate().getTime();
+							User user = getUser(wa.getUser());
+
+							String sql = "UPDATE jiveDocVersion j SET modificationDate='"
+									+ creation
+									+ "', userID='"
+									+ user.getID()
+									+ "' WHERE j.internalDocID='"
+									+ original.getID()
+									+ "' and j.versionID='"
+									+ (original.getVersionManager()
+											.getDocumentVersionCount()) + "';";
+							// System.out.println("SQL: " + sql);
+
+							sqlScript.write(sql + "\n");
+
+							System.out.println("Attachment " + att
+									+ " added for " + page.getName());
+						} catch (AttachmentException e) {
+							System.err
+									.println("Problem with adding attachment "
+											+ att + " for page " + pageName);
+							log.write("Problem with adding attachment " + att
+									+ " for page " + pageName + "\n");
+							e.printStackTrace();
+						} catch (NullPointerException e) {
+							// ignore - page coudln't be open
+							log.write("Problem with adding attachment " + att
+									+ " for page " + pageName + "\n");
+							log.write(e.toString());
+						}
+					}
+			} catch (DocumentObjectNotFoundException e) {
+				log.write("Problem with migrating attachments for page "
+						+ pageName + " DocumentObjectNotFound\n");
+				e.printStackTrace();
+			} catch (UnauthorizedException e) {
+				log.write("Problem with migrating attachments for page "
+						+ pageName + " Unuthorized\n");
+				e.printStackTrace();
+			}
+		}
+		log.write("\nAttachment import END\n");
+	}
+
+	private void importVersions(Set<String> toTransform) throws IOException {
+		// Connection c = getCSConnection();
+		log.write("\nVersion import START\n");
+		try {
+			for (String pageName : toTransform) {
+				try {
+					WikiPage page = we.getByName(pageName, null,
+							ConfigurationParser.getDefaultLangugeCode());
+
+					Document original = documentManager
+							.getDocument(pageDictionary.get(pageName));
+
+					// add versions
+					for (int ver = 1; ver <= page.getLastVersion(); ver++) {
+						Date startWhole = new Date();
+
+						WikiPage pageVer = we.getByName(pageName, null, ver,
+								ConfigurationParser.getDefaultLangugeCode());
+
+						double wikiGetTime = ((double) (new Date().getTime() - startWhole
+								.getTime()) / 1000);
+
+						Date start = new Date();
+
+						String content = translator.parse(pageName, pageVer
+								.getContent(), pageDictionary,
+								pageDictionaryRev, log);
+
+						double parsingTime = ((double) (new Date().getTime() - start
+								.getTime()) / 1000);
+
+						start = new Date();
+
+						// org.w3c.dom.Document body =
+						// WikiContentHelper.editorHtmlToJiveDocument(content,
+						// original);
+						org.w3c.dom.Document body = WikiContentHelper
+								.wikiToJiveDocument(content);
+
+						double innerParsingTime = ((double) (new Date()
+								.getTime() - start.getTime()) / 1000);
+
+						Date startDocSet = new Date();
+						start = new Date();
+
+						JAXPUtils.toXmlString(body);
+
+						double convertXml = ((double) (new Date().getTime() - start
+								.getTime()) / 1000);
+						start = new Date();
+
+						original.setBody(body);
+
+						double setBody = ((double) (new Date().getTime() - start
+								.getTime()) / 1000);
+						start = new Date();
+
+						original.setCreationDate(pageVer.getEditDate());
+
+						double setDate = ((double) (new Date().getTime() - start
+								.getTime()) / 1000);
+						start = new Date();
+
+						original.setModificationDate(pageVer.getEditDate());
+
+						double setModDate = ((double) (new Date().getTime() - start
+								.getTime()) / 1000);
+						start = new Date();
+
+						User user = getUser(pageVer.getLastAuthor().getName());
+
+						double getUser = ((double) (new Date().getTime() - start
+								.getTime()) / 1000);
+						start = new Date();
+
+						if (user == null) {
+							System.err.println("User "
+									+ pageVer.getLastAuthor().getName()
+									+ " null !");
+							user = unknownUser;
+						}
+
+						original.setUser(user);
+
+						double setUser = ((double) (new Date().getTime() - start
+								.getTime()) / 1000);
+						start = new Date();
+
+						// original.addAuthor(user);
+						original.setMinorEdit(true);
+
+						double docSetTime = ((double) (new Date().getTime() - startDocSet
+								.getTime()) / 1000);
+
+						start = new Date();
+
+						original.save();
+
+						long creation = pageVer.getEditDate().getTime();
+
+						// update user and last modification date
+
+						String sql = "UPDATE jiveDocVersion j SET modificationDate='"
+								+ creation
+								+ "', userID='"
+								+ user.getID()
+								+ "' WHERE j.internalDocID='"
+								+ original.getID()
+								+ "' and j.versionID='"
+								+ (original.getVersionManager()
+										.getDocumentVersionCount()) + "';";
+						// System.out.println("SQL: " + sql);
+
+						if (ver == 1) {
+							// update also frist version by clearspace
+							sqlScript
+									.write("UPDATE jiveDocVersion j SET modificationDate='"
+											+ creation
+											+ "', userID='"
+											+ user.getID()
+											+ "' WHERE j.internalDocID='"
+											+ original.getID()
+											+ "' and j.versionID='"
+											+ (ver)
+											+ "';\n");
+						}
+
+						sqlScript.write(sql + "\n");
+
+						double savingTime = ((double) (new Date().getTime() - start
+								.getTime()) / 1000);
+
+						// c.createStatement().execute(sql);
+
+						start = new Date();
+
+						original = documentManager.getDocument(original
+								.getDocumentID());
+
+						double gettingTime = ((double) (new Date().getTime() - start
+								.getTime()) / 1000);
+
+						if (innerParsingTime > 20) {
+							// long parsing
+							log
+									.write("Long parsing:=========================================\n"
+											+ content
+											+ "\n=========================================\n\n");
+						}
+
+						double wholeTime = ((double) (new Date().getTime() - startWhole
+								.getTime()) / 1000);
+
+						System.out
+								.println("Version "
+										+ ver
+										+ " updated for "
+										+ pageVer.getName()
+										+ String
+												.format(
+														"jive parsing took %.4f setBody %.4f setDate %.4f setModeDate %.4f getUser %.4f setUser %.4f docset %.4f convertxml %.4f",
+														innerParsingTime,
+														setBody, setDate,
+														setModDate, getUser,
+														setUser, docSetTime,
+														convertXml));
+					}
+				} catch (NullPointerException e) {
+					// ignore - page coudln't be open
+					log.write("Problem with migrating versions for page "
+							+ pageName + "\n");
+					log.write(e.toString());
+				} catch (DocumentObjectNotFoundException e) {
+					log.write("Problem with migrating versions for page "
+							+ pageName + " DocumentObjectNotFound\n");
+					e.printStackTrace();
+				} catch (UnauthorizedException e) {
+					log.write("Problem with migrating versions for page "
+							+ pageName + " Unuthorized\n");
+					e.printStackTrace();
+				}
+			}
+		} catch (IOException e) {
+			e.printStackTrace();
+		} finally {
+			/*
+			 * if (c != null) { c.close(); }
+			 */
+		}
+		log.write("\nVersion import END\n");
+	}
+
+	/**
+	 * @param args
+	 * @throws Exception
+	 * @throws DocumentAlreadyExistsException
+	 */
+	public void migrate() throws Exception {
+
+		try {
+			Date start = new Date();
+
+			init();
+
+			Set<String> toTransform = new TreeSet<String>();
+
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HH-mm");
+
+			File fSqlScript = new File("versions_and_users-"
+					+ sdf.format(start) + ".sql");
+
+			sqlScript = new FileWriter(fSqlScript);
+
+			log = new FileWriter(new File("log-" + sdf.format(start) + ".txt"));
+			for (String pageName : pages) {
+				if (pageName.matches(pagesToTranslateRegexp)) {
+					toTransform.add(pageName);
+				}
+			}
+
+			importAllPages(toTransform);
+
+			importAttachments(toTransform);
+
+			importVersions(toTransform);
+
+			Date end = new Date();
+
+			createMigrationInfoPage(start, end);
+
+			System.out
+					.println("Migration DONE ! Please stop clearspace and run script "
+							+ fSqlScript.getAbsolutePath());
+		} catch (Exception e) {
+			e.printStackTrace();
+		} finally {
+
+			sqlScript.close();
+			log.close();
+		}
+	}
+
+	private void createMigrationInfoPage(Date start, Date end)
+			throws DuplicateIDException, UnauthorizedException,
+			DocumentAlreadyExistsException, RejectedException {
+		// save dictionary
+		Properties p = new Properties();
+		p.putAll(pageDictionary);
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HH-mm");
+
+		try {
+			p.store(new FileOutputStream("pages-" + sdf.format(start)
+					+ ".properties"), "migration from " + end.toString());
+		} catch (FileNotFoundException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		StringBuffer migration = new StringBuffer();
+
+		migration.append("h3. Migration from JSPWiki to Clearspace\n").append(
+				"Started on ").append(start.toString())
+				.append(" and ended on ").append(end.toString()).append(
+						" taking ").append(
+						(end.getTime() - start.getTime()) / 1000).append(
+						" seconds\n\n").append("h3. List of pages\n").append(
+						"||Original||Clearspace ID||\n");
+
+		for (String key : pageDictionary.keySet()) {
+			migration.append("|").append(key).append("|").append(
+					pageDictionary.get(key)).append("|\n");
+		}
+
+		migration.append("\n\n");
+
+		Document d = documentManager.createDocument(adminUser,
+				documentTypeManager.getDefaultDocumentType(), null,
+				"JSPWikiToClearspaceMigrationDetails", migration.toString());
+		d.setDocumentState(DocumentState.PUBLISHED);
+		d.setBody(WikiContentHelper.wikiToJiveDocument(migration.toString()));
+		d.save();
+
+		documentManager.addDocument(jbossWikiCom, d, parameters);
+
+		System.out.println("Page JSPWikiToClearspaceMigrationDetails added as "
+				+ d.getDocumentID());
+
+	}
+
+	private User getUser(String userName) {
+		if (users == null) {
+			users = new HashMap<String, User>();
+		}
+
+		// maybe we know it already
+		if (users.containsKey(userName)) {
+			return users.get(userName);
+		}
+
+		User user;
+
+		try {
+			user = userImporter.getUser(userName, true);
+		} catch (Exception e) {
+			return unknownUser;
+		}
+
+		users.put(userName, user);
+
+		return user;
+	}
+
+	public void setUserManager(UserManager userManager) {
+		this.userManager = userManager;
+		checkIfCanStart();
+	}
+
+	public void setDocumentManager(DocumentManager documentManager) {
+		this.documentManager = documentManager;
+		checkIfCanStart();
+	}
+
+	public void setCommunityManager(CommunityManager communityManager) {
+		this.communityManager = communityManager;
+		checkIfCanStart();
+	}
+
+	public void setDocumentTypeManager(DocumentTypeManager documentTypeManager) {
+		this.documentTypeManager = documentTypeManager;
+		checkIfCanStart();
+	}
+
+	public void setAttachmentManager(AttachmentManager attachmentManager) {
+		this.attachmentManager = attachmentManager;
+		checkIfCanStart();
+	}
+
+	private void checkIfCanStart() {
+		/*
+		 * if (userManager != null && documentManager != null &&
+		 * communityManager != null && documentTypeManager != null &&
+		 * attachmentManager != null) { System.out.println("\n\nMigration
+		 * started"); try {
+		 * 
+		 * migrate(); } catch (Exception e) { // TODO Auto-generated catch block
+		 * e.printStackTrace(); } System.out.println("Migration finished\n\n"); }
+		 */
+	}
+
+	public String getPagesToTranslateRegexp() {
+		return pagesToTranslateRegexp;
+	}
+
+	public void setPagesToTranslateRegexp(String pagesToTranslateRegexp) {
+		this.pagesToTranslateRegexp = pagesToTranslateRegexp;
+	}
+
+	public void setUserImporter(UserImporter userImporter) {
+		this.userImporter = userImporter;
+	}
+}

Deleted: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigrationStarter.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigrationStarter.java	2008-08-26 11:36:55 UTC (rev 21907)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigrationStarter.java	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,38 +0,0 @@
-package org.jboss.labs.clearspace;
-
-import org.acegisecurity.Authentication;
-import org.acegisecurity.AuthenticationException;
-import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
-
-public class CSMigrationStarter implements
-		org.acegisecurity.providers.AuthenticationProvider {
-	private CSMigration migration;
-
-	public CSMigrationStarter() {
-
-	}
-
-	public void setMigration(CSMigration migration) {
-		this.migration = migration;
-	}
-
-	public Authentication authenticate(Authentication authentication)
-			throws AuthenticationException {
-
-		try {
-			if (System.getenv("MIGRATE") != null) {
-				migration.migrate();
-			}
-		} catch (Exception e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-
-		return null;
-	}
-
-	public boolean supports(Class authentication) {
-		return authentication == UsernamePasswordAuthenticationToken.class;
-	}
-
-}

Copied: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigrationStarter.java (from rev 21907, labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigrationStarter.java)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigrationStarter.java	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/CSMigrationStarter.java	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,38 @@
+package org.jboss.labs.clearspace;
+
+import org.acegisecurity.Authentication;
+import org.acegisecurity.AuthenticationException;
+import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
+
+public class CSMigrationStarter implements
+		org.acegisecurity.providers.AuthenticationProvider {
+	private CSMigration migration;
+
+	public CSMigrationStarter() {
+
+	}
+
+	public void setMigration(CSMigration migration) {
+		this.migration = migration;
+	}
+
+	public Authentication authenticate(Authentication authentication)
+			throws AuthenticationException {
+
+		try {
+			if (System.getenv("MIGRATE") != null) {
+				migration.migrate();
+			}
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+
+		return null;
+	}
+
+	public boolean supports(Class authentication) {
+		return authentication == UsernamePasswordAuthenticationToken.class;
+	}
+
+}

Deleted: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupTranslator.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupTranslator.java	2008-08-26 11:36:55 UTC (rev 21907)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupTranslator.java	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,1069 +0,0 @@
-/**************************************************
- *                                                *
- *  JBoss Labs: Creating Professional Open Source *
- *                                                *
- *   Distributable under LGPL license.            *
- *   See terms of license at gnu.org.             *
- *                                                *
- *************************************************/
-
-/*
- Copyright (C) 2005  Damon Sicore,
- Rali Genova,
- Tomasz Szymanski,
- Adam Warski,
- JBoss, Inc.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
- */
-
-/**
- * Portions of this work are based on the work
- * of Janne Jalkanen of the JSPWiki project. 
- * 
- * Marked Portions are Copyright (C) 2001-2002 Janne Jalkanen (Janne.Jalkanen at iki.fi)
- *
- * Those portions are marked by the 'author' javadoc tag
- * and list Janne Jalkanen as the author of that method.
- * 
- * This class is based on the JSPWiki 2.0 version
- * of the TranslatorReader.java class.  The original 
- * version of that class can be found here:
- * 
- * http://anonsvn.labs.jboss.com/branches/forge/archives/jspwiki/src/com/ecyrd/jspwiki/TranslatorReader.java
- * 
- */
-package org.jboss.labs.clearspace;
-
-/**
- * @author <a href="mailto:rali.genova at jboss.org">Rali Genova </a>
- * @author <a href="mailto:tomasz.szymanski at jboss.org">Tomasz Szymanski </a>
- * 
- */
-import java.io.*;
-import java.util.regex.*;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.apache.log4j.Logger;
-import org.jboss.wiki.WikiCommon;
-import org.jboss.wiki.WikiPage;
-import org.jboss.wiki.WikiPlugin;
-import org.jboss.wiki.WikiSession;
-import org.jboss.wiki.configuration.ConfigurationParser;
-
-public class JSP2CSMarkupTranslator {
-
-	private Logger log;
-
-	private static String mediaPatterns;
-
-	/* formatting variables */
-
-	private boolean m_allowHTML = true;
-
-	private boolean m_isbold = false;
-
-	private boolean m_isitalic = false;
-
-	private boolean m_isTypedText = false;
-
-	private boolean m_istable = false;
-
-	private boolean m_isPre = false;
-
-	private boolean m_isdefinition = false;
-
-	private int m_listlevel = 0;
-
-	private int m_numlistlevel = 0;
-
-	private boolean m_camelCaseLinks = true; // camelCase enabled
-
-	/** Tag that gets closed at EOL. */
-	private String m_closeTag = null;
-
-	/** Allow this many characters to be pushed back in the stream. */
-	private static final int PUSHBACK_BUFFER_SIZE = 8;
-
-	/**
-	 * These characters constitute word separators when trying to find CamelCase
-	 * links.
-	 */
-	private static final String WORD_SEPARATORS = ",.|:;+=&";
-
-	private PushbackReader m_in;
-
-	// stores the name of the wiki page we are currently processing
-	private String pageName = "";
-
-	private Map<String, String> linkDictRev;
-
-	private Map<String, String> linkDict;
-
-	private FileWriter logFile;
-
-	public JSP2CSMarkupTranslator() {
-
-	}
-
-	/**
-	 * Push back any character to the current input. Does not push back a read
-	 * EOF, though.
-	 * 
-	 * @author Janne Jalkanen
-	 */
-	private void pushBack(int c) throws IOException {
-		if (c != -1) {
-			m_in.unread(c);
-		}
-	}
-
-	/**
-	 * Wiki to HTML transformation method, plain URIs transformation not
-	 * implemented
-	 * 
-	 * @param page
-	 *            The String representation of a wiki page's content
-	 * @return The final transformed into HTML string
-	 * @author Janne Jalkanen
-	 * @author Rali Genova
-	 */
-	public String parseLinks(String page) throws IOException {
-		m_in = new PushbackReader(new StringReader(page), PUSHBACK_BUFFER_SIZE);
-		StringBuffer buf = new StringBuffer();
-		StringBuffer word = null;
-		int previousCh = -2;
-		int start = 0;
-		boolean quitReading = false;
-		boolean newLine = true; // FIXME: not true if reading starts in middle
-		// of buffer
-
-		while (!quitReading) {
-			int ch = nextToken();
-			String s = null;
-
-			// begin of HTML transformation
-			if (m_isPre) {
-				if (ch == '}') {
-					buf.append(handleClosebrace());
-					/*
-					 * } else if (ch == '<') { buf.append("&lt;"); } else if
-					 * (ch == '>') { buf.append("&gt;");
-					 */
-				} else if (ch == -1) {
-					quitReading = true;
-				} else {
-					buf.append((char) ch);
-				}
-
-				continue;
-			}
-			/*
-			 * CamelCase detection, a non-trivial endeavour. We keep track of
-			 * all white-space separated entities, which we hereby refer to as
-			 * "words". We then check for an existence of a CamelCase format
-			 * text string inside the "word", and if one exists, we replace it
-			 * with a proper link.
-			 */
-
-			if (m_camelCaseLinks) {
-				// Quick parse of start of a word boundary.
-
-				if (word == null
-						&& (Character.isWhitespace((char) previousCh)
-								|| WORD_SEPARATORS.indexOf((char) previousCh) != -1 || newLine)
-						&& !Character.isWhitespace((char) ch)) {
-					word = new StringBuffer();
-				}
-
-				// Are we currently tracking a word?
-				if (word != null) {
-					//
-					// Check for the end of the word.
-					//
-
-					// We don't want automatic link creation
-					/*
-					 * if (Character.isWhitespace((char) ch) || ch == -1 ||
-					 * WORD_SEPARATORS.indexOf((char) ch) != -1) { String
-					 * potentialLink = word.toString();
-					 * 
-					 * String camelCase = parseCamelCase(potentialLink);
-					 * 
-					 * if (camelCase != null) { start =
-					 * buf.toString().lastIndexOf(camelCase); buf.replace(start,
-					 * start + camelCase.length(), handleHyperlinks(camelCase)); } //
-					 * We've ended a word boundary, so time to reset. word =
-					 * null; } else {
-					 */
-					// This should only be appending letters and digits.
-					word.append((char) ch);
-					// } // if end of word
-				} // if word's not null
-
-				// Always set the previous character to test for word starts.
-				previousCh = ch;
-
-			} // if m_camelCaseLinks
-			//
-			// Check if any lists need closing down.
-			//
-
-			if (newLine && ch != '*' && ch != ' ' && m_listlevel > 0) {
-				buf.append("</LI>\n");
-				for (; m_listlevel > 0; m_listlevel--) {
-					buf.append("</UL>\n");
-				}
-			}
-
-			if (newLine && ch != '#' && ch != ' ' && m_numlistlevel > 0) {
-				buf.append("</LI>\n");
-				for (; m_numlistlevel > 0; m_numlistlevel--) {
-					buf.append("</OL>\n");
-				}
-			}
-
-			if (newLine && ch != '|' && m_istable) {
-				buf.append("</TABLE>\n");
-				m_istable = false;
-				m_closeTag = null;
-			}
-
-			switch (ch) {
-			case '\r':
-				// DOS linefeeds we forget
-				s = null;
-				break;
-
-			case '\n':
-				//
-				// Close things like headings, etc.
-				//
-				if (m_closeTag != null) {
-					buf.append(m_closeTag);
-					m_closeTag = null;
-				}
-
-				m_isdefinition = false;
-
-				if (newLine) {
-					// Paragraph change.
-
-					buf.append("\n");
-				} else {
-					buf.append("\n");
-					newLine = true;
-				}
-				/*
-				 * wiki syntax handling, later to be refactored so multiple wiki
-				 * syntax is supported
-				 */
-
-				break;
-			case '\\':
-				s = handleBackslash();
-				break;
-
-			case '_':
-				s = handleUnderscore();
-				break;
-
-			case '\'':
-				s = handleApostrophe();
-				break;
-
-			case '{':
-				s = handleOpenbrace();
-				break;
-
-			case '}':
-				s = handleClosebrace();
-				break;
-
-			case '-':
-				s = handleDash();
-				break;
-
-			case '!':
-				if (newLine) {
-					s = handleHeading();
-				} else {
-					s = "!";
-				}
-				break;
-
-			case ';':
-				if (newLine) {
-					s = handleDefinitionList();
-				} else {
-					s = ";";
-				}
-				break;
-
-			case ':':
-				if (m_isdefinition) {
-					s = "}";
-					m_isdefinition = false;
-				} else {
-					s = ":";
-				}
-				break;
-
-			case '[':
-				s = handleOpenbracket();
-				break;
-
-			case '*':
-				if (newLine) {
-					int chn = nextToken();
-					buf.append("*");
-
-					if (chn != '*') {
-						buf.append(" ");
-					}
-
-					if (chn != ' ') {
-						pushBack(chn);
-					}
-				}
-				break;
-
-			case '#':
-				if (newLine) {
-					int chn = nextToken();
-					buf.append("#");
-
-					if (chn != '#') {
-						buf.append(" ");
-					}
-
-					if (chn != ' ') {
-						pushBack(chn);
-					}
-				}
-				break;
-
-			/*
-			 * case '|': s = handleBar(newLine); break;
-			 */
-
-			case '<':
-				s = m_allowHTML ? "<" : "&lt;";
-				break;
-
-			case '>':
-				s = m_allowHTML ? ">" : "&gt;";
-				break;
-
-			case '\"':
-				s = m_allowHTML ? "\"" : "&quot;";
-				break;
-
-			case '~':
-				s = handleTilde();
-				break;
-			case -1:
-				quitReading = true;
-				break;
-
-			default:
-				buf.append((char) ch);
-				newLine = false;
-				break;
-			}
-			if (s != null) {
-				buf.append(s);
-
-				newLine = false;
-			}
-
-		}
-
-		return buf.toString();
-	}
-
-	/**
-	 * @param link -
-	 *            potential camel case link to be tested
-	 * @return the string itself if not a camel case, and a proper link
-	 *         otherwise
-	 * @author Rali Genova
-	 * @author Janne Jalkanen
-	 */
-	public static String parseCamelCase(String link) {
-		String camelCasepattern = "^([^\\p{Alnum}]*|\\~)([\\p{Upper}]+[\\p{Lower}]+[\\p{Upper}]+[\\p{Alnum}]*)[^\\p{Alnum}]*$";
-		Pattern camelCase = Pattern.compile(camelCasepattern);
-		Matcher camelMatch = camelCase.matcher(link);
-		if (camelMatch.matches()) {
-			String result = camelMatch.group(2); // get the camel case words
-			if (camelMatch.group(1) != null) {
-				if ((camelMatch.group(1).equals("~"))
-						|| (camelMatch.group(1).indexOf('[') != -1)) {
-					return null; // this is camelCase escape or [...] link
-				}
-			}
-			return result;
-
-		}// if match
-		return null;
-	}
-
-	/* a collection of all media formats allowed on wiki */
-	private static Collection getImagePatterns() {
-		ArrayList patt = new ArrayList();
-		String imagepattern = mediaPatterns;
-		String[] elem = imagepattern.split(",");
-		for (int i = 0; i < elem.length; i++) {
-			patt.add(elem[i].trim());
-		}
-
-		return patt;
-	}
-
-	public static boolean checkImageLink(String text) {
-		ArrayList ptrns = (ArrayList) getImagePatterns();
-		for (int i = 0; i < ptrns.size(); i++) {
-			if (text.endsWith((String) ptrns.get(i))) {
-				return true;
-			}
-		}
-
-		return false;
-	}
-
-	/**
-	 * Generic escape of next character or entity.
-	 */
-	private String handleTilde() throws IOException {
-		int ch = nextToken();
-
-		if (ch == '|')
-			return "|";
-
-		if (Character.isUpperCase((char) ch)) {
-			return String.valueOf((char) ch);
-		}
-
-		// No escape.
-		pushBack(ch);
-
-		return "~";
-	}
-
-	private String handleUnderscore() throws IOException {
-		int ch = nextToken();
-		String res = "_";
-
-		if (ch == '_') {
-			res = m_isbold ? "*" : "*";
-			m_isbold = !m_isbold;
-		} else {
-			pushBack(ch);
-		}
-
-		return res;
-	}
-
-	/**
-	 * For example: italics.
-	 */
-	private String handleApostrophe() throws IOException {
-		int ch = nextToken();
-		String res = "'";
-
-		if (ch == '\'') {
-			res = m_isitalic ? "+" : "+";
-			m_isitalic = !m_isitalic;
-		} else {
-			m_in.unread(ch);
-		}
-
-		return res;
-	}
-
-	private String handleDash() throws IOException {
-		int ch = nextToken();
-
-		if (ch == '-') {
-			int ch2 = nextToken();
-
-			if (ch2 == '-') {
-				int ch3 = nextToken();
-
-				if (ch3 == '-') {
-					// Empty away all the rest of the dashes.
-					// Do not forget to return the first non-match back.
-					while ((ch = nextToken()) == '-')
-						;
-
-					pushBack(ch);
-					return "-----";
-				}
-
-				pushBack(ch3);
-			}
-			pushBack(ch2);
-		}
-
-		pushBack(ch);
-
-		return "-";
-	}
-
-	private String handleHeading() throws IOException {
-		StringBuffer buf = new StringBuffer();
-
-		int ch = nextToken();
-
-		if (ch == '!') {
-			int ch2 = nextToken();
-
-			if (ch2 == '!') {
-				buf.append("h2. ");
-				m_closeTag = "";
-			} else {
-				buf.append("h3. ");
-				m_closeTag = "";
-				pushBack(ch2);
-			}
-		} else {
-			buf.append("h4. ");
-			m_closeTag = "";
-			pushBack(ch);
-		}
-
-		return buf.toString();
-	}
-
-	// TODO handle list
-	private String handleUnorderedList() throws IOException {
-		StringBuffer buf = new StringBuffer();
-
-		if (m_listlevel > 0) {
-			buf.append("</LI>\n");
-		}
-
-		int numBullets = countChars(m_in, '*') + 1;
-
-		if (numBullets > m_listlevel) {
-			for (; m_listlevel < numBullets; m_listlevel++)
-				buf.append("<UL>\n");
-		} else if (numBullets < m_listlevel) {
-			for (; m_listlevel > numBullets; m_listlevel--)
-				buf.append("</UL>\n");
-		}
-
-		buf.append("<LI>");
-
-		return buf.toString();
-	}
-
-	// TODO handle list
-	private String handleOrderedList() throws IOException {
-		StringBuffer buf = new StringBuffer();
-
-		if (m_numlistlevel > 0) {
-			buf.append("</LI>\n");
-		}
-
-		int numBullets = countChars(m_in, '#') + 1;
-
-		if (numBullets > m_numlistlevel) {
-			for (; m_numlistlevel < numBullets; m_numlistlevel++)
-				buf.append("<OL>\n");
-		} else if (numBullets < m_numlistlevel) {
-			for (; m_numlistlevel > numBullets; m_numlistlevel--)
-				buf.append("</OL>\n");
-		}
-
-		buf.append("<LI>");
-
-		return buf.toString();
-
-	}
-
-	private int countChars(PushbackReader in, char c) throws IOException {
-		int count = 0;
-		int ch;
-
-		while ((ch = in.read()) != -1) {
-			if ((char) ch == c) {
-				count++;
-			} else {
-				in.unread(ch);
-				break;
-			}
-		}
-
-		return count;
-	}
-
-	private String handleBar(boolean newLine) throws IOException {
-		StringBuffer sb = new StringBuffer();
-
-		if (!m_istable && !newLine) {
-			return "|";
-		}
-
-		if (newLine) {
-			if (!m_istable) {
-				sb.append("<TABLE CLASS=\"wikitable\" BORDER=\"1\">\n");
-				m_istable = true;
-			}
-
-			sb.append("<TR>");
-			m_closeTag = "</TD></TR>";
-		}
-
-		int ch = nextToken();
-
-		if (ch == '|') {
-			if (!newLine) {
-				sb.append("</TH>");
-			}
-			sb.append("<TH>");
-			m_closeTag = "</TH></TR>";
-		} else {
-			if (!newLine) {
-				sb.append("</TD>");
-			}
-			sb.append("<TD>");
-			pushBack(ch);
-		}
-
-		return sb.toString();
-	}
-
-	private String handleDefinitionList() throws IOException {
-		if (!m_isdefinition) {
-			m_isdefinition = true;
-
-			m_closeTag = "{quote}";
-
-			return "{quote:title=";
-		}
-
-		return ";";
-	}
-
-	private String handleBackslash() throws IOException {
-		int ch = nextToken();
-
-		if (ch == '\\') {
-			int ch2 = nextToken();
-
-			if (ch2 == '\\') {
-				int ch3 = nextToken();
-
-				if (ch3 == '\\') {
-					// TODO handle backbackslash
-					// return "<p style='page-break-before: always' />";
-				}
-
-				pushBack(ch3);
-
-				//TODO page break for printer
-				return "\\";
-			}
-
-			pushBack(ch2);
-
-			return "\n";
-		}
-
-		pushBack(ch);
-
-		return "\\";
-	}
-
-	private String handleOpenbracket() throws IOException {
-		StringBuffer sb = new StringBuffer();
-		int ch;
-		boolean isPlugin = false;
-
-		while ((ch = nextToken()) == '[') {
-			sb.append((char) ch);
-		}
-
-		if (sb.length() > 0) {
-			return sb.toString();// not a link
-		}
-
-		//
-		// Find end of hyperlink
-		//
-		pushBack(ch);
-		ch = nextToken();
-
-		while (ch != -1) {
-			if (ch == ']')// && (!isPlugin || sb.charAt( sb.length()-1 ) ==
-			// '}'
-			// ) )
-			{
-				break;
-			}
-
-			sb.append((char) ch);
-
-			ch = nextToken();
-		}
-
-		if (ch == -1) {
-
-			return sb.toString();
-		}
-
-		return handleHyperlinks(sb.toString());
-	}
-
-	private String handleOpenbrace() throws IOException {
-		int ch = nextToken();
-		String res = "{";
-
-		if (ch == '{') {
-			int ch2 = nextToken();
-
-			if (ch2 == '{') {
-				res = "{code}";
-				m_isPre = true;
-			} else {
-				pushBack(ch2);
-				// TODO <TT> truetype
-				res = "{font:courier new}";
-				m_isTypedText = true;
-			}
-		} else {
-			pushBack(ch);
-		}
-
-		return res;
-	}
-
-	/**
-	 * Handles both }} and }}}
-	 */
-	private String handleClosebrace() throws IOException {
-		String res = "}";
-
-		int ch2 = nextToken();
-
-		if (ch2 == '}') {
-			int ch3 = nextToken();
-
-			if (ch3 == '}') {
-				if (m_isPre) {
-					m_isPre = false;
-					res = "{code}";
-				} else {
-					res = "}}}";
-				}
-			} else {
-				pushBack(ch3);
-				// TODO truetype
-				if (!m_isPre) {
-					res = "{font}";
-					m_isTypedText = false;
-				} else {
-					pushBack(ch2);
-				}
-			}
-		} else {
-			pushBack(ch2);
-		}
-
-		return res;
-	}
-
-	/**
-	 * Returns true if the link is really command to insert a plugin.
-	 * <P>
-	 * Currently we just check if the link starts with "{INSERT", or just plain
-	 * "{" but not "{$".
-	 * 
-	 * @author Janne Jalkanen
-	 * 
-	 * @param link
-	 *            Link text, i.e. the contents of text between [].
-	 * @return True, if this link seems to be a command to insert a plugin here.
-	 */
-	public static boolean isPluginLink(String link) {
-		return link.startsWith("{INSERT")
-				|| (link.startsWith("{") && !link.startsWith("{$"));
-	}
-
-	/**
-	 * method to create links for external pages of Wiki pages
-	 * 
-	 * @param string
-	 * @return the HTML link representation of the wiki page/external link
-	 * @author Rali Genova
-	 */
-	private String handleHyperlinks(String link) {
-		String result = "";
-		String text = "";
-		String wikiPage = "";
-
-		if (isPluginLink(link)) {
-			// return null; // we do not include plugin links for now
-			// TODO make those CS macros
-			try {
-				logFile.write("Unknown inside plugin: "+link+" in page "+pageName+"\n");
-			} catch (IOException e) {
-				e.printStackTrace();
-			}
-			return link;
-		}
-		int border = link.indexOf('|');
-		if (border != -1) // [text|link] case
-		{
-			text = link.substring(0, border);
-			link = link.substring(border + 1);
-
-		} else // [link] case
-		{
-			if (!isExternalLink(link)) {
-				text = cleanLink(link);
-			} else {
-				text = link;
-			}
-		}
-		
-		/* can't be longer then 255 chars
-		if (text.length() > 255) {
-			System.out.println("Text longer !");
-			text = text.substring(0, 254);
-		}
-		
-		if (link.length() > 255) {
-			System.out.println("Link longer !");
-		}*/
-
-		// external link
-		if (isExternalLink(link)) {
-			if (checkImageLink(link)) {
-				result = "!" + link + "!";// external
-				try {
-					logFile.write("Check image "+link+" in page "+pageName+"\n");
-				} catch (IOException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				}
-				// image
-			} else
-				result = "[" + text + "|" + link + "]";
-		}
-		// internal link
-		else {
-			// check if a footnote
-			if (link.startsWith("#"))// footnote reference
-			{// TODO handle footnote def
-				// http://labs.jboss.com/JSPWiki/Wiki.jsp?page=TextFormattingRules#ref-TextFormattingRules-1
-				result = "{FOOTNOTE RED " + link + " " + text + "}";
-
-			} else if (isNumber(link))// defines footnote
-			{// TODO handle footnote ref
-				result = "{FOOTNOTE DEF " + link + " " + text + "}";
-			}
-
-			// check if not an image link as well
-			else if (checkImageLink(link)) {
-				result = "!" + link + "!";
-				try {
-					logFile.write("Check image "+link+" in page "+pageName+"\n");
-				} catch (IOException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				}
-
-			}
-			// check for attachments later on //TODO handle attachments
-			else {
-
-				/*
-				 * wikiPage = wikiEngine.getRealName(cleanLink(link), wPage
-				 * .getLangCode()); if (wikiEngine.pageExists(wikiPage,
-				 * wPage.getLangCode())) { result = "<a href=\"" + portalHome +
-				 * wikiHome + page + wikiPage + language + wPage.getLangCode() +
-				 * "\">" + text + "</a>"; } else result = "<u>" + text + "</u>" + "<a
-				 * href=\"" + portalHome + wikiHome + page + wikiPage + language +
-				 * wPage.getLangCode() + "\">" + "?" + "</a>";
-				 */
-				return "[" + text + "|" + linkDict.get(link) + "]";
-			}
-		}
-
-		return result;
-	}
-
-	/**
-	 * Figures out if a link is an off-site link. This recognizes the most
-	 * common protocols by checking how it starts. (clears all white space in
-	 * case the link starts with '\n' or [space]
-	 * 
-	 * @author Janne Jalkanen
-	 */
-	public static boolean isExternalLink(String link) {
-		link = link.trim();
-		return link.startsWith("http:") || link.startsWith("ftp:")
-				|| link.startsWith("https:") || link.startsWith("mailto:")
-				|| link.startsWith("news:") || link.startsWith("file:");
-	}
-
-	private int nextToken() throws IOException {
-		return m_in.read();
-	}
-
-	/**
-	 * Push back any character to the current input. Does not push back a read
-	 * EOF, though.
-	 */
-
-	/**
-	 * Cleans a Wiki name.
-	 * <P>[ This is a link ] -&gt; ThisIsALink
-	 * 
-	 * @param link
-	 *            Link to be cleared. Null is safe, and causes this to return
-	 *            null.
-	 * @return A cleaned link.
-	 * 
-	 * @since 2.0
-	 * @author Janne Jalkanen
-	 */
-	public static String cleanLink(String link) {
-		StringBuffer clean = new StringBuffer();
-
-		if (link == null)
-			return null;
-
-		//
-		// Compress away all whitespace and capitalize
-		// all words in between.
-		//
-
-		StringTokenizer st = new StringTokenizer(link, " -");
-
-		while (st.hasMoreTokens()) {
-			StringBuffer component = new StringBuffer(st.nextToken());
-
-			component.setCharAt(0, Character.toUpperCase(component.charAt(0)));
-
-			//
-			// We must do this, because otherwise compiling on JDK 1.4 causes
-			// a downwards incompatibility to JDK 1.3.
-			//
-			clean.append(component.toString());
-		}
-
-		//
-		// Remove non-alphanumeric characters that should not
-		// be put inside WikiNames. Note that all valid
-		// Unicode letters are considered okay for WikiNames.
-		// It is the problem of the WikiPageProvider to take
-		// care of actually storing that information.
-		//
-
-		for (int i = 0; i < clean.length(); i++) {
-			if ((clean.charAt(i) != '/')
-					&& !(Character.isLetterOrDigit(clean.charAt(i))
-							|| clean.charAt(i) == '_' || clean.charAt(i) == '.')) {
-				clean.deleteCharAt(i);
-				--i; // We just shortened this buffer.
-			}
-		}
-
-		//
-		// Capitalise words in subpages
-		//
-
-		for (int i = 0; i < clean.length() - 1; i++) {
-			if ((clean.charAt(i) == '/')
-					&& (Character.isLowerCase(clean.charAt(i + 1)))) {
-				clean.setCharAt(i + 1, Character.toUpperCase(clean
-						.charAt(i + 1)));
-			}
-		}
-
-		return clean.toString();
-	}
-
-	/**
-	 * Returns true, if the argument contains a number, otherwise false. In a
-	 * quick test this is roughly the same speed as Integer.parseInt() if the
-	 * argument is a number, and roughly ten times the speed, if the argument is
-	 * NOT a number.
-	 */
-
-	public static boolean isNumber(String s) {
-		if (s == null)
-			return false;
-
-		if (s.length() > 1 && s.charAt(0) == '-')
-			s = s.substring(1);
-
-		for (int i = 0; i < s.length(); i++) {
-			if (!Character.isDigit(s.charAt(i)))
-				return false;
-		}
-
-		return true;
-	}
-
-	// not sure what it is supposed to do but neccessary to compile
-	public void next() {
-	}
-
-	public void initTranslator() {
-		m_allowHTML = true;
-		m_isbold = false;
-		m_isitalic = false;
-		m_isTypedText = false;
-		m_istable = false;
-		m_isPre = false;
-		m_isdefinition = false;
-		m_listlevel = 0;
-		m_numlistlevel = 0;
-		m_camelCaseLinks = true; // camelCase enabled
-		/** Tag that gets closed at EOL. */
-		m_closeTag = null;
-
-		mediaPatterns = ".png , .jpeg, .jpg , .gif , .bmp";
-	}
-
-	public String parse(String pageName, String pageContent, Map<String, String> linkDict,
-			Map<String, String> linkDictRev, FileWriter logFile) throws IOException {
-
-		this.linkDict = linkDict;
-		this.linkDictRev = linkDictRev;
-		this.logFile = logFile;
-		this.pageName = pageName;
-		
-		initTranslator();
-
-		String replace = parseLinks(pageContent);
-
-		return replace;
-
-	}
-
-	protected boolean executePlugins() {
-		return true;
-	}
-
-}

Copied: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupTranslator.java (from rev 21907, labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupTranslator.java)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupTranslator.java	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupTranslator.java	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,1070 @@
+/**************************************************
+ *                                                *
+ *  JBoss Labs: Creating Professional Open Source *
+ *                                                *
+ *   Distributable under LGPL license.            *
+ *   See terms of license at gnu.org.             *
+ *                                                *
+ *************************************************/
+
+/*
+ Copyright (C) 2005  Damon Sicore,
+ Rali Genova,
+ Tomasz Szymanski,
+ Adam Warski,
+ JBoss, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+ */
+
+/**
+ * Portions of this work are based on the work
+ * of Janne Jalkanen of the JSPWiki project. 
+ * 
+ * Marked Portions are Copyright (C) 2001-2002 Janne Jalkanen (Janne.Jalkanen at iki.fi)
+ *
+ * Those portions are marked by the 'author' javadoc tag
+ * and list Janne Jalkanen as the author of that method.
+ * 
+ * This class is based on the JSPWiki 2.0 version
+ * of the TranslatorReader.java class.  The original 
+ * version of that class can be found here:
+ * 
+ * http://anonsvn.labs.jboss.com/branches/forge/archives/jspwiki/src/com/ecyrd/jspwiki/TranslatorReader.java
+ * 
+ */
+package org.jboss.labs.clearspace;
+
+/**
+ * @author <a href="mailto:rali.genova at jboss.org">Rali Genova </a>
+ * @author <a href="mailto:tomasz.szymanski at jboss.org">Tomasz Szymanski </a>
+ * 
+ */
+import java.io.*;
+import java.util.regex.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.apache.log4j.Logger;
+import org.jboss.wiki.WikiCommon;
+import org.jboss.wiki.WikiPage;
+import org.jboss.wiki.WikiPlugin;
+import org.jboss.wiki.WikiSession;
+import org.jboss.wiki.configuration.ConfigurationParser;
+
+public class JSP2CSMarkupTranslator {
+
+	private Logger log;
+
+	private static String mediaPatterns;
+
+	/* formatting variables */
+
+	private boolean m_allowHTML = true;
+
+	private boolean m_isbold = false;
+
+	private boolean m_isitalic = false;
+
+	private boolean m_isTypedText = false;
+
+	private boolean m_istable = false;
+
+	private boolean m_isPre = false;
+
+	private boolean m_isdefinition = false;
+
+	private int m_listlevel = 0;
+
+	private int m_numlistlevel = 0;
+
+	private boolean m_camelCaseLinks = true; // camelCase enabled
+
+	/** Tag that gets closed at EOL. */
+	private String m_closeTag = null;
+
+	/** Allow this many characters to be pushed back in the stream. */
+	private static final int PUSHBACK_BUFFER_SIZE = 8;
+
+	/**
+	 * These characters constitute word separators when trying to find CamelCase
+	 * links.
+	 */
+	private static final String WORD_SEPARATORS = ",.|:;+=&";
+
+	private PushbackReader m_in;
+
+	// stores the name of the wiki page we are currently processing
+	private String pageName = "";
+
+	private Map<String, String> linkDictRev;
+
+	private Map<String, String> linkDict;
+
+	private FileWriter logFile;
+
+	public JSP2CSMarkupTranslator() {
+
+	}
+
+	/**
+	 * Push back any character to the current input. Does not push back a read
+	 * EOF, though.
+	 * 
+	 * @author Janne Jalkanen
+	 */
+	private void pushBack(int c) throws IOException {
+		if (c != -1) {
+			m_in.unread(c);
+		}
+	}
+
+	/**
+	 * Wiki to HTML transformation method, plain URIs transformation not
+	 * implemented
+	 * 
+	 * @param page
+	 *            The String representation of a wiki page's content
+	 * @return The final transformed into HTML string
+	 * @author Janne Jalkanen
+	 * @author Rali Genova
+	 */
+	public String parseLinks(String page) throws IOException {
+		m_in = new PushbackReader(new StringReader(page), PUSHBACK_BUFFER_SIZE);
+		StringBuffer buf = new StringBuffer();
+		StringBuffer word = null;
+		int previousCh = -2;
+		int start = 0;
+		boolean quitReading = false;
+		boolean newLine = true; // FIXME: not true if reading starts in middle
+		// of buffer
+
+		while (!quitReading) {
+			int ch = nextToken();
+			String s = null;
+
+			// begin of HTML transformation
+			if (m_isPre) {
+				if (ch == '}') {
+					buf.append(handleClosebrace());
+					/*
+					 * } else if (ch == '<') { buf.append("&lt;"); } else if
+					 * (ch == '>') { buf.append("&gt;");
+					 */
+				} else if (ch == -1) {
+					quitReading = true;
+				} else {
+					buf.append((char) ch);
+				}
+
+				continue;
+			}
+			/*
+			 * CamelCase detection, a non-trivial endeavour. We keep track of
+			 * all white-space separated entities, which we hereby refer to as
+			 * "words". We then check for an existence of a CamelCase format
+			 * text string inside the "word", and if one exists, we replace it
+			 * with a proper link.
+			 */
+
+			if (m_camelCaseLinks) {
+				// Quick parse of start of a word boundary.
+
+				if (word == null
+						&& (Character.isWhitespace((char) previousCh)
+								|| WORD_SEPARATORS.indexOf((char) previousCh) != -1 || newLine)
+						&& !Character.isWhitespace((char) ch)) {
+					word = new StringBuffer();
+				}
+
+				// Are we currently tracking a word?
+				if (word != null) {
+					//
+					// Check for the end of the word.
+					//
+
+					// We don't want automatic link creation
+					/*
+					 * if (Character.isWhitespace((char) ch) || ch == -1 ||
+					 * WORD_SEPARATORS.indexOf((char) ch) != -1) { String
+					 * potentialLink = word.toString();
+					 * 
+					 * String camelCase = parseCamelCase(potentialLink);
+					 * 
+					 * if (camelCase != null) { start =
+					 * buf.toString().lastIndexOf(camelCase); buf.replace(start,
+					 * start + camelCase.length(), handleHyperlinks(camelCase)); } //
+					 * We've ended a word boundary, so time to reset. word =
+					 * null; } else {
+					 */
+					// This should only be appending letters and digits.
+					word.append((char) ch);
+					// } // if end of word
+				} // if word's not null
+
+				// Always set the previous character to test for word starts.
+				previousCh = ch;
+
+			} // if m_camelCaseLinks
+			//
+			// Check if any lists need closing down.
+			//
+
+			if (newLine && ch != '*' && ch != ' ' && m_listlevel > 0) {
+				buf.append("</LI>\n");
+				for (; m_listlevel > 0; m_listlevel--) {
+					buf.append("</UL>\n");
+				}
+			}
+
+			if (newLine && ch != '#' && ch != ' ' && m_numlistlevel > 0) {
+				buf.append("</LI>\n");
+				for (; m_numlistlevel > 0; m_numlistlevel--) {
+					buf.append("</OL>\n");
+				}
+			}
+
+			if (newLine && ch != '|' && m_istable) {
+				buf.append("</TABLE>\n");
+				m_istable = false;
+				m_closeTag = null;
+			}
+
+			switch (ch) {
+			case '\r':
+				// DOS linefeeds we forget
+				s = null;
+				break;
+
+			case '\n':
+				//
+				// Close things like headings, etc.
+				//
+				if (m_closeTag != null) {
+					buf.append(m_closeTag);
+					m_closeTag = null;
+				}
+
+				m_isdefinition = false;
+
+				if (newLine) {
+					// Paragraph change.
+
+					buf.append("\n");
+				} else {
+					buf.append("\n");
+					newLine = true;
+				}
+				/*
+				 * wiki syntax handling, later to be refactored so multiple wiki
+				 * syntax is supported
+				 */
+
+				break;
+			case '\\':
+				s = handleBackslash();
+				break;
+
+			case '_':
+				s = handleUnderscore();
+				break;
+
+			case '\'':
+				s = handleApostrophe();
+				break;
+
+			case '{':
+				s = handleOpenbrace();
+				break;
+
+			case '}':
+				s = handleClosebrace();
+				break;
+
+			case '-':
+				s = handleDash();
+				break;
+
+			case '!':
+				if (newLine) {
+					s = handleHeading();
+				} else {
+					s = "!";
+				}
+				break;
+
+			case ';':
+				if (newLine) {
+					s = handleDefinitionList();
+				} else {
+					s = ";";
+				}
+				break;
+
+			case ':':
+				if (m_isdefinition) {
+					s = "}";
+					m_isdefinition = false;
+				} else {
+					s = ":";
+				}
+				break;
+
+			case '[':
+				s = handleOpenbracket();
+				break;
+
+			case '*':
+				if (newLine) {
+					int chn = nextToken();
+					buf.append("*");
+
+					if (chn != '*') {
+						buf.append(" ");
+					}
+
+					if (chn != ' ') {
+						pushBack(chn);
+					}
+				}
+				break;
+
+			case '#':
+				if (newLine) {
+					int chn = nextToken();
+					buf.append("#");
+
+					if (chn != '#') {
+						buf.append(" ");
+					}
+
+					if (chn != ' ') {
+						pushBack(chn);
+					}
+				}
+				break;
+
+			case '|':
+				s = handleBar(newLine);
+				break;
+
+			case '<':
+				s = m_allowHTML ? "<" : "&lt;";
+				break;
+
+			case '>':
+				s = m_allowHTML ? ">" : "&gt;";
+				break;
+
+			case '\"':
+				s = m_allowHTML ? "\"" : "&quot;";
+				break;
+
+			case '~':
+				s = handleTilde();
+				break;
+			case -1:
+				quitReading = true;
+				break;
+
+			default:
+				buf.append((char) ch);
+				newLine = false;
+				break;
+			}
+			if (s != null) {
+				buf.append(s);
+
+				newLine = false;
+			}
+
+		}
+
+		return buf.toString();
+	}
+
+	/**
+	 * @param link -
+	 *            potential camel case link to be tested
+	 * @return the string itself if not a camel case, and a proper link
+	 *         otherwise
+	 * @author Rali Genova
+	 * @author Janne Jalkanen
+	 */
+	public static String parseCamelCase(String link) {
+		String camelCasepattern = "^([^\\p{Alnum}]*|\\~)([\\p{Upper}]+[\\p{Lower}]+[\\p{Upper}]+[\\p{Alnum}]*)[^\\p{Alnum}]*$";
+		Pattern camelCase = Pattern.compile(camelCasepattern);
+		Matcher camelMatch = camelCase.matcher(link);
+		if (camelMatch.matches()) {
+			String result = camelMatch.group(2); // get the camel case words
+			if (camelMatch.group(1) != null) {
+				if ((camelMatch.group(1).equals("~"))
+						|| (camelMatch.group(1).indexOf('[') != -1)) {
+					return null; // this is camelCase escape or [...] link
+				}
+			}
+			return result;
+
+		}// if match
+		return null;
+	}
+
+	/* a collection of all media formats allowed on wiki */
+	private static Collection getImagePatterns() {
+		ArrayList patt = new ArrayList();
+		String imagepattern = mediaPatterns;
+		String[] elem = imagepattern.split(",");
+		for (int i = 0; i < elem.length; i++) {
+			patt.add(elem[i].trim());
+		}
+
+		return patt;
+	}
+
+	public static boolean checkImageLink(String text) {
+		ArrayList ptrns = (ArrayList) getImagePatterns();
+		for (int i = 0; i < ptrns.size(); i++) {
+			if (text.endsWith((String) ptrns.get(i))) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	/**
+	 * Generic escape of next character or entity.
+	 */
+	private String handleTilde() throws IOException {
+		int ch = nextToken();
+
+		if (ch == '|')
+			return "|";
+
+		if (Character.isUpperCase((char) ch)) {
+			return String.valueOf((char) ch);
+		}
+
+		// No escape.
+		pushBack(ch);
+
+		return "~";
+	}
+
+	private String handleUnderscore() throws IOException {
+		int ch = nextToken();
+		String res = "_";
+
+		if (ch == '_') {
+			res = m_isbold ? "<b>" : "</b>";
+			m_isbold = !m_isbold;
+		} else {
+			pushBack(ch);
+		}
+
+		return res;
+	}
+
+	/**
+	 * For example: italics.
+	 */
+	private String handleApostrophe() throws IOException {
+		int ch = nextToken();
+		String res = "'";
+
+		if (ch == '\'') {
+			res = m_isitalic ? "<i>" : "</i>";
+			m_isitalic = !m_isitalic;
+		} else {
+			m_in.unread(ch);
+		}
+
+		return res;
+	}
+
+	private String handleDash() throws IOException {
+		int ch = nextToken();
+
+		if (ch == '-') {
+			int ch2 = nextToken();
+
+			if (ch2 == '-') {
+				int ch3 = nextToken();
+
+				if (ch3 == '-') {
+					// Empty away all the rest of the dashes.
+					// Do not forget to return the first non-match back.
+					while ((ch = nextToken()) == '-')
+						;
+
+					pushBack(ch);
+					return "<hr />";
+				}
+
+				pushBack(ch3);
+			}
+			pushBack(ch2);
+		}
+
+		pushBack(ch);
+
+		return "-";
+	}
+
+	private String handleHeading() throws IOException {
+		StringBuffer buf = new StringBuffer();
+
+		int ch = nextToken();
+
+		if (ch == '!') {
+			int ch2 = nextToken();
+
+			if (ch2 == '!') {
+				buf.append("<h2>");
+				m_closeTag = "</h2>";
+			} else {
+				buf.append("<h3>");
+				m_closeTag = "</h3>";
+				pushBack(ch2);
+			}
+		} else {
+			buf.append("<h4>");
+			m_closeTag = "</h4>";
+			pushBack(ch);
+		}
+
+		return buf.toString();
+	}
+
+	// TODO handle list
+	private String handleUnorderedList() throws IOException {
+		StringBuffer buf = new StringBuffer();
+
+		if (m_listlevel > 0) {
+			buf.append("</LI>\n");
+		}
+
+		int numBullets = countChars(m_in, '*') + 1;
+
+		if (numBullets > m_listlevel) {
+			for (; m_listlevel < numBullets; m_listlevel++)
+				buf.append("<UL>\n");
+		} else if (numBullets < m_listlevel) {
+			for (; m_listlevel > numBullets; m_listlevel--)
+				buf.append("</UL>\n");
+		}
+
+		buf.append("<LI>");
+
+		return buf.toString();
+	}
+
+	// TODO handle list
+	private String handleOrderedList() throws IOException {
+		StringBuffer buf = new StringBuffer();
+
+		if (m_numlistlevel > 0) {
+			buf.append("</LI>\n");
+		}
+
+		int numBullets = countChars(m_in, '#') + 1;
+
+		if (numBullets > m_numlistlevel) {
+			for (; m_numlistlevel < numBullets; m_numlistlevel++)
+				buf.append("<OL>\n");
+		} else if (numBullets < m_numlistlevel) {
+			for (; m_numlistlevel > numBullets; m_numlistlevel--)
+				buf.append("</OL>\n");
+		}
+
+		buf.append("<LI>");
+
+		return buf.toString();
+
+	}
+
+	private int countChars(PushbackReader in, char c) throws IOException {
+		int count = 0;
+		int ch;
+
+		while ((ch = in.read()) != -1) {
+			if ((char) ch == c) {
+				count++;
+			} else {
+				in.unread(ch);
+				break;
+			}
+		}
+
+		return count;
+	}
+
+	private String handleBar(boolean newLine) throws IOException {
+		StringBuffer sb = new StringBuffer();
+
+		if (!m_istable && !newLine) {
+			return "|";
+		}
+
+		if (newLine) {
+			if (!m_istable) {
+				sb.append("<TABLE>\n");
+				m_istable = true;
+			}
+
+			sb.append("<TR>");
+			m_closeTag = "</TD></TR>";
+		}
+
+		int ch = nextToken();
+
+		if (ch == '|') {
+			if (!newLine) {
+				sb.append("</TH>");
+			}
+			sb.append("<TH>");
+			m_closeTag = "</TH></TR>";
+		} else {
+			if (!newLine) {
+				sb.append("</TD>");
+			}
+			sb.append("<TD>");
+			pushBack(ch);
+		}
+
+		return sb.toString();
+	}
+
+	private String handleDefinitionList() throws IOException {
+		if (!m_isdefinition) {
+			m_isdefinition = true;
+
+			m_closeTag = "{quote}";
+
+			return "{quote:title=";
+		}
+
+		return ";";
+	}
+
+	private String handleBackslash() throws IOException {
+		int ch = nextToken();
+
+		if (ch == '\\') {
+			int ch2 = nextToken();
+
+			if (ch2 == '\\') {
+				int ch3 = nextToken();
+
+				if (ch3 == '\\') {
+					// TODO handle backbackslash
+					// return "<p style='page-break-before: always' />";
+				}
+
+				pushBack(ch3);
+
+				// TODO page break for printer
+				return "\\";
+			}
+
+			pushBack(ch2);
+
+			return "\n";
+		}
+
+		pushBack(ch);
+
+		return "\\";
+	}
+
+	private String handleOpenbracket() throws IOException {
+		StringBuffer sb = new StringBuffer();
+		int ch;
+		boolean isPlugin = false;
+
+		while ((ch = nextToken()) == '[') {
+			sb.append((char) ch);
+		}
+
+		if (sb.length() > 0) {
+			return sb.toString();// not a link
+		}
+
+		//
+		// Find end of hyperlink
+		//
+		pushBack(ch);
+		ch = nextToken();
+
+		while (ch != -1) {
+			if (ch == ']')// && (!isPlugin || sb.charAt( sb.length()-1 ) ==
+			// '}'
+			// ) )
+			{
+				break;
+			}
+
+			sb.append((char) ch);
+
+			ch = nextToken();
+		}
+
+		if (ch == -1) {
+
+			return sb.toString();
+		}
+
+		return handleHyperlinks(sb.toString());
+	}
+
+	private String handleOpenbrace() throws IOException {
+		int ch = nextToken();
+		String res = "{";
+
+		if (ch == '{') {
+			int ch2 = nextToken();
+
+			if (ch2 == '{') {
+				res = "{code}";
+				m_isPre = true;
+			} else {
+				pushBack(ch2);
+				// TODO <TT> truetype
+				res = "{font:courier new}";
+				m_isTypedText = true;
+			}
+		} else {
+			pushBack(ch);
+		}
+
+		return res;
+	}
+
+	/**
+	 * Handles both }} and }}}
+	 */
+	private String handleClosebrace() throws IOException {
+		String res = "}";
+
+		int ch2 = nextToken();
+
+		if (ch2 == '}') {
+			int ch3 = nextToken();
+
+			if (ch3 == '}') {
+				if (m_isPre) {
+					m_isPre = false;
+					res = "{code}";
+				} else {
+					res = "}}}";
+				}
+			} else {
+				pushBack(ch3);
+				// TODO truetype
+				if (!m_isPre) {
+					res = "{font}";
+					m_isTypedText = false;
+				} else {
+					pushBack(ch2);
+				}
+			}
+		} else {
+			pushBack(ch2);
+		}
+
+		return res;
+	}
+
+	/**
+	 * Returns true if the link is really command to insert a plugin.
+	 * <P>
+	 * Currently we just check if the link starts with "{INSERT", or just plain
+	 * "{" but not "{$".
+	 * 
+	 * @author Janne Jalkanen
+	 * 
+	 * @param link
+	 *            Link text, i.e. the contents of text between [].
+	 * @return True, if this link seems to be a command to insert a plugin here.
+	 */
+	public static boolean isPluginLink(String link) {
+		return link.startsWith("{INSERT")
+				|| (link.startsWith("{") && !link.startsWith("{$"));
+	}
+
+	/**
+	 * method to create links for external pages of Wiki pages
+	 * 
+	 * @param string
+	 * @return the HTML link representation of the wiki page/external link
+	 * @author Rali Genova
+	 */
+	private String handleHyperlinks(String link) {
+		String result = "";
+		String text = "";
+		String wikiPage = "";
+
+		if (isPluginLink(link)) {
+			// return null; // we do not include plugin links for now
+			// TODO make those CS macros
+			try {
+				logFile.write("Unknown inside plugin: " + link + " in page "
+						+ pageName + "\n");
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+			return link;
+		}
+		int border = link.indexOf('|');
+		if (border != -1) // [text|link] case
+		{
+			text = link.substring(0, border);
+			link = link.substring(border + 1);
+
+		} else // [link] case
+		{
+			if (!isExternalLink(link)) {
+				text = cleanLink(link);
+			} else {
+				text = link;
+			}
+		}
+
+		/*
+		 * can't be longer then 255 chars if (text.length() > 255) {
+		 * System.out.println("Text longer !"); text = text.substring(0, 254); }
+		 * 
+		 * if (link.length() > 255) { System.out.println("Link longer !"); }
+		 */
+
+		// external link
+		if (isExternalLink(link)) {
+			if (checkImageLink(link)) {
+				result = "!" + link + "!";// external
+				try {
+					logFile.write("Check image " + link + " in page "
+							+ pageName + "\n");
+				} catch (IOException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+				// image
+			} else
+				result = "[" + text + "|" + link + "]";
+		}
+		// internal link
+		else {
+			// check if a footnote
+			if (link.startsWith("#"))// footnote reference
+			{// TODO handle footnote def
+				// http://labs.jboss.com/JSPWiki/Wiki.jsp?page=TextFormattingRules#ref-TextFormattingRules-1
+				result = "{FOOTNOTE RED " + link + " " + text + "}";
+
+			} else if (isNumber(link))// defines footnote
+			{// TODO handle footnote ref
+				result = "{FOOTNOTE DEF " + link + " " + text + "}";
+			}
+
+			// check if not an image link as well
+			else if (checkImageLink(link)) {
+				result = "!" + link + "!";
+				try {
+					logFile.write("Check image " + link + " in page "
+							+ pageName + "\n");
+				} catch (IOException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+
+			}
+			// check for attachments later on //TODO handle attachments
+			else {
+
+				/*
+				 * wikiPage = wikiEngine.getRealName(cleanLink(link), wPage
+				 * .getLangCode()); if (wikiEngine.pageExists(wikiPage,
+				 * wPage.getLangCode())) { result = "<a href=\"" + portalHome +
+				 * wikiHome + page + wikiPage + language + wPage.getLangCode() +
+				 * "\">" + text + "</a>"; } else result = "<u>" + text + "</u>" + "<a
+				 * href=\"" + portalHome + wikiHome + page + wikiPage + language +
+				 * wPage.getLangCode() + "\">" + "?" + "</a>";
+				 */
+				return "[" + text + "|" + linkDict.get(link) + "]";
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	 * Figures out if a link is an off-site link. This recognizes the most
+	 * common protocols by checking how it starts. (clears all white space in
+	 * case the link starts with '\n' or [space]
+	 * 
+	 * @author Janne Jalkanen
+	 */
+	public static boolean isExternalLink(String link) {
+		link = link.trim();
+		return link.startsWith("http:") || link.startsWith("ftp:")
+				|| link.startsWith("https:") || link.startsWith("mailto:")
+				|| link.startsWith("news:") || link.startsWith("file:");
+	}
+
+	private int nextToken() throws IOException {
+		return m_in.read();
+	}
+
+	/**
+	 * Push back any character to the current input. Does not push back a read
+	 * EOF, though.
+	 */
+
+	/**
+	 * Cleans a Wiki name.
+	 * <P>[ This is a link ] -&gt; ThisIsALink
+	 * 
+	 * @param link
+	 *            Link to be cleared. Null is safe, and causes this to return
+	 *            null.
+	 * @return A cleaned link.
+	 * 
+	 * @since 2.0
+	 * @author Janne Jalkanen
+	 */
+	public static String cleanLink(String link) {
+		StringBuffer clean = new StringBuffer();
+
+		if (link == null)
+			return null;
+
+		//
+		// Compress away all whitespace and capitalize
+		// all words in between.
+		//
+
+		StringTokenizer st = new StringTokenizer(link, " -");
+
+		while (st.hasMoreTokens()) {
+			StringBuffer component = new StringBuffer(st.nextToken());
+
+			component.setCharAt(0, Character.toUpperCase(component.charAt(0)));
+
+			//
+			// We must do this, because otherwise compiling on JDK 1.4 causes
+			// a downwards incompatibility to JDK 1.3.
+			//
+			clean.append(component.toString());
+		}
+
+		//
+		// Remove non-alphanumeric characters that should not
+		// be put inside WikiNames. Note that all valid
+		// Unicode letters are considered okay for WikiNames.
+		// It is the problem of the WikiPageProvider to take
+		// care of actually storing that information.
+		//
+
+		for (int i = 0; i < clean.length(); i++) {
+			if ((clean.charAt(i) != '/')
+					&& !(Character.isLetterOrDigit(clean.charAt(i))
+							|| clean.charAt(i) == '_' || clean.charAt(i) == '.')) {
+				clean.deleteCharAt(i);
+				--i; // We just shortened this buffer.
+			}
+		}
+
+		//
+		// Capitalise words in subpages
+		//
+
+		for (int i = 0; i < clean.length() - 1; i++) {
+			if ((clean.charAt(i) == '/')
+					&& (Character.isLowerCase(clean.charAt(i + 1)))) {
+				clean.setCharAt(i + 1, Character.toUpperCase(clean
+						.charAt(i + 1)));
+			}
+		}
+
+		return clean.toString();
+	}
+
+	/**
+	 * Returns true, if the argument contains a number, otherwise false. In a
+	 * quick test this is roughly the same speed as Integer.parseInt() if the
+	 * argument is a number, and roughly ten times the speed, if the argument is
+	 * NOT a number.
+	 */
+
+	public static boolean isNumber(String s) {
+		if (s == null)
+			return false;
+
+		if (s.length() > 1 && s.charAt(0) == '-')
+			s = s.substring(1);
+
+		for (int i = 0; i < s.length(); i++) {
+			if (!Character.isDigit(s.charAt(i)))
+				return false;
+		}
+
+		return true;
+	}
+
+	// not sure what it is supposed to do but neccessary to compile
+	public void next() {
+	}
+
+	public void initTranslator() {
+		m_allowHTML = true;
+		m_isbold = false;
+		m_isitalic = false;
+		m_isTypedText = false;
+		m_istable = false;
+		m_isPre = false;
+		m_isdefinition = false;
+		m_listlevel = 0;
+		m_numlistlevel = 0;
+		m_camelCaseLinks = true; // camelCase enabled
+		/** Tag that gets closed at EOL. */
+		m_closeTag = null;
+
+		mediaPatterns = ".png , .jpeg, .jpg , .gif , .bmp";
+	}
+
+	public String parse(String pageName, String pageContent,
+			Map<String, String> linkDict, Map<String, String> linkDictRev,
+			FileWriter logFile) throws IOException {
+
+		this.linkDict = linkDict;
+		this.linkDictRev = linkDictRev;
+		this.logFile = logFile;
+		this.pageName = pageName;
+
+		initTranslator();
+
+		String replace = parseLinks(pageContent);
+
+		return replace;
+
+	}
+
+	protected boolean executePlugins() {
+		return true;
+	}
+
+}

Copied: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupWikiTranslator.java (from rev 23342, labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupWikiTranslator.java)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupWikiTranslator.java	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/JSP2CSMarkupWikiTranslator.java	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,1087 @@
+/**************************************************
+ *                                                *
+ *  JBoss Labs: Creating Professional Open Source *
+ *                                                *
+ *   Distributable under LGPL license.            *
+ *   See terms of license at gnu.org.             *
+ *                                                *
+ *************************************************/
+
+/*
+ Copyright (C) 2005  Damon Sicore,
+ Rali Genova,
+ Tomasz Szymanski,
+ Adam Warski,
+ JBoss, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+ */
+
+/**
+ * Portions of this work are based on the work
+ * of Janne Jalkanen of the JSPWiki project. 
+ * 
+ * Marked Portions are Copyright (C) 2001-2002 Janne Jalkanen (Janne.Jalkanen at iki.fi)
+ *
+ * Those portions are marked by the 'author' javadoc tag
+ * and list Janne Jalkanen as the author of that method.
+ * 
+ * This class is based on the JSPWiki 2.0 version
+ * of the TranslatorReader.java class.  The original 
+ * version of that class can be found here:
+ * 
+ * http://anonsvn.labs.jboss.com/branches/forge/archives/jspwiki/src/com/ecyrd/jspwiki/TranslatorReader.java
+ * 
+ */
+package org.jboss.labs.clearspace;
+
+/**
+ * @author <a href="mailto:rali.genova at jboss.org">Rali Genova </a>
+ * @author <a href="mailto:tomasz.szymanski at jboss.org">Tomasz Szymanski </a>
+ * 
+ */
+import java.io.*;
+import java.util.regex.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.apache.log4j.Logger;
+import org.jboss.wiki.WikiCommon;
+import org.jboss.wiki.WikiPage;
+import org.jboss.wiki.WikiPlugin;
+import org.jboss.wiki.WikiSession;
+import org.jboss.wiki.configuration.ConfigurationParser;
+
+public class JSP2CSMarkupWikiTranslator {
+
+	private Logger log;
+
+	private static String mediaPatterns;
+
+	/* formatting variables */
+
+	private boolean m_allowHTML = true;
+
+	private boolean m_isbold = false;
+
+	private boolean m_isitalic = false;
+
+	private boolean m_isTypedText = false;
+
+	private boolean m_istable = false;
+
+	private boolean m_isPre = false;
+
+	private boolean m_isdefinition = false;
+
+	private int m_listlevel = 0;
+
+	private int m_numlistlevel = 0;
+
+	private boolean m_camelCaseLinks = true; // camelCase enabled
+
+	/** Tag that gets closed at EOL. */
+	private String m_closeTag = null;
+
+	/** Allow this many characters to be pushed back in the stream. */
+	private static final int PUSHBACK_BUFFER_SIZE = 8;
+
+	/**
+	 * These characters constitute word separators when trying to find CamelCase
+	 * links.
+	 */
+	private static final String WORD_SEPARATORS = ",.|:;+=&";
+
+	private PushbackReader m_in;
+
+	// stores the name of the wiki page we are currently processing
+	private String pageName = "";
+
+	private Map<String, String> linkDictRev;
+
+	private Map<String, String> linkDict;
+
+	private FileWriter logFile;
+
+	public JSP2CSMarkupWikiTranslator() {
+
+	}
+
+	/**
+	 * Push back any character to the current input. Does not push back a read
+	 * EOF, though.
+	 * 
+	 * @author Janne Jalkanen
+	 */
+	private void pushBack(int c) throws IOException {
+		if (c != -1) {
+			m_in.unread(c);
+		}
+	}
+
+	/**
+	 * Wiki to HTML transformation method, plain URIs transformation not
+	 * implemented
+	 * 
+	 * @param page
+	 *            The String representation of a wiki page's content
+	 * @return The final transformed into HTML string
+	 * @author Janne Jalkanen
+	 * @author Rali Genova
+	 */
+	public String parseLinks(String page) throws IOException {
+		m_in = new PushbackReader(new StringReader(page), PUSHBACK_BUFFER_SIZE);
+		StringBuffer buf = new StringBuffer();
+		StringBuffer word = null;
+		int previousCh = -2;
+		int start = 0;
+		boolean quitReading = false;
+		boolean newLine = true; // FIXME: not true if reading starts in middle
+		// of buffer
+
+		while (!quitReading) {
+			int ch = nextToken();
+			String s = null;
+
+			// begin of HTML transformation
+			if (m_isPre) {
+				if (ch == '}') {
+					buf.append(handleClosebrace());
+					/*
+					 * } else if (ch == '<') { buf.append("&lt;"); } else if
+					 * (ch == '>') { buf.append("&gt;");
+					 */
+				} else if (ch == -1) {
+					quitReading = true;
+				} else {
+					buf.append((char) ch);
+				}
+
+				continue;
+			}
+			/*
+			 * CamelCase detection, a non-trivial endeavour. We keep track of
+			 * all white-space separated entities, which we hereby refer to as
+			 * "words". We then check for an existence of a CamelCase format
+			 * text string inside the "word", and if one exists, we replace it
+			 * with a proper link.
+			 */
+
+			if (m_camelCaseLinks) {
+				// Quick parse of start of a word boundary.
+
+				if (word == null
+						&& (Character.isWhitespace((char) previousCh)
+								|| WORD_SEPARATORS.indexOf((char) previousCh) != -1 || newLine)
+						&& !Character.isWhitespace((char) ch)) {
+					word = new StringBuffer();
+				}
+
+				// Are we currently tracking a word?
+				if (word != null) {
+					//
+					// Check for the end of the word.
+					//
+
+					// We don't want automatic link creation
+					/*
+					 * if (Character.isWhitespace((char) ch) || ch == -1 ||
+					 * WORD_SEPARATORS.indexOf((char) ch) != -1) { String
+					 * potentialLink = word.toString();
+					 * 
+					 * String camelCase = parseCamelCase(potentialLink);
+					 * 
+					 * if (camelCase != null) { start =
+					 * buf.toString().lastIndexOf(camelCase); buf.replace(start,
+					 * start + camelCase.length(), handleHyperlinks(camelCase)); } //
+					 * We've ended a word boundary, so time to reset. word =
+					 * null; } else {
+					 */
+					// This should only be appending letters and digits.
+					word.append((char) ch);
+					// } // if end of word
+				} // if word's not null
+
+				// Always set the previous character to test for word starts.
+				previousCh = ch;
+
+			} // if m_camelCaseLinks
+			//
+			// Check if any lists need closing down.
+			//
+
+			if (newLine && ch != '*' && ch != ' ' && m_listlevel > 0) {
+				buf.append("</LI>\n");
+				for (; m_listlevel > 0; m_listlevel--) {
+					buf.append("</UL>\n");
+				}
+			}
+
+			if (newLine && ch != '#' && ch != ' ' && m_numlistlevel > 0) {
+				buf.append("</LI>\n");
+				for (; m_numlistlevel > 0; m_numlistlevel--) {
+					buf.append("</OL>\n");
+				}
+			}
+
+			if (newLine && ch != '|' && m_istable) {
+				// buf.append("</table>{code}\n");
+				m_istable = false;
+				m_closeTag = null;
+			}
+
+			switch (ch) {
+			case '\r':
+				// DOS linefeeds we forget
+				s = null;
+				break;
+
+			case '\n':
+				//
+				// Close things like headings, etc.
+				//
+				if (m_closeTag != null) {
+					buf.append(m_closeTag);
+					m_closeTag = null;
+				}
+
+				m_isdefinition = false;
+
+				if (newLine) {
+					// Paragraph change.
+
+					buf.append("\n");
+				} else {
+					buf.append("\n");
+					newLine = true;
+				}
+				/*
+				 * wiki syntax handling, later to be refactored so multiple wiki
+				 * syntax is supported
+				 */
+
+				break;
+			case '\\':
+				s = handleBackslash();
+				break;
+
+			case '_':
+				s = handleUnderscore();
+				break;
+
+			case '\'':
+				s = handleApostrophe();
+				break;
+
+			case '{':
+				s = handleOpenbrace();
+				break;
+
+			case '}':
+				s = handleClosebrace();
+				break;
+
+			case '-':
+				s = handleDash();
+				break;
+
+			case '!':
+				if (newLine) {
+					s = handleHeading();
+				} else {
+					s = "!";
+				}
+				break;
+
+			case ';':
+				if (newLine) {
+					s = handleDefinitionList();
+				} else {
+					s = ";";
+				}
+				break;
+
+			case ':':
+				if (m_isdefinition) {
+					s = "}";
+					m_isdefinition = false;
+				} else {
+					s = ":";
+				}
+				break;
+
+			case '[':
+				s = handleOpenbracket();
+				break;
+
+			case '*':
+				if (newLine) {
+					int chn = nextToken();
+					buf.append("*");
+
+					if (chn != '*') {
+						buf.append(" ");
+					}
+
+					if (chn != ' ') {
+						pushBack(chn);
+					}
+				}
+				break;
+
+			case '#':
+				if (newLine) {
+					int chn = nextToken();
+					buf.append("#");
+
+					if (chn != '#') {
+						buf.append(" ");
+					}
+
+					if (chn != ' ') {
+						pushBack(chn);
+					}
+				}
+				break;
+
+			case '|':
+				s = handleBar(newLine);
+				break;
+
+			case '<':
+				s = m_allowHTML ? "<" : "&lt;";
+				break;
+
+			case '>':
+				s = m_allowHTML ? ">" : "&gt;";
+				break;
+
+			case '\"':
+				s = m_allowHTML ? "\"" : "&quot;";
+				break;
+
+			case '~':
+				s = handleTilde();
+				break;
+			case -1:
+				quitReading = true;
+				break;
+
+			default:
+				buf.append((char) ch);
+				newLine = false;
+				break;
+			}
+			if (s != null) {
+				buf.append(s);
+
+				newLine = false;
+			}
+
+		}
+
+		return buf.toString();
+	}
+
+	/**
+	 * @param link -
+	 *            potential camel case link to be tested
+	 * @return the string itself if not a camel case, and a proper link
+	 *         otherwise
+	 * @author Rali Genova
+	 * @author Janne Jalkanen
+	 */
+	public static String parseCamelCase(String link) {
+		String camelCasepattern = "^([^\\p{Alnum}]*|\\~)([\\p{Upper}]+[\\p{Lower}]+[\\p{Upper}]+[\\p{Alnum}]*)[^\\p{Alnum}]*$";
+		Pattern camelCase = Pattern.compile(camelCasepattern);
+		Matcher camelMatch = camelCase.matcher(link);
+		if (camelMatch.matches()) {
+			String result = camelMatch.group(2); // get the camel case words
+			if (camelMatch.group(1) != null) {
+				if ((camelMatch.group(1).equals("~"))
+						|| (camelMatch.group(1).indexOf('[') != -1)) {
+					return null; // this is camelCase escape or [...] link
+				}
+			}
+			return result;
+
+		}// if match
+		return null;
+	}
+
+	/* a collection of all media formats allowed on wiki */
+	private static Collection getImagePatterns() {
+		ArrayList patt = new ArrayList();
+		String imagepattern = mediaPatterns;
+		String[] elem = imagepattern.split(",");
+		for (int i = 0; i < elem.length; i++) {
+			patt.add(elem[i].trim());
+		}
+
+		return patt;
+	}
+
+	public static boolean checkImageLink(String text) {
+		ArrayList ptrns = (ArrayList) getImagePatterns();
+		for (int i = 0; i < ptrns.size(); i++) {
+			if (text.endsWith((String) ptrns.get(i))) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	/**
+	 * Generic escape of next character or entity.
+	 */
+	private String handleTilde() throws IOException {
+		int ch = nextToken();
+
+		if (ch == '|')
+			return "|";
+
+		if (Character.isUpperCase((char) ch)) {
+			return String.valueOf((char) ch);
+		}
+
+		// No escape.
+		pushBack(ch);
+
+		return "~";
+	}
+
+	private String handleUnderscore() throws IOException {
+		int ch = nextToken();
+		String res = "_";
+
+		if (ch == '_') {
+			res = m_isbold ? "*" : "*";
+			m_isbold = !m_isbold;
+		} else {
+			pushBack(ch);
+		}
+
+		return res;
+	}
+
+	/**
+	 * For example: italics.
+	 */
+	private String handleApostrophe() throws IOException {
+		int ch = nextToken();
+		String res = "'";
+
+		if (ch == '\'') {
+			res = m_isitalic ? "+" : "+";
+			m_isitalic = !m_isitalic;
+		} else {
+			m_in.unread(ch);
+		}
+
+		return res;
+	}
+
+	private String handleDash() throws IOException {
+		int ch = nextToken();
+
+		if (ch == '-') {
+			int ch2 = nextToken();
+
+			if (ch2 == '-') {
+				int ch3 = nextToken();
+
+				if (ch3 == '-') {
+					// Empty away all the rest of the dashes.
+					// Do not forget to return the first non-match back.
+					while ((ch = nextToken()) == '-')
+						;
+
+					pushBack(ch);
+					return "-----";
+				}
+
+				pushBack(ch3);
+			}
+			pushBack(ch2);
+		}
+
+		pushBack(ch);
+
+		return "-";
+	}
+
+	private String handleHeading() throws IOException {
+		StringBuffer buf = new StringBuffer();
+
+		int ch = nextToken();
+
+		if (ch == '!') {
+			int ch2 = nextToken();
+
+			if (ch2 == '!') {
+				buf.append("h2. ");
+				m_closeTag = "";
+			} else {
+				buf.append("h3. ");
+				m_closeTag = "";
+				pushBack(ch2);
+			}
+		} else {
+			buf.append("h4. ");
+			m_closeTag = "";
+			pushBack(ch);
+		}
+
+		return buf.toString();
+	}
+
+	// TODO handle list
+	private String handleUnorderedList() throws IOException {
+		StringBuffer buf = new StringBuffer();
+
+		if (m_listlevel > 0) {
+			buf.append("</LI>\n");
+		}
+
+		int numBullets = countChars(m_in, '*') + 1;
+
+		if (numBullets > m_listlevel) {
+			for (; m_listlevel < numBullets; m_listlevel++)
+				buf.append("<UL>\n");
+		} else if (numBullets < m_listlevel) {
+			for (; m_listlevel > numBullets; m_listlevel--)
+				buf.append("</UL>\n");
+		}
+
+		buf.append("<LI>");
+
+		return buf.toString();
+	}
+
+	// TODO handle list
+	private String handleOrderedList() throws IOException {
+		StringBuffer buf = new StringBuffer();
+
+		if (m_numlistlevel > 0) {
+			buf.append("</LI>\n");
+		}
+
+		int numBullets = countChars(m_in, '#') + 1;
+
+		if (numBullets > m_numlistlevel) {
+			for (; m_numlistlevel < numBullets; m_numlistlevel++)
+				buf.append("<OL>\n");
+		} else if (numBullets < m_numlistlevel) {
+			for (; m_numlistlevel > numBullets; m_numlistlevel--)
+				buf.append("</OL>\n");
+		}
+
+		buf.append("<LI>");
+
+		return buf.toString();
+
+	}
+
+	private int countChars(PushbackReader in, char c) throws IOException {
+		int count = 0;
+		int ch;
+
+		while ((ch = in.read()) != -1) {
+			if ((char) ch == c) {
+				count++;
+			} else {
+				in.unread(ch);
+				break;
+			}
+		}
+
+		return count;
+	}
+
+	private String handleBar(boolean newLine) throws IOException {
+		// StringBuffer sb = new StringBuffer();
+
+		if (!m_istable && !newLine) {
+			return "|";
+		}
+
+		if (newLine) {
+			if (!m_istable) {
+				// sb.append("{code:html}<table>\n");
+				m_istable = true;
+			}
+
+			// sb.append("<tr>");
+			// m_closeTag = "</td></tr>";
+			m_closeTag = "|";
+		}
+
+		int ch = nextToken();
+
+		if (ch == '|') {
+			if (!newLine) {
+				// sb.append("</th>");
+			}
+			// sb.append("<th>");
+			// m_closeTag = "</th></tr>";
+			m_closeTag = "||";
+
+			return "||";
+		} /*
+			 * else if (ch == '\n') { // new line after bars - do not add them
+			 * again m_closeTag = null; pushBack(ch); }
+			 */
+		else {
+			if (!newLine) {
+				// sb.append("</td>");
+			}
+			// sb.append("<td>");
+			pushBack(ch);
+		}
+
+		// return sb.toString();
+		return "|";
+	}
+
+	private String handleDefinitionList() throws IOException {
+		if (!m_isdefinition) {
+			m_isdefinition = true;
+
+			m_closeTag = "{quote}";
+
+			return "{quote:title=";
+		}
+
+		return ";";
+	}
+
+	private String handleBackslash() throws IOException {
+		int ch = nextToken();
+
+		if (ch == '\\') {
+			int ch2 = nextToken();
+
+			if (ch2 == '\\') {
+				int ch3 = nextToken();
+
+				if (ch3 == '\\') {
+					// TODO handle backbackslash
+					// return "<p style='page-break-before: always' />";
+				}
+
+				pushBack(ch3);
+
+				// TODO page break for printer
+				return "\\";
+			}
+
+			pushBack(ch2);
+
+			return "\n";
+		}
+
+		pushBack(ch);
+
+		return "\\";
+	}
+
+	private String handleOpenbracket() throws IOException {
+		StringBuffer sb = new StringBuffer();
+		int ch;
+		boolean isPlugin = false;
+
+		while ((ch = nextToken()) == '[') {
+			sb.append((char) ch);
+		}
+
+		if (sb.length() > 0) {
+			return sb.toString();// not a link
+		}
+
+		//
+		// Find end of hyperlink
+		//
+		pushBack(ch);
+		ch = nextToken();
+
+		while (ch != -1) {
+			if (ch == ']')// && (!isPlugin || sb.charAt( sb.length()-1 ) ==
+			// '}'
+			// ) )
+			{
+				break;
+			}
+
+			sb.append((char) ch);
+
+			ch = nextToken();
+		}
+
+		if (ch == -1) {
+
+			return sb.toString();
+		}
+
+		return handleHyperlinks(sb.toString());
+	}
+
+	private String handleOpenbrace() throws IOException {
+		int ch = nextToken();
+		String res = "{";
+
+		if (ch == '{') {
+			int ch2 = nextToken();
+
+			if (ch2 == '{') {
+				res = "{code}";
+				m_isPre = true;
+			} else {
+				pushBack(ch2);
+				// TODO <TT> truetype
+				res = "{font:courier new}";
+				m_isTypedText = true;
+			}
+		} else {
+			pushBack(ch);
+		}
+
+		return res;
+	}
+
+	/**
+	 * Handles both }} and }}}
+	 */
+	private String handleClosebrace() throws IOException {
+		String res = "}";
+
+		int ch2 = nextToken();
+
+		if (ch2 == '}') {
+			int ch3 = nextToken();
+
+			if (ch3 == '}') {
+				if (m_isPre) {
+					m_isPre = false;
+					res = "{code}";
+				} else {
+					res = "}}}";
+				}
+			} else {
+				pushBack(ch3);
+				// TODO truetype
+				if (!m_isPre) {
+					res = "{font}";
+					m_isTypedText = false;
+				} else {
+					pushBack(ch2);
+				}
+			}
+		} else {
+			pushBack(ch2);
+		}
+
+		return res;
+	}
+
+	/**
+	 * Returns true if the link is really command to insert a plugin.
+	 * <P>
+	 * Currently we just check if the link starts with "{INSERT", or just plain
+	 * "{" but not "{$".
+	 * 
+	 * @author Janne Jalkanen
+	 * 
+	 * @param link
+	 *            Link text, i.e. the contents of text between [].
+	 * @return True, if this link seems to be a command to insert a plugin here.
+	 */
+	public static boolean isPluginLink(String link) {
+		return link.startsWith("{INSERT")
+				|| (link.startsWith("{") && !link.startsWith("{$"));
+	}
+
+	/**
+	 * method to create links for external pages of Wiki pages
+	 * 
+	 * @param string
+	 * @return the HTML link representation of the wiki page/external link
+	 * @author Rali Genova
+	 */
+	private String handleHyperlinks(String link) {
+		String result = "";
+		String text = "";
+		String wikiPage = "";
+
+		if (isPluginLink(link)) {
+			// return null; // we do not include plugin links for now
+			// TODO make those CS macros
+			try {
+				logFile.write("Unknown inside plugin: " + link + " in page "
+						+ pageName + "\n");
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+			// return link;
+
+			// do not show the link
+			return "";
+		}
+		int border = link.indexOf('|');
+		if (border != -1) // [text|link] case
+		{
+			text = link.substring(0, border);
+			link = link.substring(border + 1);
+
+		} else // [link] case
+		{
+			if (!isExternalLink(link)) {
+				text = cleanLink(link);
+			} else {
+				text = link;
+			}
+		}
+
+		/*
+		 * can't be longer then 255 chars if (text.length() > 255) {
+		 * System.out.println("Text longer !"); text = text.substring(0, 254); }
+		 * 
+		 * if (link.length() > 255) { System.out.println("Link longer !"); }
+		 */
+
+		// external link
+		if (isExternalLink(link)) {
+			if (checkImageLink(link)) {
+				result = "!" + link + "!";// external
+				try {
+					logFile.write("Check image " + link + " in page "
+							+ pageName + "\n");
+				} catch (IOException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+				// image
+			} else
+				result = "[" + text + "|" + link + "]";
+		}
+		// internal link
+		else {
+			// check if a footnote
+			if (link.startsWith("#"))// footnote reference
+			{// TODO handle footnote def
+				// http://labs.jboss.com/JSPWiki/Wiki.jsp?page=TextFormattingRules#ref-TextFormattingRules-1
+				result = "{FOOTNOTE RED " + link + " " + text + "}";
+
+			} else if (isNumber(link))// defines footnote
+			{// TODO handle footnote ref
+				result = "{FOOTNOTE DEF " + link + " " + text + "}";
+			}
+
+			// check if not an image link as well
+			else if (checkImageLink(link)) {
+				result = "!" + link + "!";
+				try {
+					logFile.write("Check image " + link + " in page "
+							+ pageName + "\n");
+				} catch (IOException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+
+			}
+			// check for attachments later on //TODO handle attachments
+			else {
+
+				/*
+				 * wikiPage = wikiEngine.getRealName(cleanLink(link), wPage
+				 * .getLangCode()); if (wikiEngine.pageExists(wikiPage,
+				 * wPage.getLangCode())) { result = "<a href=\"" + portalHome +
+				 * wikiHome + page + wikiPage + language + wPage.getLangCode() +
+				 * "\">" + text + "</a>"; } else result = "<u>" + text + "</u>" + "<a
+				 * href=\"" + portalHome + wikiHome + page + wikiPage + language +
+				 * wPage.getLangCode() + "\">" + "?" + "</a>";
+				 */
+				if (linkDict.get(cleanLink(link)) != null) {
+					return "[" + text + "|" + linkDict.get(cleanLink(link))
+							+ "]";
+				} else {
+					return "[" + text + "|" + link + "]";
+				}
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	 * Figures out if a link is an off-site link. This recognizes the most
+	 * common protocols by checking how it starts. (clears all white space in
+	 * case the link starts with '\n' or [space]
+	 * 
+	 * @author Janne Jalkanen
+	 */
+	public static boolean isExternalLink(String link) {
+		link = link.trim();
+		return link.startsWith("http:") || link.startsWith("ftp:")
+				|| link.startsWith("https:") || link.startsWith("mailto:")
+				|| link.startsWith("news:") || link.startsWith("file:");
+	}
+
+	private int nextToken() throws IOException {
+		return m_in.read();
+	}
+
+	/**
+	 * Push back any character to the current input. Does not push back a read
+	 * EOF, though.
+	 */
+
+	/**
+	 * Cleans a Wiki name.
+	 * <P>[ This is a link ] -&gt; ThisIsALink
+	 * 
+	 * @param link
+	 *            Link to be cleared. Null is safe, and causes this to return
+	 *            null.
+	 * @return A cleaned link.
+	 * 
+	 * @since 2.0
+	 * @author Janne Jalkanen
+	 */
+	public static String cleanLink(String link) {
+		StringBuffer clean = new StringBuffer();
+
+		if (link == null)
+			return null;
+
+		//
+		// Compress away all whitespace and capitalize
+		// all words in between.
+		//
+
+		StringTokenizer st = new StringTokenizer(link, " -");
+
+		while (st.hasMoreTokens()) {
+			StringBuffer component = new StringBuffer(st.nextToken());
+
+			component.setCharAt(0, Character.toUpperCase(component.charAt(0)));
+
+			//
+			// We must do this, because otherwise compiling on JDK 1.4 causes
+			// a downwards incompatibility to JDK 1.3.
+			//
+			clean.append(component.toString());
+		}
+
+		//
+		// Remove non-alphanumeric characters that should not
+		// be put inside WikiNames. Note that all valid
+		// Unicode letters are considered okay for WikiNames.
+		// It is the problem of the WikiPageProvider to take
+		// care of actually storing that information.
+		//
+
+		for (int i = 0; i < clean.length(); i++) {
+			if ((clean.charAt(i) != '/')
+					&& !(Character.isLetterOrDigit(clean.charAt(i))
+							|| clean.charAt(i) == '_' || clean.charAt(i) == '.')) {
+				clean.deleteCharAt(i);
+				--i; // We just shortened this buffer.
+			}
+		}
+
+		//
+		// Capitalise words in subpages
+		//
+
+		for (int i = 0; i < clean.length() - 1; i++) {
+			if ((clean.charAt(i) == '/')
+					&& (Character.isLowerCase(clean.charAt(i + 1)))) {
+				clean.setCharAt(i + 1, Character.toUpperCase(clean
+						.charAt(i + 1)));
+			}
+		}
+
+		return clean.toString();
+	}
+
+	/**
+	 * Returns true, if the argument contains a number, otherwise false. In a
+	 * quick test this is roughly the same speed as Integer.parseInt() if the
+	 * argument is a number, and roughly ten times the speed, if the argument is
+	 * NOT a number.
+	 */
+
+	public static boolean isNumber(String s) {
+		if (s == null)
+			return false;
+
+		if (s.length() > 1 && s.charAt(0) == '-')
+			s = s.substring(1);
+
+		for (int i = 0; i < s.length(); i++) {
+			if (!Character.isDigit(s.charAt(i)))
+				return false;
+		}
+
+		return true;
+	}
+
+	// not sure what it is supposed to do but neccessary to compile
+	public void next() {
+	}
+
+	public void initTranslator() {
+		m_allowHTML = true;
+		m_isbold = false;
+		m_isitalic = false;
+		m_isTypedText = false;
+		m_istable = false;
+		m_isPre = false;
+		m_isdefinition = false;
+		m_listlevel = 0;
+		m_numlistlevel = 0;
+		m_camelCaseLinks = true; // camelCase enabled
+		/** Tag that gets closed at EOL. */
+		m_closeTag = null;
+
+		mediaPatterns = ".png , .jpeg, .jpg , .gif , .bmp";
+	}
+
+	public String parse(String pageName, String pageContent,
+			Map<String, String> linkDict, Map<String, String> linkDictRev,
+			FileWriter logFile) throws IOException {
+
+		this.linkDict = linkDict;
+		this.linkDictRev = linkDictRev;
+		this.logFile = logFile;
+		this.pageName = pageName;
+
+		initTranslator();
+
+		String replace = parseLinks(pageContent);
+
+		return replace;
+
+	}
+
+	protected boolean executePlugins() {
+		return true;
+	}
+
+}

Deleted: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/migration-howto.txt
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/migration-howto.txt	2008-08-26 11:36:55 UTC (rev 21907)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/migration-howto.txt	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1,21 +0,0 @@
-Clearspace Migration HOWTO
-
-INSTALLATION
-0. Install CS
-1. Build and install nukes login from labs-3.0-build/integration
-2. Build JBossWiki with maven all
-3. Point your cs installation in jbosswiki/wiki-common/build.xml
-4. Run ant in jbosswiki/wiki-common
-
-RUNING
-1. Install clearspace
-2. create db with default charset utf default collate utf8_general_ci (//TODO)
-3. setup cs with db created. IMPORTANT make sure max_packet setting in MySQL is set to something more then default
-4. Change number of max attachments in clearspace settings (from 5 to something reasonable) and switch off indexing
-5. run sql-script.txt (change db name if needed)
-ALTER TABLE `cslabs`.`jiveWikiLink` MODIFY COLUMN `targetText` LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL;
-6. set envirnment MIGRATE to true export MIGRATE=true
-7. run clearspace, login -> migration will start
-8. Stop clearspace, run generated sql script in mysql (see clearspace log) versions_and_users-${DATE}.sql
-9. remove MIGRATE env from environment. start clearspace. check the migration
-10. Rebuild search index in admin console

Copied: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/migration-howto.txt (from rev 21907, labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/migration-howto.txt)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/migration-howto.txt	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/migration-howto.txt	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1,21 @@
+Clearspace Migration HOWTO
+
+INSTALLATION
+0. Install CS
+1. Build and install nukes login from labs-3.0-build/integration
+2. Build JBossWiki with maven all
+3. Point your cs installation in jbosswiki/wiki-common/build.xml
+4. Run ant in jbosswiki/wiki-common
+
+RUNING
+1. Install clearspace
+2. create db with default charset utf default collate utf8_general_ci (//TODO)
+3. setup cs with db created. IMPORTANT make sure max_packet setting in MySQL is set to something more then default
+4. Change number of max attachments in clearspace settings (from 5 to something reasonable) and switch off indexing
+5. run sql-script.txt (change db name if needed)
+ALTER TABLE `cslabs`.`jiveWikiLink` MODIFY COLUMN `targetText` LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL;
+6. set envirnment MIGRATE to true export MIGRATE=true
+7. run clearspace, login -> migration will start
+8. Stop clearspace, run generated sql script in mysql (see clearspace log) versions_and_users-${DATE}.sql
+9. remove MIGRATE env from environment. start clearspace. check the migration
+10. Rebuild search index in admin console

Deleted: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/sql-script.txt
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/sql-script.txt	2008-08-26 11:36:55 UTC (rev 21907)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/sql-script.txt	2008-10-07 14:13:57 UTC (rev 23348)
@@ -1 +0,0 @@
-ALTER TABLE `cs`.`jiveWikiLink` MODIFY COLUMN `targetText` LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL;

Copied: labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/sql-script.txt (from rev 21907, labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/sql-script.txt)
===================================================================
--- labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/sql-script.txt	                        (rev 0)
+++ labs/jbosslabs/qa/portal-extensions/jbosswiki/wiki-common/src/java-migration/org/jboss/labs/clearspace/sql-script.txt	2008-10-07 14:13:57 UTC (rev 23348)
@@ -0,0 +1 @@
+ALTER TABLE `cs`.`jiveWikiLink` MODIFY COLUMN `targetText` LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL;

Modified: labs/jbosslabs/qa/portal-extensions/portal-default/src/web/WEB-INF/default-object.xml
===================================================================
--- labs/jbosslabs/qa/portal-extensions/portal-default/src/web/WEB-INF/default-object.xml	2008-10-07 13:00:21 UTC (rev 23347)
+++ labs/jbosslabs/qa/portal-extensions/portal-default/src/web/WEB-INF/default-object.xml	2008-10-07 14:13:57 UTC (rev 23348)
@@ -280,7 +280,7 @@
 		<if-exists>overwrite</if-exists>
 		<parent-ref>default</parent-ref>
 		<page>
-			<page-name>community</page-name>
+			<page-name>help</page-name>
 	         <properties>
 				<!-- Set the emptyRenderer for this page -->
 				<property>




More information about the jboss-svn-commits mailing list