You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2008/12/04 03:56:40 UTC
svn commit: r723197 - in
/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces:
context/FacesContextFactory.java lifecycle/LifecycleFactory.java
render/RenderKitFactory.java
Author: lu4242
Date: Wed Dec 3 18:56:39 2008
New Revision: 723197
URL: http://svn.apache.org/viewvc?rev=723197&view=rev
Log:
MYFACES-2106 update getFactory method of FactoryFinder (since all factories implements FacesWrapper interface it is safe to call getWrapped, but we don't need a check for it in getFactory, since it is already when lookup on ABSTRACT_FACTORY_CLASSES).
Modified:
myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/context/FacesContextFactory.java
myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/lifecycle/LifecycleFactory.java
myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/render/RenderKitFactory.java
Modified: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/context/FacesContextFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/context/FacesContextFactory.java?rev=723197&r1=723196&r2=723197&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/context/FacesContextFactory.java (original)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/context/FacesContextFactory.java Wed Dec 3 18:56:39 2008
@@ -19,6 +19,7 @@
package javax.faces.context;
import javax.faces.FacesException;
+import javax.faces.FacesWrapper;
import javax.faces.lifecycle.Lifecycle;
/**
@@ -27,11 +28,27 @@
* @author Manfred Geiler (latest modification by $Author$)
* @version $Revision$ $Date$
*/
-public abstract class FacesContextFactory
+public abstract class FacesContextFactory implements
+ FacesWrapper<FacesContextFactory>
{
public abstract FacesContext getFacesContext(Object context,
Object request,
Object response,
Lifecycle lifecycle)
throws FacesException;
+
+ /**
+ * If this factory has been decorated, the implementation doing the decorating may override this method to
+ * provide access to the implementation being wrapped. A default implementation is provided that returns
+ * <code>null</code>.
+ *
+ * @return the decorated <code>FacesContextFactory</code> if this factory decorates another,
+ * or <code>null</code> otherwise
+ *
+ * @since 2.0
+ */
+ public FacesContextFactory getWrapped()
+ {
+ return null;
+ }
}
Modified: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/lifecycle/LifecycleFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/lifecycle/LifecycleFactory.java?rev=723197&r1=723196&r2=723197&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/lifecycle/LifecycleFactory.java (original)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/lifecycle/LifecycleFactory.java Wed Dec 3 18:56:39 2008
@@ -20,13 +20,16 @@
import java.util.Iterator;
+import javax.faces.FacesWrapper;
+
/**
* see Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
*
* @author Manfred Geiler (latest modification by $Author$)
* @version $Revision$ $Date$
*/
-public abstract class LifecycleFactory
+public abstract class LifecycleFactory implements
+ FacesWrapper<LifecycleFactory>
{
public static final java.lang.String DEFAULT_LIFECYCLE = "DEFAULT";
@@ -36,4 +39,19 @@
public abstract Lifecycle getLifecycle(String lifecycleId);
public abstract Iterator<String> getLifecycleIds();
+
+ /**
+ * If this factory has been decorated, the implementation doing the decorating may override this method to
+ * provide access to the implementation being wrapped. A default implementation is provided that returns
+ * <code>null</code>.
+ *
+ * @return the decorated <code>LifecycleFactory</code> if this factory decorates another,
+ * or <code>null</code> otherwise
+ *
+ * @since 2.0
+ */
+ public LifecycleFactory getWrapped()
+ {
+ return null;
+ }
}
Modified: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/render/RenderKitFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/render/RenderKitFactory.java?rev=723197&r1=723196&r2=723197&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/render/RenderKitFactory.java (original)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/render/RenderKitFactory.java Wed Dec 3 18:56:39 2008
@@ -18,6 +18,7 @@
*/
package javax.faces.render;
+import javax.faces.FacesWrapper;
import javax.faces.context.FacesContext;
import java.util.Iterator;
@@ -27,7 +28,8 @@
* @author Manfred Geiler (latest modification by $Author$)
* @version $Revision$ $Date$
*/
-public abstract class RenderKitFactory
+public abstract class RenderKitFactory implements
+ FacesWrapper<RenderKitFactory>
{
public static final String HTML_BASIC_RENDER_KIT = "HTML_BASIC";
@@ -38,4 +40,19 @@
String renderKitId);
public abstract Iterator<String> getRenderKitIds();
+
+ /**
+ * If this factory has been decorated, the implementation doing the decorating may override this method to
+ * provide access to the implementation being wrapped. A default implementation is provided that returns
+ * <code>null</code>.
+ *
+ * @return the decorated <code>RenderKitFactory</code> if this factory decorates another,
+ * or <code>null</code> otherwise
+ *
+ * @since 2.0
+ */
+ public RenderKitFactory getWrapped()
+ {
+ return null;
+ }
}