You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by ry...@apache.org on 2008/10/09 21:59:34 UTC
svn commit: r703241 - in /labs/droids/branch/LABS-144/depot/wicket: ./ lib/
lib/runtime/ src/conf/ src/java/org/ src/java/org/apache/
src/java/org/apache/droids/ src/java/org/apache/droids/wicket/
src/java/org/apache/droids/wicket/app/ src/java/org/apa...
Author: ryan
Date: Thu Oct 9 12:59:31 2008
New Revision: 703241
URL: http://svn.apache.org/viewvc?rev=703241&view=rev
Log:
adding content to wicket project
Added:
labs/droids/branch/LABS-144/depot/wicket/lib/cglib-2.1_3.jar (with props)
labs/droids/branch/LABS-144/depot/wicket/lib/runtime/
labs/droids/branch/LABS-144/depot/wicket/lib/runtime/jetty-6.1.12rc1.jar (with props)
labs/droids/branch/LABS-144/depot/wicket/lib/runtime/jetty-management-6.1.12rc1.jar (with props)
labs/droids/branch/LABS-144/depot/wicket/lib/runtime/jetty-util-6.1.12rc1.jar (with props)
labs/droids/branch/LABS-144/depot/wicket/lib/runtime/servlet-api-2.5-6.1.12rc1.jar (with props)
labs/droids/branch/LABS-144/depot/wicket/lib/spring-2.0.1.jar (with props)
labs/droids/branch/LABS-144/depot/wicket/lib/wicket-1.4-m3.jar (with props)
labs/droids/branch/LABS-144/depot/wicket/lib/wicket-ioc-1.4-m3.jar (with props)
labs/droids/branch/LABS-144/depot/wicket/lib/wicket-spring-1.4-m3.jar (with props)
labs/droids/branch/LABS-144/depot/wicket/src/conf/
labs/droids/branch/LABS-144/depot/wicket/src/conf/application.properties
labs/droids/branch/LABS-144/depot/wicket/src/conf/applicationContext.xml
labs/droids/branch/LABS-144/depot/wicket/src/conf/log4j.properties
labs/droids/branch/LABS-144/depot/wicket/src/java/org/
labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/
labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/
labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/
labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/
labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/BaseDroidsApplication.java
labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/DroidsApplication.java
labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/IndexPage.html
labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/IndexPage.java
labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/StartDroidsApp.java
labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/component/
labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/component/DroidPanel.html
labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/component/DroidPanel.java
labs/droids/branch/LABS-144/depot/wicket/src/test/org/
labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/
labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/
labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/
labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/
labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/BaseDroidsApplicationTest.java
labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/DroidsApplicationForTesting.java
labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/MockContext.java
labs/droids/branch/LABS-144/depot/wicket/src/webapp/
labs/droids/branch/LABS-144/depot/wicket/src/webapp/WEB-INF/
labs/droids/branch/LABS-144/depot/wicket/src/webapp/WEB-INF/web.xml
Removed:
labs/droids/branch/LABS-144/depot/wicket/lib/readme.txt
labs/droids/branch/LABS-144/depot/wicket/src/test/readme.txt
Modified:
labs/droids/branch/LABS-144/depot/wicket/ (props changed)
labs/droids/branch/LABS-144/depot/wicket/NOTICE.txt
Propchange: labs/droids/branch/LABS-144/depot/wicket/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Oct 9 12:59:31 2008
@@ -0,0 +1,3 @@
+.project
+.classpath
+log.txt
Modified: labs/droids/branch/LABS-144/depot/wicket/NOTICE.txt
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/NOTICE.txt?rev=703241&r1=703240&r2=703241&view=diff
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/NOTICE.txt (original)
+++ labs/droids/branch/LABS-144/depot/wicket/NOTICE.txt Thu Oct 9 12:59:31 2008
@@ -13,3 +13,47 @@
Other accompanying products do not require attribution, so are not listed.
------------------------------------------------------------------------
+
+==============================================================
+ Apache Wicket
+==============================================================
+ This product contains software developed in Apache Wicket,
+ released under the Apache Software License, Version 2.0.
+
+
+==============================================================
+ CGLib
+==============================================================
+ This product includes software developed by the CGLib Project
+ (http://cglib.sourceforge.net). Licensed under the
+ Apache Software License
+
+
+==============================================================
+ Jetty Web Container
+ Copyright 1995-2006 Mort Bay Consulting Pty Ltd
+==============================================================
+
+This product includes some software developed at The Apache Software
+Foundation (http://www.apache.org/).
+
+The javax.servlet package used by Jetty is copyright
+Sun Microsystems, Inc and Apache Software Foundation. It is
+distributed under the Common Development and Distribution License.
+You can obtain a copy of the license at
+https://glassfish.dev.java.net/public/CDDLv1.0.html.
+
+The UnixCrypt.java code ~Implements the one way cryptography used by
+Unix systems for simple password protection. Copyright 1996 Aki Yoshida,
+modified April 2001 by Iris Van den Broeke, Daniel Deville.
+
+The default JSP implementation is provided by the Glassfish JSP engine
+from project Glassfish http://glassfish.dev.java.net. Copyright 2005
+Sun Microsystems, Inc. and portions Copyright Apache Software Foundation.
+
+Some portions of the code are Copyright:
+ 2006 Tim Vernum
+ 1999 Jason Gilbert.
+
+The jboss integration module contains some LGPL code.
+
Added: labs/droids/branch/LABS-144/depot/wicket/lib/cglib-2.1_3.jar
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/lib/cglib-2.1_3.jar?rev=703241&view=auto
==============================================================================
Binary file - no diff available.
Propchange: labs/droids/branch/LABS-144/depot/wicket/lib/cglib-2.1_3.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: labs/droids/branch/LABS-144/depot/wicket/lib/runtime/jetty-6.1.12rc1.jar
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/lib/runtime/jetty-6.1.12rc1.jar?rev=703241&view=auto
==============================================================================
Binary file - no diff available.
Propchange: labs/droids/branch/LABS-144/depot/wicket/lib/runtime/jetty-6.1.12rc1.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: labs/droids/branch/LABS-144/depot/wicket/lib/runtime/jetty-management-6.1.12rc1.jar
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/lib/runtime/jetty-management-6.1.12rc1.jar?rev=703241&view=auto
==============================================================================
Binary file - no diff available.
Propchange: labs/droids/branch/LABS-144/depot/wicket/lib/runtime/jetty-management-6.1.12rc1.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: labs/droids/branch/LABS-144/depot/wicket/lib/runtime/jetty-util-6.1.12rc1.jar
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/lib/runtime/jetty-util-6.1.12rc1.jar?rev=703241&view=auto
==============================================================================
Binary file - no diff available.
Propchange: labs/droids/branch/LABS-144/depot/wicket/lib/runtime/jetty-util-6.1.12rc1.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: labs/droids/branch/LABS-144/depot/wicket/lib/runtime/servlet-api-2.5-6.1.12rc1.jar
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/lib/runtime/servlet-api-2.5-6.1.12rc1.jar?rev=703241&view=auto
==============================================================================
Binary file - no diff available.
Propchange: labs/droids/branch/LABS-144/depot/wicket/lib/runtime/servlet-api-2.5-6.1.12rc1.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: labs/droids/branch/LABS-144/depot/wicket/lib/spring-2.0.1.jar
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/lib/spring-2.0.1.jar?rev=703241&view=auto
==============================================================================
Binary file - no diff available.
Propchange: labs/droids/branch/LABS-144/depot/wicket/lib/spring-2.0.1.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: labs/droids/branch/LABS-144/depot/wicket/lib/wicket-1.4-m3.jar
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/lib/wicket-1.4-m3.jar?rev=703241&view=auto
==============================================================================
Binary file - no diff available.
Propchange: labs/droids/branch/LABS-144/depot/wicket/lib/wicket-1.4-m3.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: labs/droids/branch/LABS-144/depot/wicket/lib/wicket-ioc-1.4-m3.jar
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/lib/wicket-ioc-1.4-m3.jar?rev=703241&view=auto
==============================================================================
Binary file - no diff available.
Propchange: labs/droids/branch/LABS-144/depot/wicket/lib/wicket-ioc-1.4-m3.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: labs/droids/branch/LABS-144/depot/wicket/lib/wicket-spring-1.4-m3.jar
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/lib/wicket-spring-1.4-m3.jar?rev=703241&view=auto
==============================================================================
Binary file - no diff available.
Propchange: labs/droids/branch/LABS-144/depot/wicket/lib/wicket-spring-1.4-m3.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: labs/droids/branch/LABS-144/depot/wicket/src/conf/application.properties
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/conf/application.properties?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/conf/application.properties (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/conf/application.properties Thu Oct 9 12:59:31 2008
@@ -0,0 +1 @@
+jdbc.driver=xxx
\ No newline at end of file
Added: labs/droids/branch/LABS-144/depot/wicket/src/conf/applicationContext.xml
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/conf/applicationContext.xml?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/conf/applicationContext.xml (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/conf/applicationContext.xml Thu Oct 9 12:59:31 2008
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+ <!-- use system variables -->
+ <bean id="placeholderConfig"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="location"><value>classpath:application.properties</value></property>
+ <property name="systemPropertiesModeName"><value>SYSTEM_PROPERTIES_MODE_OVERRIDE</value></property>
+ </bean>
+
+ <!-- setup wicket application -->
+ <bean id="wicketApplication" class="org.apache.droids.wicket.app.DroidsApplication" />
+
+ <!-- DROIDS -->
+ <bean name="taskMaster"
+ class="org.apache.droids.impl.MultiThreadedTaskMaster">
+ <!--
+ <property name="delayTimer" ref="org.apache.droids.delay.SimpleDelayTimer"/>
+ -->
+ <property name="maxThreads" value="4"/>
+ </bean>
+
+ <bean name="taskQueue"
+ class="org.apache.droids.impl.SimpleTaskQueueWithHistory">
+ </bean>
+
+ <bean name="droid"
+ class="org.apache.droids.walker.WalkingDroid">
+ <constructor-arg ref="taskQueue" />
+ <constructor-arg ref="taskMaster" />
+ </bean>
+
+</beans>
Added: labs/droids/branch/LABS-144/depot/wicket/src/conf/log4j.properties
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/conf/log4j.properties?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/conf/log4j.properties (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/conf/log4j.properties Thu Oct 9 12:59:31 2008
@@ -0,0 +1,10 @@
+log4j.rootLogger=INFO, stdout
+
+log4j.logger.java.sql.Statement=DEBUG
+log4j.logger.java.sql.PreparedStatement=DEBUG
+log4j.logger.java.sql.ResultSet=DEBUG
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d %p %c - %m%n
+
Added: labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/BaseDroidsApplication.java
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/BaseDroidsApplication.java?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/BaseDroidsApplication.java (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/BaseDroidsApplication.java Thu Oct 9 12:59:31 2008
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.droids.wicket.app;
+
+import org.apache.wicket.Page;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
+import org.springframework.context.ApplicationContext;
+
+
+/**
+ * @author Kare Nuorteva
+ */
+public abstract class BaseDroidsApplication extends WebApplication
+{
+ @Override
+ public Class<? extends Page> getHomePage()
+ {
+ return IndexPage.class;
+ }
+
+ @Override
+ protected void init()
+ {
+ super.init();
+ addComponentInstantiationListener(new SpringComponentInjector(this, context()));
+
+ // add some paths... just for kicks...
+ mountBookmarkablePage( "xxx", IndexPage.class );
+ }
+
+ public abstract ApplicationContext context();
+}
Added: labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/DroidsApplication.java
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/DroidsApplication.java?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/DroidsApplication.java (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/DroidsApplication.java Thu Oct 9 12:59:31 2008
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.droids.wicket.app;
+
+import org.springframework.context.ApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+
+public class DroidsApplication extends BaseDroidsApplication
+{
+ @Override
+ public ApplicationContext context()
+ {
+ return WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
+ }
+}
Added: labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/IndexPage.html
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/IndexPage.html?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/IndexPage.html (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/IndexPage.html Thu Oct 9 12:59:31 2008
@@ -0,0 +1,11 @@
+<html>
+ <head>
+ <title>Hello Droids</title>
+ </head>
+ <body>
+ <h1>Hello Droids</h1>
+ <br/>
+ <div wicket:id="droid">[droids info]</div>
+ </body>
+</html>
+
Added: labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/IndexPage.java
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/IndexPage.java?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/IndexPage.java (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/IndexPage.java Thu Oct 9 12:59:31 2008
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.droids.wicket.app;
+
+import org.apache.droids.wicket.component.DroidPanel;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.WebPage;
+
+
+public class IndexPage extends WebPage
+{
+
+ /**
+ * Constructor that is invoked when page is invoked without a session.
+ *
+ * @param parameters
+ * Page parameters
+ */
+ public IndexPage(final PageParameters parameters)
+ {
+ add( new DroidPanel( "droid" ) );
+ }
+}
Added: labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/StartDroidsApp.java
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/StartDroidsApp.java?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/StartDroidsApp.java (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/app/StartDroidsApp.java Thu Oct 9 12:59:31 2008
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.droids.wicket.app;
+
+import org.mortbay.jetty.Connector;
+import org.mortbay.jetty.Server;
+import org.mortbay.jetty.nio.SelectChannelConnector;
+import org.mortbay.jetty.webapp.WebAppContext;
+
+public class StartDroidsApp
+{
+ public static void main(String[] args)
+ {
+ Server server = new Server();
+ SelectChannelConnector connector = new SelectChannelConnector();
+ connector.setPort(7233);
+ server.setConnectors(new Connector[] { connector });
+
+ WebAppContext web = new WebAppContext();
+ web.setContextPath("/");
+ web.setWar("src/webapp");
+ server.addHandler(web);
+
+ try
+ {
+ server.start();
+ server.join();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ System.exit(100);
+ }
+ }
+}
Added: labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/component/DroidPanel.html
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/component/DroidPanel.html?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/component/DroidPanel.html (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/component/DroidPanel.html Thu Oct 9 12:59:31 2008
@@ -0,0 +1,7 @@
+<wicket:panel>
+<ul>
+ <li>Droid: <span wicket:id="droid">[droid]</span></li>
+ <li>TaskQueue: <span wicket:id="queue">[droid]</span></li>
+ <li>TaskMaster: <span wicket:id="taskMaster">[droid]</span></li>
+</ul>
+</wicket:panel>
Added: labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/component/DroidPanel.java
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/component/DroidPanel.java?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/component/DroidPanel.java (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/java/org/apache/droids/wicket/component/DroidPanel.java Thu Oct 9 12:59:31 2008
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.droids.wicket.component;
+
+import org.apache.droids.api.Droid;
+import org.apache.droids.api.TaskMaster;
+import org.apache.droids.api.TaskQueue;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class DroidPanel extends Panel
+{
+ @SpringBean( name="droid" )
+ Droid droid;
+
+ @SpringBean( name="taskQueue" )
+ TaskQueue taskQueue;
+
+ @SpringBean( name="taskMaster" )
+ TaskMaster taskMaster;
+
+ public DroidPanel(String id) {
+ super(id);
+
+ add( new Label( "droid", droid.toString() ) );
+ add( new Label( "queue", taskQueue.toString() ) );
+ add( new Label( "taskMaster", taskMaster.toString() ) );
+ }
+}
Added: labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/BaseDroidsApplicationTest.java
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/BaseDroidsApplicationTest.java?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/BaseDroidsApplicationTest.java (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/BaseDroidsApplicationTest.java Thu Oct 9 12:59:31 2008
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.droids.wicket.app;
+
+import junit.framework.TestCase;
+
+
+public class BaseDroidsApplicationTest extends TestCase {
+ public void testHomePageShouldListContacts() throws Exception {
+ DroidsApplicationForTesting app = new DroidsApplicationForTesting();
+ assertEquals(IndexPage.class, app.getHomePage());
+ }
+}
Added: labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/DroidsApplicationForTesting.java
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/DroidsApplicationForTesting.java?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/DroidsApplicationForTesting.java (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/DroidsApplicationForTesting.java Thu Oct 9 12:59:31 2008
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.droids.wicket.app;
+
+import org.apache.wicket.protocol.http.HttpSessionStore;
+import org.apache.wicket.session.ISessionStore;
+import org.springframework.context.ApplicationContext;
+
+
+public class DroidsApplicationForTesting extends BaseDroidsApplication {
+ public final MockContext context = new MockContext();
+
+ @Override
+ public ApplicationContext context() {
+ return context;
+ }
+
+ @Override
+ protected ISessionStore newSessionStore() {
+ return new HttpSessionStore(this);
+ }
+}
Added: labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/MockContext.java
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/MockContext.java?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/MockContext.java (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/test/org/apache/droids/wicket/app/MockContext.java Thu Oct 9 12:59:31 2008
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.droids.wicket.app;
+
+import org.apache.wicket.injection.web.InjectorHolder;
+import org.apache.wicket.spring.ISpringContextLocator;
+import org.apache.wicket.spring.injection.annot.AnnotSpringInjector;
+import org.apache.wicket.spring.injection.annot.test.AnnotApplicationContextMock;
+import org.springframework.context.ApplicationContext;
+
+
+public class MockContext extends AnnotApplicationContextMock {
+ public MockContext() {
+ InjectorHolder.setInjector(new AnnotSpringInjector(
+ new ISpringContextLocator() {
+ public ApplicationContext getSpringContext() {
+ return MockContext.this;
+ }
+ }));
+ }
+}
\ No newline at end of file
Added: labs/droids/branch/LABS-144/depot/wicket/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/depot/wicket/src/webapp/WEB-INF/web.xml?rev=703241&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/depot/wicket/src/webapp/WEB-INF/web.xml (added)
+++ labs/droids/branch/LABS-144/depot/wicket/src/webapp/WEB-INF/web.xml Thu Oct 9 12:59:31 2008
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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>
+
+ <display-name>phonebook</display-name>
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>classpath:applicationContext.xml</param-value>
+ </context-param>
+
+
+ <!-- Enable the filters for Hibernate
+
+ <filter>
+ <filter-name>opensessioninview</filter-name>
+ <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
+ </filter>
+ -->
+
+ <filter>
+ <filter-name>wicket</filter-name>
+ <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+ <init-param>
+ <param-name>applicationFactoryClassName</param-name>
+ <param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value>
+ </init-param>
+ </filter>
+
+ <!-- Enable the filters for Hibernate
+ <filter-mapping>
+ <filter-name>opensessioninview</filter-name>
+ <url-pattern>/hibernate/*</url-pattern>
+ </filter-mapping>
+ -->
+
+ <filter-mapping>
+ <filter-name>wicket</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+</web-app>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org