myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwald...@apache.org
Subject svn commit: r931223 - in /myfaces/trinidad/branches/1.2.12.3-branch: trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/ trinidad-impl/src/main/java/org/apache/myfaces/trinidadi...
Date Tue, 06 Apr 2010 17:00:42 GMT
Author: jwaldman
Date: Tue Apr  6 17:00:41 2010
New Revision: 931223

URL: http://svn.apache.org/viewvc?rev=931223&view=rev
Log:
TRINIDAD-1746 move InputStreamProvider to be a public API
TRINIDAD-1729 provide a hook for for an external decorator of Skin InputStreamProvider

Added:
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/InputStreamProvider.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/NameResolver.java
Modified:
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/ImageConstants.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/CompositeButtonKey.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/FileSystemImageCache.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/SourceCheckingCacheEntry.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/laf/browser/SourceUtils.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/CachingInputStreamProvider.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/CachingNameResolver.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/DefaultNameResolver.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/FileInputStreamProvider.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/InputStreamProviderProxy.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/URLInputStreamProvider.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/xml/XMLUtils.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinUtils.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/StyleSheetEntry.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/StyleSheetNameResolver.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/StyleSheetDocumentUtils.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/Icon.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentIconRequest.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentedLafIconProvider.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/CoreIconRequest.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/FlippedIconRequest.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/IconArrayLafIconProvider.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/IconInputStreamProvider.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/SimpleButtonUtils.java

Added: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/InputStreamProvider.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/InputStreamProvider.java?rev=931223&view=auto
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/InputStreamProvider.java (added)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/InputStreamProvider.java Tue Apr  6 17:00:41 2010
@@ -0,0 +1,82 @@
+/*
+ *  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.myfaces.trinidad.share.io;
+
+import java.io.InputStream;
+import java.io.IOException;
+
+/**
+ * InputStreamProviders encapsulate a single target file. An InputStreamProvider is used to 
+ * get an inputStream, cache results and see if the file has been modified. 
+ * (There's no real requirement that there be a physical file
+ * at the target location).
+ * <p>
+ * @version $Name:  $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/share/io/InputStreamProvider.java#0 $) $Date: 10-nov-2005.19:00:08 $
+ */
+public interface InputStreamProvider
+{
+  /**
+   * Return an InputStream for the target.  This function
+   * should never return null - if a stream cannot be opened,
+   * throw an IOException.
+   */
+  public InputStream       openInputStream() throws IOException;
+
+  /**
+   * Returns the name of the target location, suitable
+   * for user display.
+   */
+  public String            getDisplayName();
+
+  /**
+   * Returns an identifier object that uniquely
+   * identifies the target location. If two providers
+   * return equal identifiers, that is, given:
+   * <pre>
+   *   Object identifierA = providerA.getIdentifier();
+   *   Object identifierB = providerB.getIdentifier();
+   * </pre>
+   * ... then:
+   * <pre>
+   *   if (identifierA.equals(identifierB)) ...
+   * </pre>
+   * then the two providers must point to the same location.
+   */
+  public Object            getIdentifier();
+
+  /**
+   * Returns true if the underlying target has changed
+   * since the last call to openInputStream()
+   */
+  public boolean           hasSourceChanged();
+
+  /**
+   * Returns the cached result from reading and parsing this
+   * provider.
+   * @see CachingNameResolver
+   */
+  public Object            getCachedResult();
+
+  /**
+   * Stores the cached result of reading and parsing this
+   * provider.
+   * @see CachingNameResolver
+   */
+  public void              setCachedResult(Object value);
+}

Added: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/NameResolver.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/NameResolver.java?rev=931223&view=auto
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/NameResolver.java (added)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/share/io/NameResolver.java Tue Apr  6 17:00:41 2010
@@ -0,0 +1,58 @@
+/*
+ *  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.myfaces.trinidad.share.io;
+
+import java.io.IOException;
+
+
+
+/**
+ * NameResolvers are responsible for converting string names
+ * into InputStreamProviders, which encapsulate a remote file.
+ * Implementations exist that support using URLs, Files, Class
+ * resources, and the Servlet API to locate files, but other APIs
+ * may be substituted.
+ * <p>
+ * In some cases, the resolved target file may have need to
+ * locate support files of its own (like imported css files).  Since those support files should
+ * be looked for relative to the target file, NameResolver supports
+ * creating new relative NameResolvers.
+ * @version $Name:  $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/share/io/NameResolver.java#0 $) $Date: 10-nov-2005.19:00:09 $
+ */
+public interface NameResolver
+{
+  /**
+   * Given a name, returns an InputStreamProvider.  This
+   * function should never return null - if the target
+   * cannot be resolved, throw an IOException.
+   * @param name the name of the target
+   */
+  public InputStreamProvider getProvider(String name) throws IOException;
+
+  /**
+   * Return the new NameResolver that should be used to resolve
+   * names relative to a given name. For example, if a css file has an @import,
+   * you need to look for the imported file relative to the file. This function should never
+   * return null - if the target cannot be resolved, return a
+   * resolver that can only support absolute names.
+   * @param name the name of the target
+   */
+  public NameResolver        getResolver(String name);
+}
+

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/ImageConstants.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/ImageConstants.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/ImageConstants.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/ImageConstants.java Tue Apr  6 17:00:41 2010
@@ -227,7 +227,7 @@ public interface ImageConstants
    * The InputStreamProvider is used to obtain image data for the
    * source images for global buttons and colorizeds.
    *
-   * @see org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider
+   * @see org.apache.myfaces.trinidad.share.io.InputStreamProvider
    */
   public static final Object SOURCE_INPUT_STREAM_PROVIDER_KEY = "inputStreamProvider";
 

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/CompositeButtonKey.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/CompositeButtonKey.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/CompositeButtonKey.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/CompositeButtonKey.java Tue Apr  6 17:00:41 2010
@@ -24,7 +24,7 @@ import java.awt.Color;
 import java.util.Map;
 import org.apache.myfaces.trinidad.util.ArrayMap;
 
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
 
 import org.apache.myfaces.trinidadinternal.image.ImageConstants;
 import org.apache.myfaces.trinidadinternal.image.ImageContext;

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/FileSystemImageCache.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/FileSystemImageCache.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/FileSystemImageCache.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/FileSystemImageCache.java Tue Apr  6 17:00:41 2010
@@ -44,7 +44,7 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
-
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
 import org.apache.myfaces.trinidad.util.ArrayMap;
 
 import org.apache.myfaces.trinidadinternal.agent.TrinidadAgent;
