Author: apetrelli
Date: Sat Sep 26 19:45:14 2009
New Revision: 819199

URL: http://svn.apache.org/viewvc?rev=819199&view=rev
Log:
TILES-457
Added modular Tiles listener.

Added:
    
tiles/framework/trunk/tiles-extras/src/main/java/org/apache/tiles/extras/module/ModularTilesListener.java
   (with props)
    
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/module/ModularTilesListenerTest.java
   (with props)

Added: 
tiles/framework/trunk/tiles-extras/src/main/java/org/apache/tiles/extras/module/ModularTilesListener.java
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-extras/src/main/java/org/apache/tiles/extras/module/ModularTilesListener.java?rev=819199&view=auto
==============================================================================
--- 
tiles/framework/trunk/tiles-extras/src/main/java/org/apache/tiles/extras/module/ModularTilesListener.java
 (added)
+++ 
tiles/framework/trunk/tiles-extras/src/main/java/org/apache/tiles/extras/module/ModularTilesListener.java
 Sat Sep 26 19:45:14 2009
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * 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.tiles.extras.module;
+
+import org.apache.tiles.startup.TilesInitializer;
+import org.apache.tiles.web.startup.AbstractTilesListener;
+
+/**
+ * Tiles listener that executes {...@link ModularTilesInitializer}.
+ *
+ * @version $Rev$ $Date$
+ * @since 2.2.1
+ */
+public class ModularTilesListener extends AbstractTilesListener {
+
+    /** {...@inheritdoc} */
+    @Override
+    protected TilesInitializer createTilesInitializer() {
+        return new ModularTilesInitializer();
+    }
+
+}

Propchange: 
tiles/framework/trunk/tiles-extras/src/main/java/org/apache/tiles/extras/module/ModularTilesListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tiles/framework/trunk/tiles-extras/src/main/java/org/apache/tiles/extras/module/ModularTilesListener.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/module/ModularTilesListenerTest.java
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/module/ModularTilesListenerTest.java?rev=819199&view=auto
==============================================================================
--- 
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/module/ModularTilesListenerTest.java
 (added)
+++ 
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/module/ModularTilesListenerTest.java
 Sat Sep 26 19:45:14 2009
@@ -0,0 +1,45 @@
+/*
+ * $Id$
+ *
+ * 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.tiles.extras.module;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests {...@link ModularTilesListener}.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ModularTilesListenerTest {
+
+    /**
+     * Test method for
+     * {...@link 
org.apache.tiles.extras.complete.ModularTilesListener#createTilesInitializer()}
+     * .
+     */
+    @Test
+    public void testCreateTilesInitializer() {
+        ModularTilesListener listener = new ModularTilesListener();
+        assertTrue(listener.createTilesInitializer() instanceof 
ModularTilesInitializer);
+    }
+}

Propchange: 
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/module/ModularTilesListenerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tiles/framework/trunk/tiles-extras/src/test/java/org/apache/tiles/extras/module/ModularTilesListenerTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL


Reply via email to