CVS: Tapestry/framework/src/net/sf/tapestry/resource AbstractResourceLocation.java,1.1.2.2,1.1.2.3 ContextResourceLocation.java,1.1.2.1,1.1.2.2 ClasspathResourceLocation.java,1.1.2.1,1.1.2.2

Howard Lewis Ship <[email protected]>
Newsgroups gmane.comp.java.tapestry.cvs
Message-ID <[email protected]>
Update of /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/resource
In directory sc8-pr-cvs1:/tmp/cvs-serv15280/framework/src/net/sf/tapestry/resource

Modified Files:
      Tag: hship-2-3
	AbstractResourceLocation.java ContextResourceLocation.java 
	ClasspathResourceLocation.java 
Log Message:
Check in support for templates in the application root.

Index: AbstractResourceLocation.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/resource/Attic/AbstractResourceLocation.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** AbstractResourceLocation.java	8 Dec 2002 15:04:45 -0000	1.1.2.2
--- AbstractResourceLocation.java	11 Dec 2002 14:02:26 -0000	1.1.2.3
***************
*** 1,10 ****
  package net.sf.tapestry.resource;
  
- import java.net.URL;
- import java.util.Locale;
- 
- import org.apache.commons.lang.builder.ToStringBuilder;
- 
- import net.sf.tapestry.IAsset;
  import net.sf.tapestry.IResourceLocation;
  
--- 1,4 ----
***************
*** 62,84 ****
      }
  
-     public String toString()
-     {
-         ToStringBuilder builder = new ToStringBuilder(this);
- 
-         builder.append("path", _path);
- 
-         extendDescription(builder);
- 
-         return builder.toString();
-     }
- 
-     /**
-      *  Does nothing.  Subclasses may override.
-      * 
-      **/
- 
-     protected void extendDescription(ToStringBuilder builder)
-     {
-     }
  
      /**
--- 56,59 ----

Index: ContextResourceLocation.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/resource/Attic/ContextResourceLocation.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** ContextResourceLocation.java	7 Dec 2002 13:26:14 -0000	1.1.2.1
--- ContextResourceLocation.java	11 Dec 2002 14:02:26 -0000	1.1.2.2
***************
*** 50,56 ****
      public IResourceLocation getLocalization(Locale locale)
      {
-         if (locale == null)
-             return this;
- 
          LocalizedContextResourceFinder finder = new LocalizedContextResourceFinder(_context);
  
--- 50,53 ----
***************
*** 58,61 ****
--- 55,61 ----
          String localizedPath = finder.resolve(path, locale);
  
+         if (localizedPath == null)
+             return null;
+ 
          if (path.equals(localizedPath))
              return this;
***************
*** 90,93 ****
--- 90,98 ----
      
  
+     public String toString()
+     {
+         return "context:" + getPath();
+     }
+         
      public int hashCode()
      {

Index: ClasspathResourceLocation.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/resource/Attic/ClasspathResourceLocation.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** ClasspathResourceLocation.java	7 Dec 2002 13:26:15 -0000	1.1.2.1
--- ClasspathResourceLocation.java	11 Dec 2002 14:02:26 -0000	1.1.2.2
***************
*** 44,50 ****
      public IResourceLocation getLocalization(Locale locale)
      {
-         if (locale == null)
-             return this;
- 
          String path = getPath();
          LocalizedResourceFinder finder = new LocalizedResourceFinder(_resolver);
--- 44,47 ----
***************
*** 52,55 ****
--- 49,55 ----
          String localizedPath = finder.resolve(path, locale);
  
+         if (localizedPath == null)
+             return null;
+ 
          if (path.equals(localizedPath))
              return this;
***************
*** 80,83 ****
--- 80,88 ----
  
  
+     public String toString()
+     {
+         return "classpath:" + getPath();
+     }
+         
      public int hashCode()
      {



-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.