@@ -62,7 +62,6 @@ import org.apache.myfaces.trinidadintern
 import org.apache.myfaces.trinidadinternal.image.util.MapArea;
 import org.apache.myfaces.trinidadinternal.image.xml.ImageProviderRequestUtils;
 import org.apache.myfaces.trinidadinternal.share.config.Configuration;
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
 import org.apache.myfaces.trinidadinternal.share.xml.XMLProvider;
 import org.apache.myfaces.trinidadinternal.share.xml.XMLUtils;
 import org.apache.myfaces.trinidadinternal.style.util.GraphicsUtils;

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/SourceCheckingCacheEntry.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/SourceCheckingCacheEntry.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/SourceCheckingCacheEntry.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/SourceCheckingCacheEntry.java Tue Apr  6 17:00:41 2010
@@ -25,12 +25,13 @@ import java.util.Map;
 
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
 
 import org.apache.myfaces.trinidadinternal.image.ImageConstants;
 import org.apache.myfaces.trinidadinternal.image.ImageContext;
 import org.apache.myfaces.trinidadinternal.image.ImageProviderRequest;
 
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
+
 
 /**
  * Cache entry data structure which checks to see if the source

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/laf/browser/SourceUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/laf/browser/SourceUtils.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/laf/browser/SourceUtils.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/laf/browser/SourceUtils.java Tue Apr  6 17:00:41 2010
@@ -26,8 +26,7 @@ import java.util.Map;
 
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
-
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
 
 import org.apache.myfaces.trinidadinternal.image.ImageConstants;
 import org.apache.myfaces.trinidadinternal.image.ImageContext;

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/CachingInputStreamProvider.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/CachingInputStreamProvider.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/CachingInputStreamProvider.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/CachingInputStreamProvider.java Tue Apr  6 17:00:41 2010
@@ -20,6 +20,9 @@ package org.apache.myfaces.trinidadinter
 
 import java.util.Iterator;
 
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
+
+
 /**
  * A subinterface of InputStreamProvider that adds support
  * for tracking dependencies.

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/CachingNameResolver.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/CachingNameResolver.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/CachingNameResolver.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/CachingNameResolver.java Tue Apr  6 17:00:41 2010
@@ -24,6 +24,10 @@ import java.util.Map;
 import java.util.Hashtable;
 import java.util.Iterator;
 
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
+import org.apache.myfaces.trinidad.share.io.NameResolver;
+
+
 /**
  * NameResolver that adds caching support.  Providers
  * that receive cached results (via setCachedResult) will

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/DefaultNameResolver.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/DefaultNameResolver.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/DefaultNameResolver.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/DefaultNameResolver.java Tue Apr  6 17:00:41 2010
@@ -25,6 +25,10 @@ import java.io.IOException;
 import java.net.URL;
 import java.net.MalformedURLException;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
+import org.apache.myfaces.trinidad.share.io.NameResolver;
+
+
 
 /**
  * Default implementation of NameResolver.  This class

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/FileInputStreamProvider.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/FileInputStreamProvider.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/FileInputStreamProvider.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/FileInputStreamProvider.java Tue Apr  6 17:00:41 2010
@@ -24,6 +24,8 @@ import java.io.FileInputStream;
 import java.io.InputStream;
 import java.io.IOException;
 
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
+
 
 /**
  * An InputStreamProvider for loading files.

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/InputStreamProviderProxy.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/InputStreamProviderProxy.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/InputStreamProviderProxy.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/InputStreamProviderProxy.java Tue Apr  6 17:00:41 2010
@@ -20,6 +20,7 @@ package org.apache.myfaces.trinidadinter
 
 import java.io.InputStream;
 import java.io.IOException;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
 
 /**
  * Proxying class for InputStreamProviders.  Subclassers

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/URLInputStreamProvider.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/URLInputStreamProvider.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/URLInputStreamProvider.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/io/URLInputStreamProvider.java Tue Apr  6 17:00:41 2010
@@ -25,8 +25,10 @@ import java.io.IOException;
 import java.net.URL;
 import java.net.URLConnection;
 
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
 import org.apache.myfaces.trinidad.util.URLUtils;
 
+
 /**
  * An InputStreamProvider for opening URLs.
  * <p>

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/xml/XMLUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/xml/XMLUtils.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/xml/XMLUtils.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/xml/XMLUtils.java Tue Apr  6 17:00:41 2010
@@ -32,14 +32,14 @@ import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
+import org.apache.myfaces.trinidad.share.io.NameResolver;
 
 import org.apache.myfaces.trinidadinternal.share.config.Configuration;
 import org.apache.myfaces.trinidadinternal.share.config.ConfigurationImpl;
 
 import org.apache.myfaces.trinidadinternal.share.io.CachingInputStreamProvider;
 import org.apache.myfaces.trinidadinternal.share.io.DefaultNameResolver;
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
-import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
 
 import org.apache.myfaces.trinidadinternal.share.expl.JavaMethod;
 

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinStyleSheetParserUtils.java Tue Apr  6 17:00:41 2010
@@ -34,12 +34,13 @@ import java.util.TreeSet;
 import java.util.regex.Pattern;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
+import org.apache.myfaces.trinidad.share.io.NameResolver;
+
 import org.apache.myfaces.trinidad.skin.Icon;
 import org.apache.myfaces.trinidad.util.URLUtils;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SkinProperties;
 import org.apache.myfaces.trinidadinternal.share.expl.Coercions;
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
-import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
 import org.apache.myfaces.trinidadinternal.share.xml.ParseContext;
 import org.apache.myfaces.trinidadinternal.share.xml.XMLUtils;
 import org.apache.myfaces.trinidadinternal.skin.icon.ContextImageIcon;

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinUtils.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinUtils.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinUtils.java Tue Apr  6 17:00:41 2010
@@ -43,10 +43,11 @@ import javax.el.ValueExpression;
 import org.apache.myfaces.trinidad.skin.SkinFactory;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
-
+import org.apache.myfaces.trinidad.share.io.NameResolver;
 import org.apache.myfaces.trinidad.skin.Icon;
 import org.apache.myfaces.trinidad.skin.Skin;
 import org.apache.myfaces.trinidad.skin.SkinAddition;
+
 import org.apache.myfaces.trinidadinternal.config.LazyValueExpression;
 import org.apache.myfaces.trinidadinternal.renderkit.core.skin.MinimalDesktopSkinExtension;
 import org.apache.myfaces.trinidadinternal.renderkit.core.skin.MinimalPdaSkinExtension;
@@ -58,7 +59,6 @@ import org.apache.myfaces.trinidadintern
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 
-import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
 import org.apache.myfaces.trinidadinternal.share.xml.ClassParserFactory;
 import org.apache.myfaces.trinidadinternal.share.xml.ParseContextImpl;
 import org.apache.myfaces.trinidadinternal.share.xml.ParserFactory;

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/StyleSheetEntry.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/StyleSheetEntry.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/StyleSheetEntry.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/StyleSheetEntry.java Tue Apr  6 17:00:41 2010
@@ -18,14 +18,26 @@
  */
 package org.apache.myfaces.trinidadinternal.skin;
 
