You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2012/12/03 20:16:32 UTC
[13/18] ISIS-188: new quickstart examples
http://git-wip-us.apache.org/repos/asf/isis/blob/289171a6/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/WEB-INF/persistor_datanucleus.properties
----------------------------------------------------------------------
diff --git a/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/WEB-INF/persistor_datanucleus.properties b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/WEB-INF/persistor_datanucleus.properties
new file mode 100644
index 0000000..fd264f9
--- /dev/null
+++ b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/WEB-INF/persistor_datanucleus.properties
@@ -0,0 +1,111 @@
+# 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.
+
+#
+# configuration file for the JDO objectstore
+#
+
+isis.persistor.datanucleus.impl.javax.jdo.PersistenceManagerFactoryClass=org.datanucleus.api.jdo.JDOPersistenceManagerFactory
+isis.persistor.datanucleus.impl.datanucleus.autoCreateSchema=true
+isis.persistor.datanucleus.impl.datanucleus.validateTables=true
+isis.persistor.datanucleus.impl.datanucleus.validateConstraints=true
+
+
+# L2 cache (on by default)
+isis.persistor.datanucleus.impl.datanucleus.cache.level2.type=none
+
+#see http://www.datanucleus.org/products/datanucleus/jdo/transaction_types.html#optimistic
+isis.persistor.datanucleus.impl.datanucleus.persistenceByReachabilityAtCommit=false
+
+
+
+
+
+#############################################################################
+# JDBC connection details
+# (also update the pom.xml to reference the appropriate JDBC driver)
+#############################################################################
+
+#
+# HSQLDB in-memory
+#
+isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=org.hsqldb.jdbcDriver
+isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:hsqldb:mem:test
+isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
+isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
+
+#
+# HSQLDB in-memory (using log4jdbc-remix)
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:log4jdbc:hsqldb:mem:test
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
+
+
+
+#
+# HSQLDB to file
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=org.hsqldb.jdbcDriver
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:hsqldb:file:/tmp/isis-todo-app/hsql-db;hsqldb.write_delay=false;shutdown=true
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
+
+#
+# HSQLDB to file (using log4jdbc-remix)
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:log4jdbc:hsqldb:file:/tmp/isis-todo-app/hsql-db;hsqldb.write_delay=false;shutdown=true
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
+
+
+
+#
+# PostgreSQL Server
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=org.postgresql.Driver
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:postgresql://localhost:5432/isis
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=isis
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=isis
+
+#
+# PostgreSQL Server (using log4jdbc-remix)
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:log4jdbc:postgresql://localhost:5432/isis
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=isis
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=isis
+
+
+
+#
+# MS SQL Server
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:sqlserver://127.0.0.1:1433;instance=SQLEXPRESS;databaseName=jdo
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=jdo
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=jdopass
+
+#
+# MS SQL Server (using log4jdbc-remix)
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:log4jdbc:sqlserver://127.0.0.1:1433;instance=SQLEXPRESS;databaseName=jdo
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=jdo
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=jdopass
http://git-wip-us.apache.org/repos/asf/isis/blob/289171a6/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/WEB-INF/viewer_restfulobjects.properties
----------------------------------------------------------------------
diff --git a/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/WEB-INF/viewer_restfulobjects.properties b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/WEB-INF/viewer_restfulobjects.properties
new file mode 100644
index 0000000..b9300de
--- /dev/null
+++ b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/WEB-INF/viewer_restfulobjects.properties
@@ -0,0 +1,25 @@
+# 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.
+
+#
+# configuration file for the Restful Objects viewer
+#
+
+
+#
+# (intentionally empty)
+#
http://git-wip-us.apache.org/repos/asf/isis/blob/289171a6/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/WEB-INF/web.xml b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..697a2db
--- /dev/null
+++ b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<web-app id="WebApp_ID" 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">
+
+ <display-name>Apache Isis Webapp</display-name>
+
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+
+ <context-param>
+ <param-name>deploymentType</param-name>
+ <!--
+ <param-value>SERVER</param-value>
+ -->
+ <param-value>SERVER_EXPLORATION</param-value>
+ </context-param>
+
+
+
+ <!--
+ -
+ -
+ - config common to all viewer(s)
+ -
+ -
+ -->
+
+ <!-- bootstrap the Isis metamodel and runtime -->
+ <listener>
+ <listener-class>org.apache.isis.runtimes.dflt.webapp.IsisWebAppBootstrapper</listener-class>
+ </listener>
+
+ <!-- which (optional) configuration file(s) to load -->
+ <context-param>
+ <param-name>isis.viewers</param-name>
+ <param-value>restfulobjects</param-value>
+ </context-param>
+
+
+ <!-- which configuration directory to read overloaded property files from -->
+ <!--
+ Normally configuration like this should be done from outside your web
+ application. Especially if your configuration is not know in advance or
+ if it can change depending on where the application gets deployed.
+
+ For instance to configure this in Tomcat outside the application WAR add
+ the following line to your application context ( For more detail see:
+ http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Context_Parameters )
+
+ <Parameter name="isis.config.dir" value="/usr/local/tomcat/conf/"
+ override="true"/>
+
+ If your configuration directory is fixed you can enable the following
+ context parameter in here and forget about the outside part.
+
+ <context-param>
+ <param-name>isis.config.dir</param-name>
+ <param-value>location of your config directory if fixed</param-value>
+ </context-param>
+ -->
+
+ <!-- cache static resources for 1 day -->
+ <filter>
+ <filter-name>ResourceCachingFilter</filter-name>
+ <filter-class>org.apache.isis.core.webapp.content.ResourceCachingFilter</filter-class>
+ <init-param>
+ <param-name>CacheTime</param-name>
+ <param-value>86400</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>ResourceCachingFilter</filter-name>
+ <url-pattern>*.js</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>ResourceCachingFilter</filter-name>
+ <url-pattern>*.css</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>ResourceCachingFilter</filter-name>
+ <url-pattern>*.png</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>ResourceCachingFilter</filter-name>
+ <url-pattern>*.jpg</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>ResourceCachingFilter</filter-name>
+ <url-pattern>*.gif</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>ResourceCachingFilter</filter-name>
+ <url-pattern>*.html</url-pattern>
+ </filter-mapping>
+
+ <servlet>
+ <servlet-name>Resource</servlet-name>
+ <servlet-class>org.apache.isis.core.webapp.content.ResourceServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Resource</servlet-name>
+ <url-pattern>*.css</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Resource</servlet-name>
+ <url-pattern>*.png</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Resource</servlet-name>
+ <url-pattern>*.jpg</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Resource</servlet-name>
+ <url-pattern>*.gif</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Resource</servlet-name>
+ <url-pattern>*.js</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Resource</servlet-name>
+ <url-pattern>*.html</url-pattern>
+ </servlet-mapping>
+
+
+
+
+
+ <!--
+ -
+ -
+ - config specific to the restfulobjects-viewer
+ -
+ -
+ -->
+
+ <!-- bootstrap the RestEasy framework -->
+ <listener>
+ <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
+ </listener>
+
+ <!-- used by RestEasy to determine the JAX-RS resources and other related configuration -->
+ <context-param>
+ <param-name>javax.ws.rs.Application</param-name>
+ <param-value>org.apache.isis.viewer.restfulobjects.viewer.RestfulObjectsApplication</param-value>
+ </context-param>
+
+ <!-- authenticate user, set up an Isis session -->
+ <filter>
+ <filter-name>IsisSessionFilterForRestfulObjects</filter-name>
+ <filter-class>org.apache.isis.runtimes.dflt.webapp.IsisSessionFilter</filter-class>
+ <!-- authentication required for REST -->
+ <init-param>
+ <param-name>authenticationSessionStrategy</param-name>
+ <param-value>org.apache.isis.viewer.restfulobjects.viewer.authentication.AuthenticationSessionStrategyBasicAuth</param-value>
+ </init-param>
+ <init-param>
+ <!-- what to do if no session was found; we indicate to issue a 401 basic authentication challenge -->
+ <param-name>whenNoSession</param-name>
+ <param-value>basicAuthChallenge</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <!-- this is mapped to the entire app; however the IsisSessionFilter will "notice" if the session filter has already been
+ executed for the request pipeline, and if so will do nothing -->
+ <filter-name>IsisSessionFilterForRestfulObjects</filter-name>
+ <servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
+ </filter-mapping>
+
+
+ <servlet>
+ <servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
+ <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+
+</web-app>
http://git-wip-us.apache.org/repos/asf/isis/blob/289171a6/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/ajax-loader.png
----------------------------------------------------------------------
diff --git a/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/ajax-loader.png b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/ajax-loader.png
new file mode 100644
index 0000000..0973ae0
Binary files /dev/null and b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/ajax-loader.png differ
http://git-wip-us.apache.org/repos/asf/isis/blob/289171a6/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-18-black.png
----------------------------------------------------------------------
diff --git a/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-18-black.png b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-18-black.png
new file mode 100644
index 0000000..7739286
Binary files /dev/null and b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-18-black.png differ
http://git-wip-us.apache.org/repos/asf/isis/blob/289171a6/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-18-white.png
----------------------------------------------------------------------
diff --git a/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-18-white.png b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-18-white.png
new file mode 100644
index 0000000..f4e6787
Binary files /dev/null and b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-18-white.png differ
http://git-wip-us.apache.org/repos/asf/isis/blob/289171a6/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-36-black.png
----------------------------------------------------------------------
diff --git a/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-36-black.png b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-36-black.png
new file mode 100644
index 0000000..7469906
Binary files /dev/null and b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-36-black.png differ
http://git-wip-us.apache.org/repos/asf/isis/blob/289171a6/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-36-white.png
----------------------------------------------------------------------
diff --git a/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-36-white.png b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-36-white.png
new file mode 100644
index 0000000..3f342cc
Binary files /dev/null and b/examples/quickstart_wicket_restful_jdo/viewer-restfulobjects/src/main/webapp/jquery.mobile/images/icons-36-white.png differ