Author: scottbw
Date: Mon Nov  2 15:07:13 2009
New Revision: 831911

URL: http://svn.apache.org/viewvc?rev=831911&view=rev
Log:
Merging back in standalone branch

Added:
    incubator/wookie/trunk/ant/
      - copied from r831908, incubator/wookie/branches/standalone/ant/
    incubator/wookie/trunk/ant/ivy-common.xml
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/ant/ivy-common.xml
    incubator/wookie/trunk/ant/ivy-java-common.xml
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/ant/ivy-java-common.xml
    incubator/wookie/trunk/ant/ivy-webapp-common.xml
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/ant/ivy-webapp-common.xml
    incubator/wookie/trunk/ant/ivysettings.xml
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/ant/ivysettings.xml
    incubator/wookie/trunk/ant/lib/
      - copied from r831908, incubator/wookie/branches/standalone/ant/lib/
    incubator/wookie/trunk/ant/lib/commons-compress-1.0.jar
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/ant/lib/commons-compress-1.0.jar
    incubator/wookie/trunk/ant/lib/dwr-2.0.5.jar
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/ant/lib/dwr-2.0.5.jar
    incubator/wookie/trunk/ant/lib/htmlcleaner-2.1.0.jar
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/ant/lib/htmlcleaner-2.1.0.jar
    incubator/wookie/trunk/ant/lib/shindig-common-1.1-SNAPSHOT.jar
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/ant/lib/shindig-common-1.1-SNAPSHOT.jar
    incubator/wookie/trunk/build.properties
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/build.properties
    incubator/wookie/trunk/build.xml
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/build.xml
    incubator/wookie/trunk/etc/
      - copied from r831908, incubator/wookie/branches/standalone/etc/
    incubator/wookie/trunk/etc/jetty-realm.properties
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/etc/jetty-realm.properties
    incubator/wookie/trunk/ivy.xml
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/ivy.xml
    incubator/wookie/trunk/scripts/derby/
      - copied from r831908, incubator/wookie/branches/standalone/scripts/derby/
    incubator/wookie/trunk/scripts/derby/hibernate.cfg.xml
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/scripts/derby/hibernate.cfg.xml
    incubator/wookie/trunk/scripts/derby/widgetdb.sql
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/scripts/derby/widgetdb.sql
    incubator/wookie/trunk/scripts/mysql/
      - copied from r831908, incubator/wookie/branches/standalone/scripts/mysql/
    incubator/wookie/trunk/scripts/mysql/hibernate.cfg.xml
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/scripts/mysql/hibernate.cfg.xml
    incubator/wookie/trunk/scripts/mysql/widgetdb.sql
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/scripts/mysql/widgetdb.sql
    incubator/wookie/trunk/src/org/apache/wookie/server/Start.java
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/src/org/apache/wookie/server/Start.java
    incubator/wookie/trunk/src/org/apache/wookie/server/Stop.java
      - copied unchanged from r831908, 
incubator/wookie/branches/standalone/src/org/apache/wookie/server/Stop.java
Removed:
    incubator/wookie/trunk/WebContent/WEB-INF/lib/antlr-2.7.6.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/asm.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/cglib-2.1.3.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/commons-codec-1.3.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/commons-collections-3.2.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/commons-compress-1.0.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/commons-configuration-1.4.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/commons-fileupload-1.0.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/commons-httpclient-3.0.1.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/commons-lang-2.3.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/commons-logging.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/dom4j-1.6.1.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/dwr_v2.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/google-collections-0.8.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/htmlcleaner2_1.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/jdom.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/json-20070829.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/log4j-1.2.14.jar
    
incubator/wookie/trunk/WebContent/WEB-INF/lib/shindig-common-1.1-SNAPSHOT.jar
    incubator/wookie/trunk/WebContent/WEB-INF/lib/updates.txt
    incubator/wookie/trunk/scripts/widgetdb_mysql.sql
    incubator/wookie/trunk/src/hibernate.cfg.xml
Modified:
    incubator/wookie/trunk/.classpath
    incubator/wookie/trunk/.project
    incubator/wookie/trunk/.settings/org.eclipse.jdt.core.prefs
    
incubator/wookie/trunk/.settings/org.eclipse.wst.common.project.facet.core.xml
    incubator/wookie/trunk/WebContent/WEB-INF/web.xml
    incubator/wookie/trunk/WebContent/index.htm
    incubator/wookie/trunk/readme.txt
    
incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/AbstractControllerTest.java
    incubator/wookie/trunk/src/org/apache/wookie/beans/schema.hbm.xml
    incubator/wookie/trunk/src/org/apache/wookie/server/MainFilter.java
    incubator/wookie/trunk/src/org/apache/wookie/util/WidgetPackageUtils.java

