abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From calav...@apache.org
Subject svn commit: r673305 - /incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/templates/Route.java
Date Wed, 02 Jul 2008 07:22:19 GMT
Author: calavera
Date: Wed Jul  2 00:22:19 2008
New Revision: 673305

URL: http://svn.apache.org/viewvc?rev=673305&view=rev
Log:
Add public accessor methods for Route.requirements and defaultValues -- thanks to David Primmer

Modified:
    incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/templates/Route.java

Modified: incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/templates/Route.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/templates/Route.java?rev=673305&r1=673304&r2=673305&view=diff
==============================================================================
--- incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/templates/Route.java
(original)
+++ incubator/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/templates/Route.java
Wed Jul  2 00:22:19 2008
@@ -174,12 +174,18 @@
       return buf.toString();
   }
 
-  private String getDefaultValue(String var) {
+  public String getDefaultValue(String var) {
     if (defaultValues == null) return null;
     
     return defaultValues.get(var);
   }
-  
+
+  public String getRequirement(String var) {
+    if (requirements == null) return null;
+    
+    return requirements.get(var);
+  }
+
   private String var(String token) {
     token = token.substring(1);
     if (token.startsWith("("))
@@ -233,7 +239,15 @@
   public String[] getVariables() {
     return variables;
   }
-  
+
+  public Map<String, String> getDefaultValues(){
+    return defaultValues;
+  }
+
+  public Map<String, String> getRequirements(){
+    return requirements;
+  }
+
   public Route clone() {
     try {
       return (Route)super.clone();



Mime
View raw message