+import java.io.File;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 
+import java.net.MalformedURLException;
+import java.net.URL;
+
 import java.util.List;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
+import org.apache.myfaces.trinidad.share.io.NameResolver;
 
+import org.apache.myfaces.trinidad.util.ClassLoaderUtils;
 import org.apache.myfaces.trinidadinternal.share.io.CachingNameResolver;
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
-import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
+import org.apache.myfaces.trinidadinternal.share.io.FileInputStreamProvider;
+import org.apache.myfaces.trinidadinternal.share.io.URLInputStreamProvider;
 import org.apache.myfaces.trinidadinternal.share.xml.JaxpXMLProvider;
 import org.apache.myfaces.trinidadinternal.share.xml.ParseContextImpl;
 import org.apache.myfaces.trinidadinternal.share.xml.XMLProvider;
@@ -37,7 +49,10 @@ import org.apache.myfaces.trinidadintern
 
 /**
  * Package-private utility class used by Skin implementation
- * to manage a single XSS or CSS skin stylesheet source file.
+ * to manage a single XSS or CSS skin stylesheet source file .
+ * This class calls the parsing code which parses either the XSS or CSS file (_createSkinStyleSheet),
+ * and it stores a StyleSheetDocument object, which is a parsed representation of a 
+ * Trinidad style sheet document whether that is in the css or xss format or merged.
  * This class could actually
  * be pushed into an inner class in Skin, but at the moment
  * it is separated out simply to reduce the amount of code in
@@ -48,7 +63,7 @@ import org.apache.myfaces.trinidadintern
 class StyleSheetEntry
 {
   /**
-   * Creates a StyleSheetEntry for the specified context/name.
+   * Creates a StyleSheetEntry for the specified context and styleSheetName.
    * This method will log any errors/exceptions and return
    * null if the style sheet source file could not be found/parsed.
    */
@@ -60,7 +75,7 @@ class StyleSheetEntry
     // In order to create the StyleSheetEntry, we need to locate and
     // parse the style sheet file.  We use a NameResolver to use to
     // find the style sheet.
-    NameResolver resolver = _getNameResolver(context);
+    NameResolver resolver = _getNameResolver(context, styleSheetName);
     if (resolver == null)
       return null;
 
@@ -142,6 +157,68 @@ class StyleSheetEntry
   {
     return false;
   }
+  
+  // Gets a File for the specified name, or returns null if no file exists
+  // Try the local styles directory.
+  public static File resolveLocalFile(File localStylesDir, String name)
+  {
+    // Try the local styles directory
+    File file = new File(localStylesDir, name);
+    if (file.exists())
+      return file;
+
+    return null;
+  }
+
+  // Gets an URL for the specified name using ClassLoaderUtils.getResource
+  public static URL resolveClassLoaderURL(String name)
+  {
+    if (name == null)
+      return null;
+    return ClassLoaderUtils.getResource(name);
+
+  }
+
+  // Gets an URL for the non static urls -- that is, urls that could change after the
+  // server has started.
+  public static URL resolveNonStaticURL(String name)
+  {
+    if (name == null)
+      return null;
+    FacesContext fContext = FacesContext.getCurrentInstance();
+    if (fContext != null)
+    {
+      try
+      {
+        if (name.startsWith("http:") ||
+            name.startsWith("https:") ||
+            name.startsWith("file:") ||
+            name.startsWith("ftp:") ||
+            name.startsWith("jar:"))
+        {
+          URL url = new URL(name);
+          if (url != null)
+            return url;
+        }
+        else
+        {
+          String rootName = _getRootName(name);
+          // Return a URL for the application resource mapped to the specified path,
+          // if it exists; otherwise, return null.
+          URL url = fContext.getExternalContext().getResource(rootName);
+          if (url != null)
+            return url;
+        }
+      }
+      catch (MalformedURLException e)
+      {
+        // Eat the MalformedURLException - maybe the name isn't an URL
+        ;
+      }
+    }
+    return null;
+  }  
+  
 
   // Called by CheckModifiedEntry when the style sheet has changed
   void __setDocument(StyleSheetDocument document)