Modified: incubator/wookie/trunk/.classpath
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/.classpath?rev=831911&r1=831910&r2=831911&view=diff
==============================================================================
--- incubator/wookie/trunk/.classpath (original)
+++ incubator/wookie/trunk/.classpath Mon Nov  2 15:07:13 2009
@@ -3,7 +3,8 @@
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="src" path="src-tests"/>
        <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-       <classpathentry kind="con" 
path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache
 Tomcat v5.5"/>
-       <classpathentry kind="con" 
path="org.eclipse.jst.j2ee.internal.web.container"/>
+       <classpathentry kind="con" 
path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;confs=*&amp;ivySettingsPath=file%3A%2FUsers%2Fscott%2FDocuments%2Fworkspace2%2Fwookie%2Fant%2Fivysettings.xml&amp;loadSettingsOnDemand=false&amp;propertyFiles="/>
+       <classpathentry kind="lib" path="ant/lib/htmlcleaner-2.1.0.jar"/>
+       <classpathentry kind="lib" 
path="ant/lib/shindig-common-1.1-SNAPSHOT.jar"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>

Modified: incubator/wookie/trunk/.project
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/.project?rev=831911&r1=831910&r2=831911&view=diff
==============================================================================
--- incubator/wookie/trunk/.project (original)
+++ incubator/wookie/trunk/.project Mon Nov  2 15:07:13 2009
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-       <name>org.tencompetence.widgetservice</name>
+       <name>Apache Wookie</name>
        <comment></comment>
        <projects>
        </projects>

Modified: incubator/wookie/trunk/.settings/org.eclipse.jdt.core.prefs
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/.settings/org.eclipse.jdt.core.prefs?rev=831911&r1=831910&r2=831911&view=diff
==============================================================================
--- incubator/wookie/trunk/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/wookie/trunk/.settings/org.eclipse.jdt.core.prefs Mon Nov  2 
15:07:13 2009
@@ -1,7 +1,12 @@
-#Mon Sep 10 15:46:25 BST 2007
+#Sat Aug 29 02:50:28 BST 2009
 eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
 org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.source=1.5

Modified: 
incubator/wookie/trunk/.settings/org.eclipse.wst.common.project.facet.core.xml
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/.settings/org.eclipse.wst.common.project.facet.core.xml?rev=831911&r1=831910&r2=831911&view=diff
==============================================================================
--- 
incubator/wookie/trunk/.settings/org.eclipse.wst.common.project.facet.core.xml 
(original)
+++ 
incubator/wookie/trunk/.settings/org.eclipse.wst.common.project.facet.core.xml 
Mon Nov  2 15:07:13 2009
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <faceted-project>
-  <runtime name="Apache Tomcat v5.5"/>
   <fixed facet="jst.web"/>
   <fixed facet="jst.java"/>
   <installed facet="jst.java" version="5.0"/>

Modified: incubator/wookie/trunk/WebContent/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/WebContent/WEB-INF/web.xml?rev=831911&r1=831910&r2=831911&view=diff
==============================================================================
--- incubator/wookie/trunk/WebContent/WEB-INF/web.xml (original)
+++ incubator/wookie/trunk/WebContent/WEB-INF/web.xml Mon Nov  2 15:07:13 2009
@@ -38,7 +38,7 @@
                        org.apache.wookie.server.MainFilter
                </filter-class>
        </filter>
