geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r999687 - in /geronimo/server/trunk/plugins/j2ee: geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/ geronimo-web/src/main/java/org/apache/geronimo/web/info/
Date Tue, 21 Sep 2010 23:32:37 GMT
Author: djencks
Date: Tue Sep 21 23:32:37 2010
New Revision: 999687

URL: http://svn.apache.org/viewvc?rev=999687&view=rev
Log:
GERONIMO-5623 add some more web.xml data into our info tree

Added:
    geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/ErrorPageInfo.java
    geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/LoginConfigInfo.java
Modified:
    geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/WebAppInfoBuilder.java
    geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/WebAppInfo.java

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/WebAppInfoBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/WebAppInfoBuilder.java?rev=999687&r1=999686&r2=999687&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/WebAppInfoBuilder.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/WebAppInfoBuilder.java
Tue Sep 21 23:32:37 2010
@@ -28,20 +28,28 @@ import java.util.Map;
 
 import javax.servlet.DispatcherType;
 import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.web.info.ErrorPageInfo;
 import org.apache.geronimo.web.info.FilterInfo;
 import org.apache.geronimo.web.info.FilterMappingInfo;
+import org.apache.geronimo.web.info.LoginConfigInfo;
 import org.apache.geronimo.web.info.MultipartConfigInfo;
 import org.apache.geronimo.web.info.ServletInfo;
 import org.apache.geronimo.web.info.WebAppInfo;
 import org.apache.openejb.jee.Dispatcher;
+import org.apache.openejb.jee.ErrorPage;
 import org.apache.openejb.jee.Filter;
 import org.apache.openejb.jee.FilterMapping;
 import org.apache.openejb.jee.Listener;
+import org.apache.openejb.jee.LocaleEncodingMapping;
+import org.apache.openejb.jee.LocaleEncodingMappingList;
+import org.apache.openejb.jee.LoginConfig;
+import org.apache.openejb.jee.MimeMapping;
 import org.apache.openejb.jee.MultipartConfig;
 import org.apache.openejb.jee.ParamValue;
 import org.apache.openejb.jee.Servlet;
 import org.apache.openejb.jee.ServletMapping;
 import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.WelcomeFileList;
 
 /**
  * @version $Rev:$ $Date:$
@@ -144,6 +152,43 @@ public class WebAppInfoBuilder {
             }
         }
 
+        webAppInfo.displayName = webApp.getDisplayName();
+        
+        for (ErrorPage errorPage: webApp.getErrorPage()) {
+            ErrorPageInfo errorPageInfo = new ErrorPageInfo();
+            errorPageInfo.location = errorPage.getLocation();
+            if (errorPage.getErrorCode() != null) {
+                errorPageInfo.errorCode = errorPage.getErrorCode().intValue();
+            }
+            errorPageInfo.exceptionType = errorPage.getExceptionType();
+            webAppInfo.errorPages.add(errorPageInfo);
+        }
+
+        for (LocaleEncodingMappingList localeEncodingMappingList: webApp.getLocaleEncodingMappingList())
{
+            for (LocaleEncodingMapping localeEncodingMapping: localeEncodingMappingList.getLocaleEncodingMapping())
{
+                webAppInfo.localeEncodingMappings.put(localeEncodingMapping.getLocale(),
localeEncodingMapping.getEncoding());
+            }
+        }
+        for (MimeMapping mimeMapping: webApp.getMimeMapping()) {
+            webAppInfo.mimeMappings.put(mimeMapping.getExtension(), mimeMapping.getMimeType());
+        }
+
+        for (WelcomeFileList welcomeFileList: webApp.getWelcomeFileList()) {
+            webAppInfo.welcomeFiles.addAll(welcomeFileList.getWelcomeFile());
+        }
+
+        for (LoginConfig loginConfig: webApp.getLoginConfig()) {
+            LoginConfigInfo loginConfigInfo = new LoginConfigInfo();
+            loginConfigInfo.authMethod = loginConfig.getAuthMethod();
+            loginConfigInfo.realmName = loginConfig.getRealmName();
+            if (loginConfig.getFormLoginConfig() != null) {
+                loginConfigInfo.formLoginPage = loginConfig.getFormLoginConfig().getFormLoginPage();
+                loginConfigInfo.formErrorPage = loginConfig.getFormLoginConfig().getFormErrorPage();
+            }
+            webAppInfo.loginConfig = loginConfigInfo;
+            break;
+        }
+
         webAppInfoFactory.complete(webAppInfo);
 
         if (!problems.isEmpty()) {

Added: geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/ErrorPageInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/ErrorPageInfo.java?rev=999687&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/ErrorPageInfo.java
(added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/ErrorPageInfo.java
Tue Sep 21 23:32:37 2010
@@ -0,0 +1,34 @@
+/*
+ * 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.geronimo.web.info;
+
+import java.io.Serializable;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class ErrorPageInfo implements Serializable {
+
+    public String location;
+    public Integer errorCode;
+    public String exceptionType;
+    
+}

Added: geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/LoginConfigInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/LoginConfigInfo.java?rev=999687&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/LoginConfigInfo.java
(added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/LoginConfigInfo.java
Tue Sep 21 23:32:37 2010
@@ -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.geronimo.web.info;
+
+import java.io.Serializable;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class LoginConfigInfo implements Serializable {
+
+    public String authMethod;
+    public String realmName;
+    public String formLoginPage;
+    public String formErrorPage;
+    
+}

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/WebAppInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/WebAppInfo.java?rev=999687&r1=999686&r2=999687&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/WebAppInfo.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/WebAppInfo.java
Tue Sep 21 23:32:37 2010
@@ -23,6 +23,7 @@ package org.apache.geronimo.web.info;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -36,5 +37,10 @@ public class WebAppInfo implements Seria
     public final List<ServletInfo> servlets = new ArrayList<ServletInfo>();
     public final List<String> listeners = new ArrayList<String>();
     public final Map<String, String> contextParams = new HashMap<String, String>();
-    
+    public final List<ErrorPageInfo> errorPages = new ArrayList<ErrorPageInfo>();
+    public final LinkedHashMap<String, String> localeEncodingMappings = new LinkedHashMap<String,
String>();
+    public final LinkedHashMap<String, String> mimeMappings = new LinkedHashMap<String,
String>();
+    public final List<String> welcomeFiles = new ArrayList<String>();
+    public String displayName;
+    public LoginConfigInfo loginConfig;
 }



Mime
View raw message