Author: craigmcc
Date: Sat Sep 30 10:10:01 2006
New Revision: 451616

URL: http://svn.apache.org/viewvc?view=rev&rev=451616
Log:
Rename "shale-test-core" to "shale-test-view" since it tests the view
controller functionality that is now migrated out of the core library.

SHALE-299

Added:
    shale/framework/trunk/shale-apps/shale-test-view/
      - copied from r451522, shale/framework/trunk/shale-apps/shale-test-core/
    shale/framework/trunk/shale-apps/shale-test-view/pom.xml
      - copied, changed from r451614, 
shale/framework/trunk/shale-apps/shale-test-core/pom.xml
    shale/framework/trunk/shale-apps/shale-test-view/src/
      - copied from r451614, 
shale/framework/trunk/shale-apps/shale-test-core/src/
    
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/
    
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Standard.java
   (with props)
    
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Status.java
   (with props)
Removed:
    shale/framework/trunk/shale-apps/shale-test-core/
    
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/core/Standard.java
    
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/core/Status.java
Modified:
    shale/framework/trunk/shale-apps/pom.xml
    
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/core/
   (props changed)
    
shale/framework/trunk/shale-apps/shale-test-view/src/main/webapp/WEB-INF/faces-config.xml

Modified: shale/framework/trunk/shale-apps/pom.xml
URL: 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/pom.xml?view=diff&rev=451616&r1=451615&r2=451616
==============================================================================
--- shale/framework/trunk/shale-apps/pom.xml (original)
+++ shale/framework/trunk/shale-apps/pom.xml Sat Sep 30 10:10:01 2006
@@ -262,7 +262,7 @@
         <module>shale-mailreader</module>
         <module>shale-usecases</module>
         <module>shale-clay-usecases</module>
-        <module>shale-test-core</module>
+        <module>shale-test-view</module>
     </modules>
 
     <build>

Copied: shale/framework/trunk/shale-apps/shale-test-view/pom.xml (from r451614, 
shale/framework/trunk/shale-apps/shale-test-core/pom.xml)
URL: 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-view/pom.xml?view=diff&rev=451616&p1=shale/framework/trunk/shale-apps/shale-test-core/pom.xml&r1=451614&p2=shale/framework/trunk/shale-apps/shale-test-view/pom.xml&r2=451616
==============================================================================
--- shale/framework/trunk/shale-apps/shale-test-core/pom.xml (original)
+++ shale/framework/trunk/shale-apps/shale-test-view/pom.xml Sat Sep 30 
10:10:01 2006
@@ -27,9 +27,9 @@
         <version>1.0.4-SNAPSHOT</version>
     </parent>
 
-    <artifactId>shale-test-core</artifactId>
+    <artifactId>shale-test-view</artifactId>
     <packaging>war</packaging>
-    <name>Shale Test App (Core Library)</name>
+    <name>Shale Test App (View Controller)</name>
 
     <dependencies>
 
@@ -77,18 +77,11 @@
 
         <dependency>
             <groupId>org.apache.shale</groupId>