@@ -165,7 +242,7 @@ class StyleSheetEntry
     {
 
       // Parse the style sheet to create the StyleSheetDocument
-      StyleSheetDocument document = _createStyleSheetDocument(resolver,
+      StyleSheetDocument document = _createStyleSheetDocumentFromXSS(resolver,
                                                               styleSheetName);
       if (document == null)
         skinStyleSheet = null;
@@ -190,7 +267,7 @@ class StyleSheetEntry
   }
 
 
-  // Creates the StyleSheetEntry
+  // Creates the StyleSheetEntry from a skinning file that ends in .css
   private static StyleSheetEntry _createSkinStyleSheetFromCSS(
     NameResolver     resolver,
     String           styleSheetName
@@ -218,8 +295,8 @@ class StyleSheetEntry
       return null;
   }
 
-  // Creates the StyleSheetDocument
-  private static StyleSheetDocument _createStyleSheetDocument(
+  // Creates the StyleSheetDocument from a skinning file that ends in .xss, like base-desktop.xss
+  private static StyleSheetDocument _createStyleSheetDocumentFromXSS(
     NameResolver     resolver,
     String           styleSheetName
     )
@@ -229,6 +306,7 @@ class StyleSheetEntry
 
     try
     {
+      // this will parse the xss file adn return a StyleSheetDocument
       return StyleSheetDocumentUtils.createStyleSheetDocument(xmlProvider,
                                                               resolver,
                                                               styleSheetName);
@@ -245,14 +323,36 @@ class StyleSheetEntry
 
 
 
-  // Returns the NameResolver to use for locating style sheet files
+  // Returns the NameResolver to use for locating and loading style sheet file.
+  // Depending upon what the styleSheetName is, we load the file different way: local file,
+  // url, etc.
   private static NameResolver _getNameResolver(
-    StyleContext context
+    StyleContext context,
+    String       styleSheetName
     )
   {
-    // First, get a NameResolver that we can use to resolve
-    // locate the style sheet file.
-    NameResolver resolver = StyleSheetNameResolver.createResolver(context);
+    // get localStylesDirectory
+    File localStylesDir = _getStylesDir(context);
+
+    // Make sure we have some styles directory
+    if ((localStylesDir == null))
+    {
+      _LOG.warning(_STYLES_DIR_ERROR);
+      return null;
+    }
+    NameResolver resolver = null;
+
+    try
+    {
+      resolver =
+          _getNameResolverForStyleSheetFile(context, localStylesDir, styleSheetName);
+    }
+    catch (IOException e)
+    {
+      if (_LOG.isSevere())
+        _LOG.severe("CANNOT_LOAD_STYLESHEET", styleSheetName);
+        _LOG.severe(e);
+    }
     if (resolver == null)
     {
       // If we can't get a NameResolver, something is seriously wrong.
@@ -264,6 +364,80 @@ class StyleSheetEntry
     // can use to check for updates to imported style sheets
     return new CachingNameResolver(resolver, null, true);
   }
+  
+  /**
+   * <p>
+   * This method tries to find the Skin's stylesheet file (e.g., purple-desktop.css). 
+   * It creates a NameResolver object, and it returns the NameResolver object. 
+   * A NameResolver object contains an
+   * InputStreamProvider (this object loads the file) and a sub- NameResolver 
+   * that finds files that are relative to the base file, like an @import file in a .css file.
+   * </p>
+   * <p>
+   * This method tries to find the stylesheet file, first locally, or using an url, or a static url, 
+   * then we create a StyleSheetNameResolver and we pass in the InputStreamProvider we created that
+   * we know can find the file. If we can't find the file any of these ways, then we check 
+   * META-INF/services for a NameResolver service. This is how a third party can customize
+   * how they can find files, by supplying a META-INF/services NameResolver implementation. 
+   * </p>
+   * @param context
+   * @param localStylesDir File the local styles directory
+   * @param filename the stylesheet name
+   * @return NameResolver - either a StyleSheetNameResolver or the META-INF/services NameResolver
+   * implementation. The META-INF/services NameResolver implementation is the way a third party
+   * can customize the way they find and load files.
+   * @throws IOException when the file could not be found in all of the ways we tried to find it.
+   */
+  private static NameResolver _getNameResolverForStyleSheetFile(
+    StyleContext context, 
+    File         localStylesDir,
+    String       filename) throws IOException
+  {
+    InputStreamProvider provider = null;
+    
+    File file = StyleSheetEntry.resolveLocalFile(localStylesDir, filename);
+    if (file != null)
+      provider = new FileInputStreamProvider(file);
+    
+    if (provider == null)
+    {
+      // Gets an URL for the specified name.
+      // Try a few different means to get the file as an url and then create the appropriate
+      // InputStreamProvider from that URL.
+      URL url = resolveNonStaticURL(filename);
+      if (url != null)
+        provider = new URLInputStreamProvider(url);
+      else
+      {
+        // see if it is an URL that can be loaded by the ClassLoader.
+        // We create a StaticURLInputStreamProvider from the url because we consider the
+        // url static because it can't be changed without restarting the server, so we don't
+        // need to check if the source has changed.
+        url = resolveClassLoaderURL(filename);
+        if (url != null)
+          provider = new StaticURLInputStreamProvider(url);
+      }
+    }
+    // If at this point we have found an InputStreamProvider, then we will create a 
+    // StyleSheetNameResolver. Otherwise, we need to check for a custom NameResolver.
+    if (provider != null)
+      return StyleSheetNameResolver.createResolver(context, localStylesDir, provider);
+
+    // If we still can't locate the file at this point, then look for a custom
+    // NameResolver specified as a META-INF\services.
+    NameResolver servicesNameResolver = _loadNameResolverFromServices(filename);
+    if (servicesNameResolver != null)
+    {
+      if (_LOG.isFine())
+      {
+        _LOG.fine("Using the InputStreamProvider from META-INF\\services");
+      }
+      return servicesNameResolver;
+    }
+
+    // If we couldn't locate the file, throw an IOException
+    throw new FileNotFoundException(_getFileNotFoundMessage(localStylesDir, filename));
+  }
 
 
   // Subclass of StyleSheetEntry which recreates the StyleSheetEntry
@@ -298,10 +472,11 @@ class StyleSheetEntry
         __setDocument(null);
 
         // Get a new NameResolver
-        NameResolver resolver = _getNameResolver(context);
+        String name = getStyleSheetName();
+        NameResolver resolver = _getNameResolver(context, name);
         if (resolver != null)
         {
-          String name = getStyleSheetName();
+          
 
           // Recreate the StyleSheetEntry for the styleSheet using the new NameResolver
           // (e.g., if purpleSkin.css
@@ -355,11 +530,153 @@ class StyleSheetEntry
 
     private InputStreamProvider _provider;
   }
+  
 
-  private String              _name;
-  private StyleSheetDocument  _document;
 
+  // Construct error message for the specified file name
+  private static String _getFileNotFoundMessage(File localStylesDir, String name)
+  {
+    StringBuffer buffer = new StringBuffer();
+    buffer.append("Unable to locate style sheet \"");
+    buffer.append(name);
+    buffer.append("\" in ");
+
+    if (localStylesDir != null)
+    {
+      buffer.append("local styles directory (");
+      buffer.append(localStylesDir.getPath());
+      buffer.append("), ");
+    }
+
+    buffer.append("or on the class path.\n");
+    buffer.append("Please be sure that this style sheet is installed.");
+
+    return buffer.toString();
+  }
+
+  // Returns the File corresponding to the styles directory - either
+  // the local directory or the shared directory - depending on the
+  // shared value
+  private static File _getStylesDir(
+    StyleContext context)
+  {
+    String contextPath = context.getGeneratedFilesPath();
+
+    // We only need to look up the shared styles path if the shared
+    // context path is non-null.  If the shared context path is null,
+    // we don't have a shared styles directory (and calling
+    // Configuration.getPath() may throw a DirectoryUnavailableException).
+    if (contextPath == null)
+      return null;
+
+    String stylesPath = contextPath + "/adf/styles";
+
+    // Convert the path to a File
+    File stylesDir = new File(stylesPath);
+
+    // Make sure the directory actually exists
+    if (stylesDir.exists())
+       return stylesDir;
+
+    return null;
+  }
+
+  // Returns a name which can be resolved relative to the
+  // ServletContext root.
+  private static String _getRootName(String name)
+  {
+    // Tack on a starting "/" if the name doesn't already have one -
+    // seems to be required by ServletContext.getRealPath() and
+    // ServletContext.getResource() - at least on OC4J.
+    return (name.startsWith("/")) ? name : ("/" + name);
+  }
+
+  /**
+   * Returns an instance of NameResolver that was set in META-INF\services.
+   * This is used only if the stylesheet cannot be found any other way.
+   * This way third party users can create their own way to find the file e.g., MDS.
+   *
+   * @return a NameResolver instance that has been defined in META-INF\services\
+   * org.apache.myfaces.trinidad.share.io.NameResolver
+  // In this file they will have a line like "org.mycompany.io.MyNameResolverImpl".
+   * null if no NameResolver is found.
+   */
+  static private NameResolver _loadNameResolverFromServices(String name)
+  {
+    // We don't want to check services every time, so instead store it on the applicationMap.
+    FacesContext context = FacesContext.getCurrentInstance();
+    Map<String, Object> appMap = context.getExternalContext().getApplicationMap();
+
+    // Is it stored on the application map already? If so, use it.
+    NameResolver savedResolver = (NameResolver)appMap.get(_SERVICES_RESOLVER_KEY);
+    if (savedResolver != null)
+      return savedResolver;
+
+    List<NameResolver> resolvers = ClassLoaderUtils.getServices(
+                                      _NAME_RESOLVER_CLASS_NAME);
+
+    for (NameResolver customNameResolver : resolvers)
+    {
+      InputStreamProvider provider = null;
+      try
+      {
+        provider = customNameResolver.getProvider(name);
+      }
+      catch (IOException e)
+      {
+        // Log fine message. Try the next factory to get a provider
+        if (_LOG.isFine())
+          _LOG.fine(_SERVICES_RESOLVER_IOEXCEPTION_MSG);       
+      }
+      // Found a provider. So store it away and return it from the method.
+      if (provider != null)
+      {
+        appMap.put(_SERVICES_RESOLVER_KEY, provider);
+        return customNameResolver;
+      }
+    }
+    
+    return null;
+
+  }
+
+  // A subclass of URLInputStreamProvider which never checks for
+  // modifications
+  private static class StaticURLInputStreamProvider
+    extends URLInputStreamProvider
+  {
+    public StaticURLInputStreamProvider(URL url)
+    {
+      super(url);
+    }
+
+    @Override
+    public boolean hasSourceChanged()
+    {
+      return false;
+    }
+  }
+
+  // for META-INF\services\org.apache.myfaces.trinidad.share.io.NameResolver
+  // In this file they will have a line like "org.mycompany.io.MyNameResolverImpl"
+  static private final String _NAME_RESOLVER_CLASS_NAME =
+    NameResolver.class.getName();
+
+  // Error messages
+  private static final String _STYLES_DIR_ERROR =
+    "Could not locate the Trinidad styles directory."
+    + "Please be sure that the Trinidad installable resources are installed.";
+  
+  private static final String _SERVICES_RESOLVER_IOEXCEPTION_MSG =
+    "IOException when calling the META-INF/services NameResolver's getProvider method. " +
+    "Trying next nameResolver.";
+
+  private static final String _SERVICES_RESOLVER_KEY =
+    "org.apache.myfaces.trinidadinternal.skin.SERVICES_RESOLVER_KEY";  
 
   private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(StyleSheetEntry.class);
+  
+  private String              _name;
+  private StyleSheetDocument  _document;
 
 }

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/StyleSheetNameResolver.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/StyleSheetNameResolver.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/StyleSheetNameResolver.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/StyleSheetNameResolver.java Tue Apr  6 17:00:41 2010
@@ -30,11 +30,11 @@ import javax.faces.context.FacesContext;
 import org.apache.myfaces.trinidad.util.ClassLoaderUtils;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
+import org.apache.myfaces.trinidad.share.io.NameResolver;
 
 import org.apache.myfaces.trinidadinternal.share.io.DefaultNameResolver;
 import org.apache.myfaces.trinidadinternal.share.io.FileInputStreamProvider;
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
-import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
 import org.apache.myfaces.trinidadinternal.share.io.URLInputStreamProvider;
 
 import org.apache.myfaces.trinidadinternal.style.StyleContext;
@@ -42,29 +42,30 @@ import org.apache.myfaces.trinidadintern
 
 /**
  * Package-private utility class used by StyleSheetEntry to
- * locate style sheet source files.  We look for style sheets
- * in both the local and the shared "styles" directory.
+ * locate style sheet source files. The NameResolver in the StyleSheetNameResolver looks for
+ * the imported stylesheets relative to the base stylesheet.
  *
  * @version $Name:  $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/skin/StyleSheetNameResolver.java#0 $) $Date: 10-nov-2005.18:59:02 $
  */
 class StyleSheetNameResolver implements NameResolver
 {
   /**
-   * Creates a NameResolver which can locate style sheets
-   * for the specified StyleContext
+   * Creates a NameResolver which can locate style sheets in the local styles directory. 
+   * This method is called from StyleSheetEntry which loads and parses stylesheets (xss or css).
+   * The localStylesDir has already been checked to be valid before this method is called.
+   * @param context StyleContext
+   * @param localStylesDir File
+   * @param provider InputStreamProvider. This object was created in StyleSheetEntry based on
+   * the best way to load the particular stylesheet file. 
+   * It can be an FileInputStreamProvider, an URLInputStreamProvider, etc.
+   * @return
    */
-  public static NameResolver createResolver(StyleContext context)
-  {
-    File localStylesDir = _getStylesDir(context);
-
-    // Make sure we have some styles directory
-    if ((localStylesDir == null))
-    {
-      _LOG.warning(_STYLES_DIR_ERROR);
-      return null;
-    }
-
-    return new StyleSheetNameResolver(localStylesDir);
+  public static NameResolver createResolver(
+    StyleContext        context, 
+    File                localStylesDir,
+    InputStreamProvider provider)
+  {   
+    return new StyleSheetNameResolver(localStylesDir, provider);
   }
 
   /**
@@ -72,219 +73,68 @@ class StyleSheetNameResolver implements 
    * styles directories.  Note that the constructor is private since
    * StyleSheetEntry always calls createResolver().
    * @param localStylesDirectory The location of the local styles directory
+   * @param provider The InputStreamProvider. e.g., FileInputStreamProvider, URLInputStreamProvider,
+   * etc.
    */
   private StyleSheetNameResolver(
-    File localStylesDirectory
+    File                localStylesDirectory,
+    InputStreamProvider provider
     )
   {
     // We should always have some directory
     assert ((localStylesDirectory != null));
+    
+    // We should always have some provider
+    assert ((provider != null));
+
 
     _localStylesDir = localStylesDirectory;
+    _provider = provider;
 
   }
 
   /**
-   * Implementation of NameResolver.getProvider().
-   * Given the name of the file, create an InputStreamProvider. I
+   * Returns the InputStreamProvider for this StyleSheetNameResolver.
+   * @param name the stylesheet name.
+   * @return the InputStreamProvider. The InputStreamProvider knows how to return an InputStream
+   * of the file, it knows if the source has changed, etc.
+   * @throws IOException
+   * @see InputStreamProvider
    */
   public InputStreamProvider getProvider(String name) throws IOException
   {
-    File file = _resolveLocalFile(name);
-    if (file != null)
-      return new FileInputStreamProvider(file);
-      
-    // Gets an URL for the specified name. 
-    // Try a few different means to get the file as an url and then create the appropriate
-    // InputStreamProvider from that URL.
-    URL url = _resolveNonStaticURL(name);
-    if (url != null)
-      return new URLInputStreamProvider(url);
-    else
-    {
-      // see if it is an URL that can be loaded by the ClassLoader. 
-      // We create a StaticURLInputStreamProvider from the url because we consider the
-      // url static because it can't be changed without restarting the server, so we don't
-      // need to check if the source has changed.
-      url = _resolveClassLoaderURL(name);
-      if (url != null)
-        return new StaticURLInputStreamProvider(url);
-    }
-      
-
-
-    // If we couldn't locate the file, throw an IOException
-    throw new FileNotFoundException(_getFileNotFoundMessage(name));
+    return _provider;
   }
 
   /**
-   * Implementation of NameResolver.getResolver()
+   * Implementation of NameResolver.getResolver(). This gets the file that is relative to
+   * the base file.
+   * @param name  String name of the file that is the imported stylesheet.
+   * @return NameResolver. A resolver that knows how to resolve files relative to a base file.
+   * e.g., DefaultNameResolver
    */
   public NameResolver getResolver(String name)
   {
     URL url = null;
-    File file = _resolveLocalFile(name);
+    File file = StyleSheetEntry.resolveLocalFile(_localStylesDir, name);
     if (file == null)
     {
       // Gets an URL for the specified name. 
       // Try a few different means to get the file as an url: 
       // new URL, ExternalContext's getResource, ClassLoaderUtils getResource
-      
-      url = _resolveNonStaticURL(name);
+
+      url = StyleSheetEntry.resolveNonStaticURL(name);
       if (url == null)
-        url =_resolveClassLoaderURL(name);
+        url =StyleSheetEntry.resolveClassLoaderURL(name);
     }
 
-    // Just use a DefaultNameResolver to resolve relative files
     return new DefaultNameResolver(file, url);
   }
 
-  // Gets a File for the specified name, or returns null if no file exists
-  // Try the local styles directory.
-  private File _resolveLocalFile(String name)
-  {
-    // Try the local styles directory
-    File file = new File(_localStylesDir, name);
-    if (file.exists())
-      return file;
-
-    return null;
-  }
-
-  // Gets an URL for the specified name using ClassLoaderUtils.getResource
-  private URL _resolveClassLoaderURL(String name)
-  {
-    if (name == null)
-      return null;
-    return ClassLoaderUtils.getResource(name);
-    
-  }
-  
-  // Gets an URL for the non static urls -- that is, urls that could change after the 
-  // server has started.
-  private URL _resolveNonStaticURL(String name)
-  {
-    if (name == null)
-      return null;
-    FacesContext fContext = FacesContext.getCurrentInstance();
-    if (fContext != null)
-    {
-      try
-      {
-        if (name.startsWith("http:") ||
-            name.startsWith("https:") ||
-            name.startsWith("file:") ||
-            name.startsWith("ftp:") ||
-            name.startsWith("jar:"))
-        {
-          URL url = new URL(name);
-          if (url != null)
-            return url;
-        }
-        else
-        {
-          String rootName = _getRootName(name);
-          // Return a URL for the application resource mapped to the specified path, 
-          // if it exists; otherwise, return null.
-          URL url = fContext.getExternalContext().getResource(rootName);
-          if (url != null)
-            return url;
-        }
-      }
-      catch (MalformedURLException e)
-      {
-        // Eat the MalformedURLException - maybe the name isn't an URL
-        ;
-      }
-    }
-    return null;
-  }
-
-  // Construct error message for the specified file name
-  private String _getFileNotFoundMessage(String name)
-  {
-    StringBuffer buffer = new StringBuffer();
-    buffer.append("Unable to locate style sheet \"");
-    buffer.append(name);
-    buffer.append("\" in ");
-
-    if (_localStylesDir != null)
-    {
-      buffer.append("local styles directory (");
-      buffer.append(_localStylesDir.getPath());
-      buffer.append("), ");
-    }
-
-    buffer.append("or on the class path.\n");
-    buffer.append("Please be sure that this style sheet is installed.");
-
-    return buffer.toString();
-  }
-
-  // Returns the File corresponding to the styles directory - either
-  // the local directory or the shared directory - depending on the
-  // shared value
-  private static File _getStylesDir(
-    StyleContext context)
-  {
-    String contextPath = context.getGeneratedFilesPath();
-
-    // We only need to look up the shared styles path if the shared
-    // context path is non-null.  If the shared context path is null,
-    // we don't have a shared styles directory (and calling
-    // Configuration.getPath() may throw a DirectoryUnavailableException).
-    if (contextPath == null)
-      return null;
-
-    String stylesPath = contextPath + "/adf/styles";
-
-    // Convert the path to a File
-    File stylesDir = new File(stylesPath);
-
-    // Make sure the directory actually exists
-    if (stylesDir.exists())
-       return stylesDir;
-
-    return null;
-  }
-
-  // Returns a name which can be resolved relative to the
-  // ServletContext root.
-  private static String _getRootName(String name)
-  {
-    // Tack on a starting "/" if the name doesn't already have one -
-    // seems to be required by ServletContext.getRealPath() and
-    // ServletContext.getResource() - at least on OC4J.
-    return (name.startsWith("/")) ? name : ("/" + name);
-  }
-
-
-
-  // A subclass of URLInputStreamProvider which never checks for
-  // modifications
-  private static class StaticURLInputStreamProvider
-    extends URLInputStreamProvider
-  {
-    public StaticURLInputStreamProvider(URL url)
-    {
-      super(url);
-    }
-
-    @Override
-    public boolean hasSourceChanged()
-    {
-      return false;
-    }
-  }
-
-
   private File _localStylesDir;
-
-  // Error messages
-  private static final String _STYLES_DIR_ERROR =
-    "Could not locate the Trinidad styles directory."
-    + "Please be sure that the Trinidad installable resources are installed.";
-
+  private InputStreamProvider _provider;
   private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(StyleSheetNameResolver.class);
+  private static final String _SERVICES_PROVIDER_KEY =
+    "org.apache.myfaces.trinidadinternal.skin.SERVICES_PROVIDER_KEY";
 }
 

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/cache/FileSystemStyleCache.java Tue Apr  6 17:00:41 2010
@@ -45,6 +45,8 @@ import org.apache.myfaces.trinidad.conte
 import org.apache.myfaces.trinidad.context.LocaleContext;
 import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
+import org.apache.myfaces.trinidad.share.io.NameResolver;
 import org.apache.myfaces.trinidad.skin.Icon;
 import org.apache.myfaces.trinidad.skin.Skin;
 import org.apache.myfaces.trinidad.style.Selector;
@@ -56,8 +58,6 @@ import org.apache.myfaces.trinidadintern
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SkinSelectors;
 import org.apache.myfaces.trinidadinternal.share.io.CachingNameResolver;
 import org.apache.myfaces.trinidadinternal.share.io.DefaultNameResolver;
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
-import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
 import org.apache.myfaces.trinidadinternal.share.xml.JaxpXMLProvider;
 import org.apache.myfaces.trinidadinternal.share.xml.XMLProvider;
 import org.apache.myfaces.trinidadinternal.style.CSSStyle;
@@ -451,7 +451,7 @@ public class FileSystemStyleCache implem
                         entryCache,
                         shortStyleClassMap,
                         namespacePrefixes,
-                        checkModified, 
+                        checkModified,
                         isDirty);
   }
 
@@ -492,7 +492,7 @@ public class FileSystemStyleCache implem
       if (!valid)
       {
         _deleteAll(existing);
-        
+
         // atomically remove the key from the cache if it currently points to the entry
         cache.remove(key, entry);
 
@@ -567,7 +567,7 @@ public class FileSystemStyleCache implem
     // Also, cache the new entry in the entry cache
     DerivationKey derivationKey = _getDerivationKey(context, document);
     entryCache.put(derivationKey, entry);
-    
+
     // just in case, clear the dirty flag.
     RenderingContext arc = RenderingContext.getCurrentInstance();
     Skin skin = arc.getSkin();
@@ -614,7 +614,7 @@ public class FileSystemStyleCache implem
     Iterator<StyleSheetNode> e = document.getStyleSheets(context);
 
     StyleSheetNode[] styleSheets;
-    
+
     if (e.hasNext())
     {
       styleSheets = CollectionUtils.toArray(e, StyleSheetNode.class);
@@ -953,7 +953,7 @@ public class FileSystemStyleCache implem
     }
     catch (IOException e)
     {
-      // This might happen if we couldn't delete the css file that was already there, so we 
+      // This might happen if we couldn't delete the css file that was already there, so we
       // are unable to recreate it.
       if (_LOG.isWarning())
         _LOG.warning("IOEXCEPTION_OPENNING_FILE", file);
@@ -1235,7 +1235,7 @@ public class FileSystemStyleCache implem
       if ((o.hashCode() == hashCode()) &&  (o instanceof Key))
       {
         Key key = (Key)o;
-        
+
         // Check the easy stuff first
         if  ((_short == key._short)             &&
              (_portlet == key._portlet)         &&
@@ -1541,8 +1541,8 @@ public class FileSystemStyleCache implem
         if (name != null && value != null)
           styleProperties.put(name, value);
       }
-      
-      // To save memory, we reuse CSSStyle objects if 
+
+      // To save memory, we reuse CSSStyle objects if
       // they have the same list of style property names and values.
       // StyleKey is the key into the StyleKey, CSSStyle map.
       StyleKey key = new StyleKey(styleProperties);
@@ -1552,14 +1552,14 @@ public class FileSystemStyleCache implem
         // no match is cached yet, so create a new CSSStyle and cache in the map.
         Style style = new CSSStyle(styleProperties);
         _styleNodeToStyleMap.put(key, style);
-        return style;         
+        return style;
       }
       else
       {
         return cachedStyle;
       }
     }
-    
+
     /**
      * A StyleKey object is used as a key into a map so that we can share CSSStyle objects
      * if they are equal and they have the same hashCode.
@@ -1570,7 +1570,7 @@ public class FileSystemStyleCache implem
       {
         _styleProperties = styleProperties;
       }
-      
+
       @Override
       public int hashCode()
       {
@@ -1587,19 +1587,19 @@ public class FileSystemStyleCache implem
         }
         return hash;
       }
-      @Override  
+      @Override
       public boolean equals(Object obj)
       {
         if (this == obj)
           return true;
         if (!(obj instanceof StyleKey))
           return false;
-          
+
         // obj at this point must be a StyleKey
         StyleKey test = (StyleKey)obj;
         return test._styleProperties.equals(this._styleProperties);
       }
-      
+
       Map<String, String> _styleProperties;
 
     }

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/StyleSheetDocumentUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/StyleSheetDocumentUtils.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/StyleSheetDocumentUtils.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/StyleSheetDocumentUtils.java Tue Apr  6 17:00:41 2010
@@ -28,9 +28,8 @@ import java.util.List;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 
-
+import org.apache.myfaces.trinidad.share.io.NameResolver;
 import org.apache.myfaces.trinidadinternal.share.io.DefaultNameResolver;
-import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
 
 import org.apache.myfaces.trinidadinternal.share.xml.ClassParserFactory;
 import org.apache.myfaces.trinidadinternal.share.xml.ParseContextImpl;

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java Tue Apr  6 17:00:41 2010
@@ -36,8 +36,8 @@ import org.xml.sax.SAXParseException;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 import org.apache.myfaces.trinidad.util.URLUtils;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
 
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
 import org.apache.myfaces.trinidadinternal.share.xml.BaseNodeParser;
 import org.apache.myfaces.trinidadinternal.share.xml.NodeParser;
 import org.apache.myfaces.trinidadinternal.share.xml.ParseContext;

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/Icon.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/Icon.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/Icon.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/Icon.java Tue Apr  6 17:00:41 2010
@@ -18,7 +18,7 @@
  */
 package org.apache.myfaces.trinidadinternal.ui.laf.base;
 
-import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
+import org.apache.myfaces.trinidad.share.io.NameResolver;
 
 import org.apache.myfaces.trinidadinternal.style.CoreStyle;
 import org.apache.myfaces.trinidadinternal.ui.laf.LookAndFeel;

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentIconRequest.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentIconRequest.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentIconRequest.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentIconRequest.java Tue Apr  6 17:00:41 2010
@@ -22,12 +22,13 @@ import java.awt.Color;
 
 import java.util.Map;
 
+import org.apache.myfaces.trinidad.share.io.NameResolver;
+
 import org.apache.myfaces.trinidadinternal.image.ImageConstants;
 import org.apache.myfaces.trinidadinternal.image.ImageContext;
 
 import org.apache.myfaces.trinidadinternal.image.cache.AccentColorizedIconKey;
 
-import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
 import org.apache.myfaces.trinidadinternal.ui.laf.LookAndFeel;
 
 /**

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentedLafIconProvider.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentedLafIconProvider.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentedLafIconProvider.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/AccentedLafIconProvider.java Tue Apr  6 17:00:41 2010
@@ -25,6 +25,8 @@ import java.awt.Color;
 import org.apache.myfaces.trinidadinternal.util.nls.LocaleUtils;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.share.io.NameResolver;
+
 
 import org.apache.myfaces.trinidadinternal.image.ImageConstants;
 import org.apache.myfaces.trinidadinternal.image.ImageContext;
@@ -40,8 +42,6 @@ import org.apache.myfaces.trinidadintern
 import org.apache.myfaces.trinidadinternal.ui.laf.base.IconKey;
 import org.apache.myfaces.trinidadinternal.ui.laf.base.Icon;
 
-import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
-
 /**
  * Abstracts out the retrieval of ImageProviderResponses for
  * dual ramp colorization.

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/CoreIconRequest.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/CoreIconRequest.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/CoreIconRequest.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/CoreIconRequest.java Tue Apr  6 17:00:41 2010
@@ -25,14 +25,14 @@ import java.io.IOException;
 import java.util.Map;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
+import org.apache.myfaces.trinidad.share.io.NameResolver;
 
 import org.apache.myfaces.trinidadinternal.image.ImageConstants;
 import org.apache.myfaces.trinidadinternal.image.ImageContext;
 
 import org.apache.myfaces.trinidadinternal.image.cache.CoreColorizedIconKey;
 
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
-import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
 import org.apache.myfaces.trinidadinternal.ui.laf.LookAndFeel;
 
 

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/FlippedIconRequest.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/FlippedIconRequest.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/FlippedIconRequest.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/FlippedIconRequest.java Tue Apr  6 17:00:41 2010
@@ -29,14 +29,14 @@ import javax.servlet.ServletContext;
 import javax.servlet.ServletRequest;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
+import org.apache.myfaces.trinidad.share.io.NameResolver;
 
 import org.apache.myfaces.trinidadinternal.image.ImageConstants;
 import org.apache.myfaces.trinidadinternal.image.ImageContext;
 import org.apache.myfaces.trinidadinternal.image.cache.FlippedIconKey;
 
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
 import org.apache.myfaces.trinidadinternal.share.io.ServletNameResolver;
-import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
 
 import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
 

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/IconArrayLafIconProvider.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/IconArrayLafIconProvider.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/IconArrayLafIconProvider.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/IconArrayLafIconProvider.java Tue Apr  6 17:00:41 2010
@@ -20,6 +20,7 @@ package org.apache.myfaces.trinidadinter
 
 import java.awt.Color;
 
+import org.apache.myfaces.trinidad.share.io.NameResolver;
 import org.apache.myfaces.trinidadinternal.ui.laf.LookAndFeel;
 import org.apache.myfaces.trinidadinternal.ui.laf.base.Icon;
 import org.apache.myfaces.trinidadinternal.ui.laf.base.IconKey;
@@ -27,7 +28,6 @@ import org.apache.myfaces.trinidadintern
 import org.apache.myfaces.trinidadinternal.image.ImageContext;
 import org.apache.myfaces.trinidadinternal.image.ImageProviderRequest;
 
-import org.apache.myfaces.trinidadinternal.share.io.NameResolver;
 import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
 
 /**

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/IconInputStreamProvider.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/IconInputStreamProvider.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/IconInputStreamProvider.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/IconInputStreamProvider.java Tue Apr  6 17:00:41 2010
@@ -24,7 +24,7 @@ import java.io.IOException;
 import javax.faces.context.FacesContext;
 
 import org.apache.myfaces.trinidad.context.RenderingContext;
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
 import org.apache.myfaces.trinidad.skin.Icon;
 
 /**

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/SimpleButtonUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/SimpleButtonUtils.java?rev=931223&r1=931222&r2=931223&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/SimpleButtonUtils.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/SimpleButtonUtils.java Tue Apr  6 17:00:41 2010
@@ -24,7 +24,7 @@ import javax.faces.context.FacesContext;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 import org.apache.myfaces.trinidad.context.RenderingContext;
-import org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider;
+import org.apache.myfaces.trinidad.share.io.InputStreamProvider;
 
 import org.apache.myfaces.trinidad.context.LocaleContext;
 import org.apache.myfaces.trinidadinternal.style.util.FontProxy;



Mime
View raw message