continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r357186 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ resources/ resources/META-INF/plexus/ webapp/ webapp/WEB-INF/ webapp/decorators/
Date Fri, 16 Dec 2005 17:15:57 GMT
Author: evenisse
Date: Fri Dec 16 09:15:42 2005
New Revision: 357186

URL: http://svn.apache.org/viewcvs?rev=357186&view=rev
Log:
Prepare automatic redirection to continuum initialization page if it isn't configured

Added:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CheckConfigurationAction.java
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/webapp/initializeConfiguration.jsp   (with
props)
    maven/continuum/trunk/continuum-webapp/src/main/webapp/redirectToContinuumInitialization.jsp
  (with props)
Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/LoginAction.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/decorators.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/decorators/default.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/decorators/none.jsp

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CheckConfigurationAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CheckConfigurationAction.java?rev=357186&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CheckConfigurationAction.java
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CheckConfigurationAction.java
Fri Dec 16 09:15:42 2005
@@ -0,0 +1,37 @@
+package org.apache.maven.continuum.web.action;
+
+/*
+ * Copyright 2004-2005 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.
+ */
+
+import org.apache.maven.continuum.Continuum;
+
+import com.opensymphony.xwork.ActionSupport;
+
+public class CheckConfigurationAction
+    extends ActionSupport
+{
+    private Continuum continuum;
+
+    public String execute()
+    {
+        if ( !continuum.getConfiguration().isInitialized() )
+        {
+            return INPUT;
+        }
+
+        return SUCCESS;
+    }
+}

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CheckConfigurationAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CheckConfigurationAction.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/LoginAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/LoginAction.java?rev=357186&r1=357185&r2=357186&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/LoginAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/LoginAction.java
Fri Dec 16 09:15:42 2005
@@ -17,7 +17,6 @@
  */
 
 import com.opensymphony.xwork.ActionSupport;
-import org.codehaus.plexus.util.StringUtils;
 
 public class LoginAction
     extends ActionSupport

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml?rev=357186&r1=357185&r2=357186&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
Fri Dec 16 09:15:42 2005
@@ -8,6 +8,17 @@
 
     <component>
       <role>com.opensymphony.xwork.Action</role>
+      <role-hint>checkConfigurationAction</role-hint>
+      <implementation>org.apache.maven.continuum.web.action.CheckConfigurationAction</implementation>
+      <instantiation-strategy>per-lookup</instantiation-strategy>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.continuum.Continuum</role>
+        </requirement>
+      </requirements>
+    </component>
+    <component>
+      <role>com.opensymphony.xwork.Action</role>
       <role-hint>configurationAction</role-hint>
       <implementation>org.apache.maven.continuum.web.action.ConfigurationAction</implementation>
       <instantiation-strategy>per-lookup</instantiation-strategy>

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?rev=357186&r1=357185&r2=357186&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Fri Dec 16 09:15:42
2005
@@ -23,6 +23,10 @@
 
         <default-interceptor-ref name="defaultContinuumStack"/>
 
+        <action name="checkConfiguration"
+                class="checkConfigurationAction">
+            <result name="input">/redirectToContinuumInitialization.jsp</result>
+        </action>
         <action name="configuration"
                 class="configurationAction">
             <result name="input">configurationEdit.jsp</result>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/decorators.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/decorators.xml?rev=357186&r1=357185&r2=357186&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/decorators.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/decorators.xml Fri Dec
16 09:15:42 2005
@@ -1,7 +1,7 @@
 <decorators defaultdir="/decorators">