-            <artifactId>shale-core</artifactId>
-            <version>${version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.shale</groupId>
             <artifactId>shale-test</artifactId>
             <version>${version}</version>
             <scope>test</scope>
         </dependency>
 
-        <!-- FIXME: Temporary until view controller stuff abstracted out -->
         <dependency>
             <groupId>org.apache.shale</groupId>
             <artifactId>shale-view</artifactId>

Propchange: 
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/core/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Sep 30 10:10:01 2006
@@ -0,0 +1,2 @@
+.LCKStandard.java~
+.LCKStatus.java~

Added: 
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Standard.java
URL: 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Standard.java?view=auto&rev=451616
==============================================================================
--- 
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Standard.java
 (added)
+++ 
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Standard.java
 Sat Sep 30 10:10:01 2006
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed 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.
+ *
+ * $Id$
+ */
+
+package org.apache.shale.examples.test.view;
+
+import javax.faces.context.FacesContext;
+import org.apache.shale.view.AbstractViewController;
+import org.apache.shale.view.faces.FacesConstants;
+
+/**
+ * <p>View Controller class for <code>/standard.jsp</code>.
+ * This class implements the <code>ViewController</code> interface,
+ * so it should receive lifecycle event callbacks.</p>
+ */
+public class Standard extends AbstractViewController {
+    
+
+    // ------------------------------------------------------ Instance 
Variables
+
+
+    /**
+     * <p>Sequence number for identifying order of event callbacks.</p>
+     */
+    private int sequence = 0;
+
+
+    // -------------------------------------------------------------- 
Properties
+
+
+    /**
+     * <p>Calling order for the init() method.</p>
+     */
+    private int initCalled = 0;
+
+    public int getInitCalled() {
+        return initCalled;
+    }
+
+
+    /**
+     * <p>Calling order for the preprocess() method.</p>
+     */
+    private int preprocessCalled = 0;
+
+    public int getPreprocessCalled() {
+        return preprocessCalled;
+    }
+
+
+    /**
+     * <p>Calling order for the prerender() method.</p>
+     */
+    private int prerenderCalled = 0;
+
+    public int getPrerenderCalled() {
+        return prerenderCalled;
+    }
+
+
+    /**
+     * <p>Calling order for the destroy() method.</p>
+     */
+    private int destroyCalled = 0;
+
+    public int getDestroyCalled() {
+        return destroyCalled;
+    }
+
+
+    // -------------------------------------------------------- Lifecycle 
Events
+
+
+    // Record the order in which each event was called
+
+    public void init() {
+        initCalled = ++sequence;
+    }
+
+    public void preprocess() {
+        preprocessCalled = ++sequence;
+    }
+
+    public void prerender() {
+        prerenderCalled = ++sequence;
+    }
+
+    public void destroy() {
+        destroyCalled = ++sequence;
+    }
+
+
+    // ------------------------------------------------------------- View 
Events
+
+
+    // Process a click on the resubmit link
+    public String resubmit() {
+        return null;
+    }
+
+
+}

Propchange: 
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Standard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Standard.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Status.java
URL: 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Status.java?view=auto&rev=451616
==============================================================================
--- 
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Status.java
 (added)
+++ 
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Status.java
 Sat Sep 30 10:10:01 2006
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed 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.
+ *
+ * $Id$
+ */
+
+package org.apache.shale.examples.test.view;
+
+import javax.faces.context.FacesContext;
+import org.apache.shale.view.AbstractViewController;
+import org.apache.shale.view.Constants;
+import org.apache.shale.view.faces.FacesConstants;
+
+/**
+ * <p>View Controller class for <code>/status.jsp</code>.</p>
+ */
+public class Status extends AbstractViewController {
+    
+
+    // -------------------------------------------------------------- 
Properties
+
+
+    /**
+     * <p>Return the class name of the attribute configured under name
+     * [EMAIL PROTECTED] FacesConstants.EXCEPTION_HANDLER}.</p>
+     */
+    public String getExceptionHandler() {
+        FacesContext context = FacesContext.getCurrentInstance();
+        Object result = context.getApplication().getVariableResolver().
+                resolveVariable(context, Constants.EXCEPTION_HANDLER);
+        if (result == null) {
+            return null;
+        } else {
+            return result.getClass().getName();
+        }
+    }
+
+
+    /**
+     * <p>Return the class name of the attribute configured under name
+     * [EMAIL PROTECTED] FacesConstants.VIEW_CALLBACKS}.</p>
+     */
+    public String getViewCallbacks() {
+        FacesContext context = FacesContext.getCurrentInstance();
+        Object result = context.getApplication().getVariableResolver().
+                resolveVariable(context, FacesConstants.VIEW_CALLBACKS);
+        if (result == null) {
+            return null;
+        } else {
+            return result.getClass().getName();
+        }
+    }
+
+
+    /**
+     * <p>Return the class name of the attribute configured under name
+     * [EMAIL PROTECTED] FacesConstants.VIEW_MAPPER}.</p>
+     */
+    public String getViewMapper() {
+        FacesContext context = FacesContext.getCurrentInstance();
+        Object result = context.getApplication().getVariableResolver().
+                resolveVariable(context, Constants.VIEW_MAPPER);
+        if (result == null) {
+            return null;
+        } else {
+            return result.getClass().getName();
+        }
+    }
+
+
+    // -------------------------------------------------------- Lifecycle 
Events
+
+
+}

Propchange: 
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Status.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
shale/framework/trunk/shale-apps/shale-test-view/src/main/java/org/apache/shale/examples/test/view/Status.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: 
shale/framework/trunk/shale-apps/shale-test-view/src/main/webapp/WEB-INF/faces-config.xml
URL: 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-view/src/main/webapp/WEB-INF/faces-config.xml?view=diff&rev=451616&r1=451614&r2=451616
==============================================================================
--- 
shale/framework/trunk/shale-apps/shale-test-view/src/main/webapp/WEB-INF/faces-config.xml
 (original)
+++ 
shale/framework/trunk/shale-apps/shale-test-view/src/main/webapp/WEB-INF/faces-config.xml
 Sat Sep 30 10:10:01 2006
@@ -49,7 +49,7 @@
     <managed-bean>
         <managed-bean-name>standard</managed-bean-name>
         <managed-bean-class>
-            org.apache.shale.examples.test.core.Standard
+            org.apache.shale.examples.test.view.Standard
         </managed-bean-class>
         <managed-bean-scope>request</managed-bean-scope>
     </managed-bean>
@@ -57,7 +57,7 @@
     <managed-bean>
         <managed-bean-name>status</managed-bean-name>
         <managed-bean-class>
-            org.apache.shale.examples.test.core.Status
+            org.apache.shale.examples.test.view.Status
         </managed-bean-class>
         <managed-bean-scope>request</managed-bean-scope>
     </managed-bean>


Reply via email to