myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1703795 - in /myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago: context/ResourceManager.java internal/context/ResourceManagerImpl.java renderkit/AbstractRendererBaseWrapper.java
Date Fri, 18 Sep 2015 09:50:29 GMT
Author: lofwyr
Date: Fri Sep 18 09:50:29 2015
New Revision: 1703795

URL: http://svn.apache.org/viewvc?rev=1703795&view=rev
Log:
cleanup: remove deprecated code

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManager.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceManagerImpl.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/AbstractRendererBaseWrapper.java

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManager.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManager.java?rev=1703795&r1=1703794&r2=1703795&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManager.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManager.java
Fri Sep 18 09:50:29 2015
@@ -22,56 +22,25 @@ package org.apache.myfaces.tobago.contex
 import org.apache.myfaces.tobago.config.Configurable;
 import org.apache.myfaces.tobago.layout.Measure;
 
-import javax.faces.component.UIViewRoot;
 import javax.faces.context.FacesContext;
 import javax.faces.render.Renderer;
 
 public interface ResourceManager {
 
-  @Deprecated
-  String getJsp(UIViewRoot viewRoot, String name);
-
-  @Deprecated
-  String getProperty(UIViewRoot viewRoot, String bundle, String propertyKey);
-
   String getProperty(FacesContext facesContext, String bundle, String propertyKey);
 
-  @Deprecated
-  Renderer getRenderer(UIViewRoot viewRoot, String rendererType);
-
   Renderer getRenderer(FacesContext facesContext, String rendererType);
 
-  @Deprecated
-  String[] getScripts(UIViewRoot viewRoot, String name);
-
   String[] getScripts(FacesContext facesContext, String name);
 
-  @Deprecated
-  String[] getStyles(UIViewRoot viewRoot, String name);
-
   String[] getStyles(FacesContext facesContext, String name);
 
-  @Deprecated
-  String getThemeProperty(UIViewRoot viewRoot, String bundle, String propertyKey);
-
   Measure getThemeMeasure(FacesContext facesContext, Configurable configurable, String name);
 
   Measure getThemeMeasure(FacesContext facesContext, Configurable configurable, String name,
Measure defaultValue);
 
   Measure getThemeMeasure(FacesContext facesContext, String rendererType, Markup markup,
String name);
 
-  @Deprecated
-  String getImage(UIViewRoot viewRoot, String name);
-
-  /**
-   * @deprecated Please use {@link org.apache.myfaces.tobago.context.ResourceManagerUtils}
-   */
-  @Deprecated
-  String getImage(FacesContext facesContext, String name);
-
-  @Deprecated
-  String getImage(UIViewRoot viewRoot, String name, boolean ignoreMissing);
-
   /**
    * @param facesContext the current FacesContext
    * @param nameWithExtension The name with extension
@@ -90,7 +59,6 @@ public interface ResourceManager {
    * @param ignoreMissing if set to false, an error message will be logged, when image is
missing
    * @return the full file path
    */
-  String getImage(
-      FacesContext facesContext, String name, String extension, boolean ignoreMissing);
+  String getImage(FacesContext facesContext, String name, String extension, boolean ignoreMissing);
 
-  }
+}

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceManagerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceManagerImpl.java?rev=1703795&r1=1703794&r2=1703795&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceManagerImpl.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ResourceManagerImpl.java
Fri Sep 18 09:50:29 2015
@@ -113,34 +113,6 @@ public class ResourceManagerImpl impleme
     resourceList.put(resourceKey, value);
   }
 
