[jboss-cvs] JBossAS SVN: r58927 - in trunk/server/src/main/org/jboss/metadata: . web

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Dec 8 11:03:53 EST 2006


Author: remy.maucherat at jboss.com
Date: 2006-12-08 11:03:49 -0500 (Fri, 08 Dec 2006)
New Revision: 58927

Added:
   trunk/server/src/main/org/jboss/metadata/web/LocaleEncodingMapping.java
   trunk/server/src/main/org/jboss/metadata/web/MimeMapping.java
   trunk/server/src/main/org/jboss/metadata/web/Taglib.java
Modified:
   trunk/server/src/main/org/jboss/metadata/WebMetaData.java
Log:
- Add fields and utility objects.

Modified: trunk/server/src/main/org/jboss/metadata/WebMetaData.java
===================================================================
--- trunk/server/src/main/org/jboss/metadata/WebMetaData.java	2006-12-08 16:01:51 UTC (rev 58926)
+++ trunk/server/src/main/org/jboss/metadata/WebMetaData.java	2006-12-08 16:03:49 UTC (rev 58927)
@@ -38,13 +38,16 @@
 import org.jboss.metadata.web.ErrorPage;
 import org.jboss.metadata.web.Filter;
 import org.jboss.metadata.web.FilterMapping;
+import org.jboss.metadata.web.LocaleEncodingMapping;
 import org.jboss.metadata.web.LoginConfig;
+import org.jboss.metadata.web.MimeMapping;
 import org.jboss.metadata.web.ParamValue;
 import org.jboss.metadata.web.PassivationConfig;
 import org.jboss.metadata.web.ReplicationConfig;
 import org.jboss.metadata.web.Servlet;
 import org.jboss.metadata.web.ServletMapping;
 import org.jboss.metadata.web.SessionConfig;
+import org.jboss.metadata.web.Taglib;
 import org.jboss.mx.loading.LoaderRepositoryFactory;
 import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
 import org.jboss.mx.util.ObjectNameFactory;
@@ -157,6 +160,19 @@
    /** Flag to check for metadata in webapps **/
    private boolean metadataComplete = false;
 
+   /** web-app/mime-mapping */
+   private List<MimeMapping> mimeMappings = new ArrayList<MimeMapping>();
+   /** web-app/locale-encoding-mapping */
+   private List<LocaleEncodingMapping> localeEncodingMappings = new ArrayList<LocaleEncodingMapping>();
+   /** web-app/welcome-file */
+   private List<String> welcomeFiles = new ArrayList<String>();
+   /** web-app/web-app/jsp-config/jsp-property-group/url-pattern */
+   private List<String> jspMappings = new ArrayList<String>();
+   /** web-app/session-config/session-timeout */
+   private int sessionTimeout = -1;
+   /** web-app/taglib */
+   private List<Taglib> taglibs = new ArrayList<Taglib>();
+
    /**
     * this is really a hack for new injection code  so that we can reparse web.xml/jbossweb.xml for JavaEE 5 injections
     * todo remove this when we clean up
@@ -368,6 +384,66 @@
       securityConstraints.add(constraint);
    }
    
+   public Collection<MimeMapping> getMimeMappings()
+   {
+      return mimeMappings;
+   }
+
+   public void addMimeMapping(MimeMapping mimeMapping)
+   {
+      mimeMappings.add(mimeMapping);
+   }
+
+   public Collection<LocaleEncodingMapping> getLocaleEncodingMappings()
+   {
+      return localeEncodingMappings;
+   }
+
+   public void addLocaleEncodingMapping(LocaleEncodingMapping localeEncodingMapping)
+   {
+      localeEncodingMappings.add(localeEncodingMapping);
+   }
+
+   public Collection<String> getWelcomeFiles()
+   {
+      return welcomeFiles;
+   }
+
+   public void addWelcomeFile(String welcomeFile)
+   {
+      welcomeFiles.add(welcomeFile);
+   }
+
+   public Collection<String> getJspMappings()
+   {
+      return jspMappings;
+   }
+
+   public void addJspMapping(String jspMapping)
+   {
+      jspMappings.add(jspMapping);
+   }
+
+   public int getSessionTimeout()
+   {
+      return sessionTimeout;
+   }
+
+   public void setSessionTimeout(int sessionTimeout)
+   {
+      this.sessionTimeout = sessionTimeout;
+   }
+
+   public Collection<Taglib> getTaglibs()
+   {
+      return taglibs;
+   }
+
+   public void addTaglib(Taglib taglib)
+   {
+      taglibs.add(taglib);
+   }
+
    public LoginConfig getLoginConfig()
    {
       return loginConfig;

Added: trunk/server/src/main/org/jboss/metadata/web/LocaleEncodingMapping.java
===================================================================
--- trunk/server/src/main/org/jboss/metadata/web/LocaleEncodingMapping.java	2006-12-08 16:01:51 UTC (rev 58926)
+++ trunk/server/src/main/org/jboss/metadata/web/LocaleEncodingMapping.java	2006-12-08 16:03:49 UTC (rev 58927)
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.metadata.web;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents a <locale-encoding-mapping> element of the web.xml deployment descriptor for the
+ * 2.5 schema
+ *
+ * @version <tt>$Revision: 45409 $</tt>
+ */
+public class LocaleEncodingMapping
+{
+   private static final Logger log = Logger.getLogger(LocaleEncodingMapping.class);
+   
+   protected String locale;
+   protected String encoding;
+   
+   public String getLocale()
+   {
+      return locale;
+   }
+   
+   public void setLocale(String locale)
+   {
+      this.locale = locale;
+   }
+   
+   public String getEncoding()
+   {
+      return encoding;
+   }
+   
+   public void setEncoding(String encoding)
+   {
+      this.encoding = encoding;
+   }
+   
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      return sb.toString();
+   }
+}