-    <!-- decorator name="none" page="none.jsp">
-        <pattern>/login*</pattern>
-    </decorator -->
+    <decorator name="none" page="none.jsp">
+        <pattern>/initializeConfiguration*</pattern>
+    </decorator>
     <decorator name="default" page="default.jsp">
         <pattern>/*</pattern>
     </decorator>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/decorators/default.jsp
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/decorators/default.jsp?rev=357186&r1=357185&r2=357186&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/decorators/default.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/decorators/default.jsp Fri Dec
16 09:15:42 2005
@@ -1,7 +1,9 @@
 <%@ taglib uri="sitemesh-decorator" prefix="decorator" %>
 <%@ taglib uri="webwork" prefix="ww" %>
+
 <html>
   <head>
+    <ww:action name="checkConfiguration" executeResult="true"/>
     <title><decorator:title/></title>
     <link rel="stylesheet" type="text/css" href="<ww:url value="/css/tigris.css"/>"
media="screen" />
     <link rel="stylesheet" type="text/css" href="<ww:url value="/css/print.css"/>"
media="print" />
@@ -32,4 +34,4 @@
 
     <ww:include value="/navigations/DefaultBottom.jsp"/>
   </body>
-</html>
\ No newline at end of file
+</html>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/decorators/none.jsp
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/decorators/none.jsp?rev=357186&r1=357185&r2=357186&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/decorators/none.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/decorators/none.jsp Fri Dec 16
09:15:42 2005
@@ -1,31 +1,32 @@
 <%@ taglib uri="sitemesh-decorator" prefix="decorator" %>
-<%@ taglib uri="webwork" prefix="ww" %>
+
 <html>
   <head>
     <title><decorator:title/></title>
-    <style type="text/css">
-    <!--
-    @import url("<ww:url value="/shared/styles/main.css"/>");
-    -->
-    </style>
+    <link rel="stylesheet" type="text/css" href="<ww:url value="/css/tigris.css"/>"
media="screen" />
+    <link rel="stylesheet" type="text/css" href="<ww:url value="/css/print.css"/>"
media="print" />
+
+    <script src="<ww:url value="/scripts/tigris.js"/>" type="text/javascript"></script>
     <decorator:head/>
   </head>
 
-  <body>
-    <table>
-      <tr>
-        <td colspan="2">
-          <img src="<ww:url value="/shared/images/logo.png"/> "/>
-        </td>
-      </tr>
-      <tr>
-        <td valign="top">
-          &nbsp;
-        </td>
-        <td valign="top">
-          <decorator:body/>
-        </td>
-      </tr>
+  <body onload="focus()" marginwidth="0" marginheight="0" class="composite">
+    <ww:include value="/navigations/DefaultTop.jsp"/>
+
+    <table id="main" border="0" cellpadding="4" cellspacing="0" width="100%">
+      <tbody>
+        <tr valign="top">
+          <td>
+            <div id="bodycol">
+                <div class="app">
+                  <decorator:body/>
+                </div>
+            </div>
+          </td>
+        </tr>
+      </tbody>
     </table>
+
+    <ww:include value="/navigations/DefaultBottom.jsp"/>
   </body>
-</html>
\ No newline at end of file
+</html>

Added: maven/continuum/trunk/continuum-webapp/src/main/webapp/initializeConfiguration.jsp
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/initializeConfiguration.jsp?rev=357186&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/initializeConfiguration.jsp (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/initializeConfiguration.jsp Fri
Dec 16 09:15:42 2005
@@ -0,0 +1,16 @@
+<%@ taglib uri="webwork" prefix="ww" %>
+<html>
+  <ww:i18n name="localization.Continuum">
+    <head>
+        <title><ww:text name="configuration.page.title"/></title>
+    </head>
+    <body>
+      <div id="axial" class="h3">
+        <h3><ww:text name="configuration.section.title"/></h3>
+
+        <div class="axial">
+        </div>
+      </div>
+    </body>
+  </ww:i18n>
+</html>

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/initializeConfiguration.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/initializeConfiguration.jsp
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/webapp/redirectToContinuumInitialization.jsp
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/redirectToContinuumInitialization.jsp?rev=357186&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/redirectToContinuumInitialization.jsp
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/redirectToContinuumInitialization.jsp
Fri Dec 16 09:15:42 2005
@@ -0,0 +1 @@
+<!-- META HTTP-EQUIV="Refresh" CONTENT="0; URL=initializeConfiguration.jsp" -->
\ No newline at end of file

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/redirectToContinuumInitialization.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/redirectToContinuumInitialization.jsp
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message