myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r923325 - in /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago: config/Attribute.java config/MappingRule.java config/TobagoConfig.java config/TobagoConfigParser.java servlet/TemplateServlet.java
Date Mon, 15 Mar 2010 16:20:17 GMT
Author: lofwyr
Date: Mon Mar 15 16:20:17 2010
New Revision: 923325

URL: http://svn.apache.org/viewvc?rev=923325&view=rev
Log:
TOBAGO-862: Remove the template mechanism of Tobago

Removed:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/Attribute.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/MappingRule.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/servlet/TemplateServlet.java
Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfig.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfigParser.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfig.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfig.java?rev=923325&r1=923324&r2=923325&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfig.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfig.java
Mon Mar 15 16:20:17 2010
@@ -31,28 +31,25 @@ import javax.naming.NamingException;
 import javax.servlet.ServletContext;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
 public class TobagoConfig {
+
   private static final Log LOG = LogFactory.getLog(TobagoConfig.class);
 
-  public static final String TOBAGO_CONFIG
-      = "org.apache.myfaces.tobago.config.TobagoConfig";
+  public static final String TOBAGO_CONFIG = "org.apache.myfaces.tobago.config.TobagoConfig";
 
   private List<Theme> supportedThemes;
   private List<String> supportedThemeNames;
   private Theme defaultTheme;
   private String defaultThemeName;
   private List<String> resourceDirs;
-  private List<MappingRule> mappingRules;
   private boolean ajaxEnabled;
   private Map<String, Theme> availableTheme;
   private RenderersConfig renderersConfig;
   private ProjectStage projectStage;
 
-
   public TobagoConfig() {
     supportedThemeNames = new ArrayList<String>();
     supportedThemes = new ArrayList<Theme>();
@@ -60,17 +57,6 @@ public class TobagoConfig {
     ajaxEnabled = true;
   }
 
-  public void addMappingRule(MappingRule mappingRule) {
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("addMappingRule: {" + mappingRule + "}");
-    }
-
-    if (mappingRules == null) {
-      mappingRules = new ArrayList<MappingRule>();
-    }
-    mappingRules.add(mappingRule);
-  }
-
   public void addSupportedThemeName(String name) {
     supportedThemeNames.add(name);
   }
@@ -127,31 +113,11 @@ public class TobagoConfig {
     }
   }
 
-
   public static TobagoConfig getInstance(FacesContext facesContext) {
     return (TobagoConfig) facesContext.getExternalContext()
         .getApplicationMap().get(TOBAGO_CONFIG);
   }
 
-  public MappingRule getMappingRule(String requestUri) {
-    for (Iterator i = getMappingRules(); i.hasNext();) {
-      MappingRule rule = (MappingRule) i.next();
-      if (rule.getRequestUri().equals(requestUri)) {
-        return rule;
-      }
-    }
-    return null;
-  }
-
-  public Iterator<MappingRule> getMappingRules() {
-    if (mappingRules == null) {
-      List<MappingRule> objects = Collections.emptyList();
-      return objects.iterator();
-    } else {
-      return mappingRules.iterator();
-    }
-  }
-
   public Theme getTheme(String name) {
     if (name == null) {
       LOG.debug("searching theme: null");
@@ -199,12 +165,6 @@ public class TobagoConfig {
     this.ajaxEnabled = Boolean.valueOf(value);
   }
 
-  @Deprecated
-  public void setLoadThemesFromClasspath(String loadThemesFromClasspath) {
-    LOG.warn("Deprecated: setting load-theme-resources-from-classpath is "
-        + "no longer supported");
-  }
-
   public Theme getDefaultTheme() {
     return defaultTheme;
   }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfigParser.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfigParser.java?rev=923325&r1=923324&r2=923325&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfigParser.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfigParser.java
Mon Mar 15 16:20:17 2010
@@ -17,18 +17,13 @@ package org.apache.myfaces.tobago.config
  * limitations under the License.
  */
 
-/*
- * Created 24.06.2003 08:53:35.
- * $Id$
- */
-
 import org.apache.commons.digester.Digester;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.tobago.context.RenderersConfigImpl;
-import org.apache.myfaces.tobago.context.RendererConfig;
 import org.apache.myfaces.tobago.context.MarkupConfig;
+import org.apache.myfaces.tobago.context.RendererConfig;
+import org.apache.myfaces.tobago.context.RenderersConfigImpl;
 import org.xml.sax.SAXException;
 
 import javax.faces.FacesException;
@@ -42,8 +37,7 @@ public class TobagoConfigParser {
   private static final Log LOG = LogFactory.getLog(TobagoConfigParser.class);
   private static final String TOBAGO_CONFIG_DTD = "/org/apache/myfaces/tobago/config/tobago-config_1_0.dtd";
 
-  public TobagoConfig parse(ServletContext context)
-      throws IOException, SAXException, FacesException {
+  public TobagoConfig parse(ServletContext context)  throws IOException, SAXException, FacesException
{
 
     TobagoConfig tobagoConfig = new TobagoConfig();
     Digester digester = configure(tobagoConfig);
@@ -61,25 +55,6 @@ public class TobagoConfigParser {
     digester.addCallMethod("tobago-config/theme-config/default-theme", "setDefaultThemeName",
0);
     digester.addCallMethod("tobago-config/theme-config/supported-theme", "addSupportedThemeName",
0);
 
-    // mapping rules
-    digester.addObjectCreate("tobago-config/mapping-rule", MappingRule.class);
-    digester.addSetNext("tobago-config/mapping-rule", "addMappingRule");
-    digester.addCallMethod(
-        "tobago-config/mapping-rule/request-uri", "setRequestUri", 0);
-    digester.addCallMethod(
-        "tobago-config/mapping-rule/forward-uri", "setForwardUri", 0);
-    digester.addObjectCreate(
-        "tobago-config/mapping-rule/attribute", Attribute.class);
-    digester.addSetNext(
-        "tobago-config/mapping-rule/attribute", "addAttribute");
-    digester.addCallMethod(
-        "tobago-config/mapping-rule/attribute/key", "setKey", 0);
-    digester.addCallMethod(
-        "tobago-config/mapping-rule/attribute/value", "setValue", 0);
-
-    // XXX: deprecated! will ever be true (will be removed in next release after 1.0.7)
-    digester.addCallMethod("tobago-config/load-theme-resources-from-classpath", "setLoadThemesFromClasspath",
0);
-
     // resource dirs
     digester.addCallMethod("tobago-config/resource-dir", "addResourceDir", 0);
 



Mime
View raw message