-               
+       
        <filter-mapping>
                <filter-name>MainFilter</filter-name>
                <url-pattern>/*</url-pattern>

Modified: incubator/wookie/trunk/WebContent/index.htm
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/WebContent/index.htm?rev=831911&r1=831910&r2=831911&view=diff
==============================================================================
--- incubator/wookie/trunk/WebContent/index.htm (original)
+++ incubator/wookie/trunk/WebContent/index.htm Mon Nov  2 15:07:13 2009
@@ -1,3 +1,3 @@
 <script>
 window.location.href="/wookie/webmenu/WidgetWebMenuServlet?operation=INDEX";   
                                        
-</script>
\ No newline at end of file
+</script>

Modified: incubator/wookie/trunk/readme.txt
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/readme.txt?rev=831911&r1=831910&r2=831911&view=diff
==============================================================================
--- incubator/wookie/trunk/readme.txt (original)
+++ incubator/wookie/trunk/readme.txt Mon Nov  2 15:07:13 2009
@@ -5,17 +5,76 @@
 
 For more information see http://incubator.apache.org/projects/wookie.html
 
-The code uses an Apache 2.0 license; third party licenses can be found in the 
folder /licenses.
+======================
+IMPORTANT LEGAL NOTICE
+======================
 
-Wookie depends on several libraries with incompatible licenses. These must be 
downloaded and installed to build and run Wookie:
+Apache Wookie (Incubating) depends on several libraries that are licenced 
under open source licences that are incompatible with
+the Apache License. When you first build the project these will be downloaded 
automatically by the build system.
 
-- hibernate 3
-- jta
-- mysql-connector
-- c3p0
+Configuration
+=============
 
-For instructions on setting up Wookie under Tomcat, see readme_tomcat.txt. 
+There are some configuration options in build.properties, these are documented 
within the file itself.
 
-For instructions on setting up Wookie with CopperCore, see 
readme_coppercore.txt
+Building
+========
+
+You will need to download and install Apache Ant in order to build from 
source. See http://ant.apace.org
+
+Once installed run the following commands:
+
+cd PROJECT_HOME_DIRECTORY
+ant
+
+The first time you run this command all dependencies will be downloaded so you 
must be online and it will take some time. 
+Subsequent builds will be much faster.
+
+Running
+=======
+
+The following will compile any changed java files and run the webserver in 
demo mode, complete with an embedded database. 
+The database will be automatically updated at construction - do not use this 
approach in production.
+
+cd PROJECT_HOME_DIRECTORY
+ant run
+http://localhost:8080/wookie
+
+To access the administration menu (http://localhost:8080/wookie/admin) use the 
username 'java' and password 'java'.
+
+If you want to start with a completely clean build then use:
+
+ant clean-build run
+
+If you want to clean the database use:
+
+ant clean-db
+
+Deploying using Tomcat and MySQL
+================================
+
+The following will compile and run the server in Tomcat with a MySQL database. 
The database tables will be set up automatically, however you
+must have previously created a database called "widgetdb" with username "java" 
and password "java".
+
+cd PROJECT_HOME_DIRECTORY
+edit the "build.properties" file, uncommenting "project.using.mysql=true" and 
setting "servletEngine.webapp.dir=" to the location of your
+tomcat webapps directory.
+ant clean-build deploy-webapp
+
+To access the administration menu (http://localhost:8080/wookie/admin) use the 
username 'java' and password 'java'.
+
+If you want to start with a completely clean build then use:
+
+ant clean-build deploy-webapp
+
+If you want to clean the database use:
+
+ant clean-db
+
+Debugging
+=========
+
+To run the server in debug mode on a specific port use the wookie.jvmargs 
property, as follows:
+
+ant -Dwookie.jvmargs="-Xdebug 
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" run
 
-Problems - email [email protected]

Modified: 
incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/AbstractControllerTest.java
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/AbstractControllerTest.java?rev=831911&r1=831910&r2=831911&view=diff
==============================================================================
--- 
incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/AbstractControllerTest.java
 (original)
+++ 
incubator/wookie/trunk/src-tests/org/apache/wookie/tests/functional/AbstractControllerTest.java
 Mon Nov  2 15:07:13 2009
@@ -25,7 +25,7 @@
        protected static final String TEST_PARTICIPANTS_SERVICE_URL_VALID = 
"http://localhost:8080/wookie/participants";;
        protected static final String TEST_WIDGETS_SERVICE_URL_VALID = 
"http://localhost:8080/wookie/widgets";;
        
-       protected static final String API_KEY_VALID = "test";
+       protected static final String API_KEY_VALID = "TEST";
        protected static final String API_KEY_INVALID = "rubbish";
        protected static final String WIDGET_ID_VALID = 
"http://www.getwookie.org/widgets/natter";;
        protected static final String WIDGET_ID_INVALID = 
"http://www.getwookie.org/widgets/nosuchwidget";;

Modified: incubator/wookie/trunk/src/org/apache/wookie/beans/schema.hbm.xml
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/beans/schema.hbm.xml?rev=831911&r1=831910&r2=831911&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/beans/schema.hbm.xml (original)
+++ incubator/wookie/trunk/src/org/apache/wookie/beans/schema.hbm.xml Mon Nov  
2 15:07:13 2009
@@ -8,7 +8,7 @@
 
        <class name="Widget" table="Widget">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>
                <property name="widgetTitle" column="widget_title" 
type="string" />
                <property name="widgetDescription" column="widget_description" 
type="string" />
@@ -28,7 +28,7 @@
        
        <class name="WidgetType" table="WidgetType">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>
                <many-to-one name="widget" class="Widget" column="widget_id" 
not-null="true" />
                <property name="widgetContext" column="widget_context" 
type="string" />
@@ -36,7 +36,7 @@
        
        <class name="WidgetService" table="WidgetService">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>           
                <property name="serviceName" column="service_name" 
type="string" not-null="true"/>
        </class>
@@ -51,7 +51,7 @@
 
        <class name="ApiKey" table="ApiKey">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>
                <property name="value" column="value" type="string" />
                <property name="email" column="email" type="string" />
@@ -59,7 +59,7 @@
 
        <class name="WidgetInstance" table="WidgetInstance">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>           
                <property name="userId" not-null="true"/>                       
        
                <property name="sharedDataKey" not-null="true"/>                
                
@@ -76,7 +76,7 @@
 
        <class name="SharedData" table="SharedData">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>           
                <property name="sharedDataKey" column="sharedDataKey" 
index="sharedDataIndex" />                                
                <property name="dkey" />
@@ -86,7 +86,7 @@
        
        <class name="Preference" table="Preference">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>
                <many-to-one name="widgetInstance" class="WidgetInstance" 
column="widget_instance_id" not-null="true" />
                <property name="dkey" />
@@ -96,7 +96,7 @@
 
        <class name="Participant" table="Participant">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>
                <property name="widgetGuid" />
                <property name="sharedDataKey" />
@@ -107,7 +107,7 @@
        
        <class name="PreferenceDefault" table="PreferenceDefault">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>
                <property name="preference"/>
                <property name="value"/>        
@@ -117,14 +117,14 @@
                
        <class name="Whitelist" table="Whitelist">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>           
                <property name="fUrl" />                
        </class>
        
        <class name="Post" table="Post">
                <id name="id" column="id">
-            <generator class="native"/>
+            <generator class="increment"/>
         </id>               
         <property name="userId" column="user_id"></property>        
         <property name="parentId" column="parent_id"></property>        
@@ -137,7 +137,7 @@
      
      <class name="Feature" table="Feature">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>                   
                <property name="featureName" column="featureName" />
                <property name="required" type="true_false" />
@@ -150,7 +150,7 @@
        
        <class name="Param" table="Param">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>
                <many-to-one name="parentFeature" class="Feature" 
column="feature_id" not-null="true" />
                <property name="parameterName" column="parameterName" />        
@@ -159,7 +159,7 @@
        
        <class name="ServerFeature" table="ServerFeature">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>           
                <property name="className"/>
                <property name="featureName" />         
@@ -167,7 +167,7 @@
        
        <class name="Token" table="Token">
                <id name="id" column="id">
-                       <generator class="native" />
+                       <generator class="increment" />
                </id>           
                <property name="requestUrl"/>
                <property name="accessUrl" />   

Modified: incubator/wookie/trunk/src/org/apache/wookie/server/MainFilter.java
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/server/MainFilter.java?rev=831911&r1=831910&r2=831911&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/server/MainFilter.java 
(original)
+++ incubator/wookie/trunk/src/org/apache/wookie/server/MainFilter.java Mon Nov 
 2 15:07:13 2009
@@ -43,7 +43,7 @@
        public void doFilter(final ServletRequest request, final 
ServletResponse response, final FilterChain chain) 
        throws IOException, ServletException {
                request.setCharacterEncoding("UTF-8");
-               response.setContentType("text/xml;charset=\"UTF-8\"");
+               //response.setContentType("text/xml;charset=\"UTF-8\""); << 
screws up CSS and JS!
                /** Get a DBManager for this thread. */
                final IDBManager dbManager = DBManagerFactory.getDBManager();
                try {                                                   

Modified: 
incubator/wookie/trunk/src/org/apache/wookie/util/WidgetPackageUtils.java
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/util/WidgetPackageUtils.java?rev=831911&r1=831910&r2=831911&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/util/WidgetPackageUtils.java 
(original)
+++ incubator/wookie/trunk/src/org/apache/wookie/util/WidgetPackageUtils.java 
Mon Nov  2 15:07:13 2009
@@ -63,7 +63,7 @@
                String startFile = null;
                // Check for a custom start file
                if (widgetModel.getContent() != null) {
-                       if (widgetModel.getContent().getSrc() == null){
+                       if (widgetModel.getContent().getSrc() != null){
                                startFile = widgetModel.getContent().getSrc();
                                // Check that the specified custom start file 
exists
                                if (zip.getEntry(startFile)==null){
@@ -72,6 +72,7 @@
                                }
                        }
                }
+               
                // If no custom start file exists, look for defaults
                for (String s: START_FILES){
                        if (startFile == null && zip.getEntry(s)!=null){


Reply via email to