Property changes on: trunk/server/src/main/org/jboss/metadata/web/LocaleEncodingMapping.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/server/src/main/org/jboss/metadata/web/MimeMapping.java
===================================================================
--- trunk/server/src/main/org/jboss/metadata/web/MimeMapping.java	2006-12-08 16:01:51 UTC (rev 58926)
+++ trunk/server/src/main/org/jboss/metadata/web/MimeMapping.java	2006-12-08 16:03:49 UTC (rev 58927)
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.metadata.web;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents a <mime-mapping> element of the web.xml deployment descriptor for the
+ * 2.5 schema
+ *
+ * @version <tt>$Revision: 45409 $</tt>
+ */
+public class MimeMapping
+{
+   private static final Logger log = Logger.getLogger(MimeMapping.class);
+   
+   protected String extension;
+   protected String mimeType;
+   
+   public String getExtension()
+   {
+      return extension;
+   }
+   
+   public void setExtension(String extension)
+   {
+      this.extension = extension;
+   }
+   
+   public String getMimeType()
+   {
+      return mimeType;
+   }
+   
+   public void setMimeType(String mimeType)
+   {
+      this.mimeType = mimeType;
+   }
+   
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      return sb.toString();
+   }
+}


Property changes on: trunk/server/src/main/org/jboss/metadata/web/MimeMapping.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/server/src/main/org/jboss/metadata/web/Taglib.java
===================================================================
--- trunk/server/src/main/org/jboss/metadata/web/Taglib.java	2006-12-08 16:01:51 UTC (rev 58926)
+++ trunk/server/src/main/org/jboss/metadata/web/Taglib.java	2006-12-08 16:03:49 UTC (rev 58927)
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.metadata.web;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents a <taglib> element of the web.xml deployment descriptor for the
+ * 2.5 schema
+ *
+ * @version <tt>$Revision: 45409 $</tt>
+ */
+public class Taglib
+{
+   private static final Logger log = Logger.getLogger(Taglib.class);
+   
+   protected String location;
+   protected String uri;
+   
+   public String getLocation()
+   {
+      return location;
+   }
+   
+   public void setLocation(String location)
+   {
+      this.location = location;
+   }
+   
+   public String getUri()
+   {
+      return uri;
+   }
+   
+   public void setUri(String uri)
+   {
+      this.uri = uri;
+   }
+   
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      return sb.toString();
+   }
+}


Property changes on: trunk/server/src/main/org/jboss/metadata/web/Taglib.java
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the jboss-cvs-commits mailing list