-  @Deprecated
-  public String getJsp(final UIViewRoot viewRoot, final String name) {
-    String result = null;
-    if (name != null) {
-
-      final ClientPropertiesKey clientKey = ClientPropertiesKey.get(FacesContext.getCurrentInstance());
-      final JspCacheKey cacheKey = new JspCacheKey(clientKey, name);
-
-      result = jspCache.get(cacheKey);
-      if (result != null) {
-        return result;
-      }
-      try {
-        result = (String) getPaths(clientKey, "",
-            JSP, name, EXT_NONE, false, true, true, null, true, false).get(0);
-        jspCache.put(cacheKey, result);
-      } catch (final Exception e) {
-        LOG.error("name = '" + name + "' clientProperties = '" + clientKey.toString() + "'",
e);
-      }
-    }
-    return result;
-  }
-
-  @Deprecated
-  public String getProperty(final UIViewRoot viewRoot, final String bundle, final String
propertyKey) {
-    return getProperty(FacesContext.getCurrentInstance(), bundle, propertyKey);
-  }
-
   public String getProperty(final FacesContext facesContext, final String bundle, final String
propertyKey) {
 
     if (bundle != null && propertyKey != null) {
@@ -163,11 +135,6 @@ public class ResourceManagerImpl impleme
     return null;
   }
 
-  @Deprecated
-  public Renderer getRenderer(final UIViewRoot viewRoot, final String rendererType) {
-    return getRenderer(FacesContext.getCurrentInstance(), rendererType);
-  }
-
   public Renderer getRenderer(final FacesContext facesContext, final String rendererType)
{
     Renderer renderer = null;
 
@@ -200,47 +167,14 @@ public class ResourceManagerImpl impleme
     return renderer;
   }
 
-  @Deprecated
-  public String[] getScripts(final UIViewRoot viewRoot, final String name) {
-    return getScripts(FacesContext.getCurrentInstance(), name);
-  }
-
   public String[] getScripts(final FacesContext facesContext, final String name) {
     return getStrings(facesContext, name, null);
   }
 
-  @Deprecated
-  public String[] getStyles(final UIViewRoot viewRoot, final String name) {
-    return getStyles(FacesContext.getCurrentInstance(), name);
-  }
-
   public String[] getStyles(final FacesContext facesContext, final String name) {
     return getStrings(facesContext, name, null);
   }
 
-  @Deprecated
-  public String getThemeProperty(final UIViewRoot viewRoot, final String bundle, final String
propertyKey) {
-    if (bundle != null && propertyKey != null) {
-
-      final ClientPropertiesKey clientKey = ClientPropertiesKey.get(FacesContext.getCurrentInstance());
-      final PropertyCacheKey cacheKey = new PropertyCacheKey(clientKey, bundle, propertyKey);
-
-      StringValue result = propertyCache.get(cacheKey);
-      if (result == null) {
-        final List properties
-            = getPaths(clientKey, "", PROPERTY, bundle, EXT_NONE, false, true, false, propertyKey,
true, true);
-        if (properties != null) {
-          result = new StringValue((String) properties.get(0));
-        } else {
-          result = StringValue.NULL;
-        }
-        propertyCache.put(cacheKey, result);
-      }
-      return result.getValue();
-    }
-    return null;
-  }
-
   public Measure getThemeMeasure(final FacesContext facesContext, final Configurable configurable,
final String name) {
     return getThemeMeasure(facesContext, configurable.getRendererType(), configurable.getCurrentMarkup(),
name);
   }
@@ -297,21 +231,6 @@ public class ResourceManagerImpl impleme
     return result.getValue();
   }
 
-  @Deprecated
-  public String getImage(final UIViewRoot viewRoot, final String name) {
-    return getImage(FacesContext.getCurrentInstance(), name);
-  }
-
-  @Deprecated
-  public String getImage(final FacesContext facesContext, final String name) {
-    return getImage(facesContext, name, false);
-  }
-
-  @Deprecated
-  public String getImage(final UIViewRoot viewRoot, final String name, final boolean ignoreMissing)
{
-    return getImage(FacesContext.getCurrentInstance(), name, ignoreMissing);
-  }
-
   /**
    * {@inheritDoc}
    */

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/AbstractRendererBaseWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/AbstractRendererBaseWrapper.java?rev=1703795&r1=1703794&r2=1703795&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/AbstractRendererBaseWrapper.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/AbstractRendererBaseWrapper.java
Fri Sep 18 09:50:29 2015
@@ -111,8 +111,8 @@ public abstract class AbstractRendererBa
   }
 
   protected final RendererBase getRenderer(final FacesContext facesContext) {
-    final RendererBase renderer = (RendererBase) ResourceManagerFactory.
-        getResourceManager(facesContext).getRenderer(facesContext.getViewRoot(), getRendererType());
+    final RendererBase renderer = (RendererBase)
+        ResourceManagerFactory.getResourceManager(facesContext).getRenderer(facesContext,
getRendererType());
     if (renderer == null) {
       throw new RuntimeException("No renderer found for rendererType='"+ getRendererType()
           + "' in wrapper class '" + this.getClass().getName() + "'");



Mime
View raw message