JBoss Rich Faces SVN: r15315 - in root/framework/trunk: api/src/main/java/org/ajax4jsf/application and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-08-26 09:36:01 -0400 (Wed, 26 Aug 2009)
New Revision: 15315
Added:
root/framework/trunk/api/src/main/java/org/richfaces/log/
Removed:
root/framework/trunk/impl/src/main/java/org/richfaces/log/
Modified:
root/framework/trunk/api/pom.xml
root/framework/trunk/api/src/main/java/org/ajax4jsf/application/ViewHandlerWrapper.java
root/framework/trunk/api/src/main/java/org/ajax4jsf/resource/util/URLToStreamHelper.java
root/framework/trunk/api/src/main/java/org/richfaces/log/RichfacesLogger.java
root/framework/trunk/api/src/main/java/org/richfaces/skin/SkinFactory.java
root/framework/trunk/impl/pom.xml
root/framework/trunk/version-matrix/pom.xml
Log:
https://jira.jboss.org/jira/browse/RF-7559
Modified: root/framework/trunk/api/pom.xml
===================================================================
--- root/framework/trunk/api/pom.xml 2009-08-26 13:28:21 UTC (rev 15314)
+++ root/framework/trunk/api/pom.xml 2009-08-26 13:36:01 UTC (rev 15315)
@@ -22,6 +22,15 @@
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<scope>test</scope>
Modified: root/framework/trunk/api/src/main/java/org/ajax4jsf/application/ViewHandlerWrapper.java
===================================================================
--- root/framework/trunk/api/src/main/java/org/ajax4jsf/application/ViewHandlerWrapper.java 2009-08-26 13:28:21 UTC (rev 15314)
+++ root/framework/trunk/api/src/main/java/org/ajax4jsf/application/ViewHandlerWrapper.java 2009-08-26 13:36:01 UTC (rev 15315)
@@ -31,8 +31,8 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.Messages;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.log.RichfacesLogger;
+import org.slf4j.Logger;
/**
* Base wrapper for {@link javax.faces.application.ViewHandler} . By default, delegate all
@@ -45,7 +45,7 @@
public class ViewHandlerWrapper extends ViewHandler {
private static final String HANDLERS = "org.ajax4jsf.VIEW_HANDLERS";
- private static final Log _log = LogFactory.getLog(ViewHandlerWrapper.class);
+ private static final Logger _log = RichfacesLogger.APPLICATION.getLogger();
/**
* Wrapped ViewHandler
Modified: root/framework/trunk/api/src/main/java/org/ajax4jsf/resource/util/URLToStreamHelper.java
===================================================================
--- root/framework/trunk/api/src/main/java/org/ajax4jsf/resource/util/URLToStreamHelper.java 2009-08-26 13:28:21 UTC (rev 15314)
+++ root/framework/trunk/api/src/main/java/org/ajax4jsf/resource/util/URLToStreamHelper.java 2009-08-26 13:36:01 UTC (rev 15315)
@@ -26,8 +26,8 @@
import java.net.URL;
import java.net.URLConnection;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.log.RichfacesLogger;
+import org.slf4j.Logger;
/**
* Utility class to solve JAR locking issue using {@link URLConnection#setUseCaches(boolean)} method.
@@ -40,7 +40,7 @@
public final class URLToStreamHelper {
- private static final Log log = LogFactory.getLog(URLToStreamHelper.class);
+ private static final Logger log = RichfacesLogger.UTIL.getLogger();
private URLToStreamHelper() {
super();
Copied: root/framework/trunk/api/src/main/java/org/richfaces/log (from rev 15314, root/framework/trunk/impl/src/main/java/org/richfaces/log)
Modified: root/framework/trunk/api/src/main/java/org/richfaces/log/RichfacesLogger.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/log/RichfacesLogger.java 2009-08-26 13:28:21 UTC (rev 15314)
+++ root/framework/trunk/api/src/main/java/org/richfaces/log/RichfacesLogger.java 2009-08-26 13:36:01 UTC (rev 15315)
@@ -26,8 +26,10 @@
COMPONENTS("Components"),
- WEBAPP("Webapp");
+ WEBAPP("Webapp"),
+ UTIL("Util");
+
private static final String LOGGER_NAME_PREFIX = "org.richfaces.log.";
private String loggerName;
Modified: root/framework/trunk/api/src/main/java/org/richfaces/skin/SkinFactory.java
===================================================================
--- root/framework/trunk/api/src/main/java/org/richfaces/skin/SkinFactory.java 2009-08-26 13:28:21 UTC (rev 15314)
+++ root/framework/trunk/api/src/main/java/org/richfaces/skin/SkinFactory.java 2009-08-26 13:36:01 UTC (rev 15315)
@@ -36,8 +36,8 @@
import org.ajax4jsf.Messages;
import org.ajax4jsf.resource.util.URLToStreamHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.log.RichfacesLogger;
+import org.slf4j.Logger;
/**
* Base factory class ( implement Singleton design pattern ). Produce self
@@ -56,9 +56,8 @@
private static Map<ClassLoader, SkinFactory> instances =
Collections.synchronizedMap(new HashMap<ClassLoader, SkinFactory>());
- private static final Log log = LogFactory.getLog(SkinFactory.class);
+ private static final Logger log = RichfacesLogger.APPLICATION.getLogger();
-
public static void reset() {
instances = Collections.synchronizedMap(new HashMap<ClassLoader, SkinFactory>());
}
Modified: root/framework/trunk/impl/pom.xml
===================================================================
--- root/framework/trunk/impl/pom.xml 2009-08-26 13:28:21 UTC (rev 15314)
+++ root/framework/trunk/impl/pom.xml 2009-08-26 13:36:01 UTC (rev 15315)
@@ -132,10 +132,6 @@
<artifactId>richfaces-test-base</artifactId>
</dependency>
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
<groupId>opensymphony</groupId>
<artifactId>oscache</artifactId>
<optional>true</optional>
@@ -162,10 +158,6 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
</dependency>
Modified: root/framework/trunk/version-matrix/pom.xml
===================================================================
--- root/framework/trunk/version-matrix/pom.xml 2009-08-26 13:28:21 UTC (rev 15314)
+++ root/framework/trunk/version-matrix/pom.xml 2009-08-26 13:36:01 UTC (rev 15315)
@@ -236,11 +236,6 @@
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
</dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.1</version>
- </dependency>
<!-- -->
<!-- TODO: legacy dependnecies -->
15 years, 4 months
JBoss Rich Faces SVN: r15314 - in root: framework/trunk/impl/src/main/java/org/ajax4jsf/cache and 14 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-08-26 09:28:21 -0400 (Wed, 26 Aug 2009)
New Revision: 15314
Added:
root/framework/trunk/impl/src/main/java/org/richfaces/log/
root/framework/trunk/impl/src/main/java/org/richfaces/log/RichfacesLogger.java
Removed:
root/framework/trunk/impl/src/main/java/org/richfaces/util/RichfacesLogger.java
Modified:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycle.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycleFactory.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/CacheManager.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/EhCacheCacheFactory.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/LRUMapCacheFactory.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxRegionBrige.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/config/FrameworkConfiguration.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/InitPhaseListener.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/InitializationListener.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxChildrenRenderer.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxContainerRenderer.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/ChameleonRenderKitFactory.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/RendererBase.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/OneTimeRenderer.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ScriptRenderer.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/ServicesUtils.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseXMLFilter.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/CacheContent.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/FilterServletResponseWrapper.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
root/framework/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java
root/framework/trunk/impl/src/main/java/org/richfaces/resource/AbstractCacheableResource.java
root/framework/trunk/impl/src/main/java/org/richfaces/resource/CachedResourceImpl.java
root/framework/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java
root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java
root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinPropertyResolver.java
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxCommandRendererBase.java
Log:
RichFacesLogger moved to org.richfaces.log package
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -40,7 +40,7 @@
import org.ajax4jsf.resource.InternetResource;
import org.ajax4jsf.webapp.BaseFilter;
import org.ajax4jsf.webapp.FilterServletResponseWrapper;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycle.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycle.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycle.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -29,7 +29,7 @@
import javax.faces.lifecycle.Lifecycle;
import javax.faces.lifecycle.LifecycleFactory;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycleFactory.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycleFactory.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycleFactory.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -26,7 +26,7 @@
import javax.faces.lifecycle.Lifecycle;
import javax.faces.lifecycle.LifecycleFactory;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/CacheManager.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/CacheManager.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/CacheManager.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -28,7 +28,7 @@
import java.util.Properties;
import org.ajax4jsf.resource.util.URLToStreamHelper;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/EhCacheCacheFactory.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/EhCacheCacheFactory.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/EhCacheCacheFactory.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -5,7 +5,7 @@
import java.util.Map;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/LRUMapCacheFactory.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/LRUMapCacheFactory.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/LRUMapCacheFactory.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -23,7 +23,7 @@
import java.util.Map;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -28,7 +28,7 @@
import java.util.Properties;
import org.ajax4jsf.resource.util.URLToStreamHelper;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
import com.opensymphony.oscache.general.GeneralCacheAdministrator;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxRegionBrige.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxRegionBrige.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxRegionBrige.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -35,7 +35,7 @@
import org.ajax4jsf.Messages;
import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.event.AjaxListener;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -52,7 +52,7 @@
import org.ajax4jsf.event.AjaxListener;
import org.ajax4jsf.event.EventsQueue;
import org.ajax4jsf.renderkit.AjaxContainerRenderer;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -58,7 +58,7 @@
import org.ajax4jsf.model.ExtendedDataModel;
import org.ajax4jsf.model.SerializableDataModel;
import org.ajax4jsf.renderkit.AjaxChildrenRenderer;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/config/FrameworkConfiguration.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/config/FrameworkConfiguration.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/config/FrameworkConfiguration.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -10,7 +10,7 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.util.ELUtils;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -55,7 +55,7 @@
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererUtils;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -31,8 +31,8 @@
import org.ajax4jsf.Messages;
import org.ajax4jsf.context.AjaxContext;
+import org.richfaces.log.RichfacesLogger;
import org.richfaces.skin.SkinFactory;
-import org.richfaces.util.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/InitPhaseListener.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/InitPhaseListener.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/InitPhaseListener.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -34,7 +34,7 @@
import javax.faces.lifecycle.LifecycleFactory;
import org.ajax4jsf.application.AjaxViewHandler;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/InitializationListener.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/InitializationListener.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/InitializationListener.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -7,7 +7,7 @@
import javax.faces.event.SystemEvent;
import javax.faces.event.SystemEventListener;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxChildrenRenderer.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxChildrenRenderer.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxChildrenRenderer.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -34,7 +34,7 @@
import org.ajax4jsf.component.AjaxChildrenEncoder;
import org.ajax4jsf.component.AjaxOutput;
import org.ajax4jsf.context.AjaxContext;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxContainerRenderer.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxContainerRenderer.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxContainerRenderer.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -33,7 +33,7 @@
import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.event.AjaxEvent;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -62,7 +62,7 @@
import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.util.ServicesUtils;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/ChameleonRenderKitFactory.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/ChameleonRenderKitFactory.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/ChameleonRenderKitFactory.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -30,7 +30,7 @@
import javax.faces.render.RenderKitFactory;
import org.ajax4jsf.Messages;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/RendererBase.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/RendererBase.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/RendererBase.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -35,9 +35,9 @@
import org.ajax4jsf.Messages;
import org.ajax4jsf.resource.InternetResource;
+import org.richfaces.log.RichfacesLogger;
import org.richfaces.skin.Skin;
import org.richfaces.skin.SkinFactory;
-import org.richfaces.util.RichfacesLogger;
import org.slf4j.Logger;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -30,7 +30,7 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.Messages;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.richfaces.util.Util;
import org.slf4j.Logger;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -46,7 +46,7 @@
import org.ajax4jsf.resource.util.URLToStreamHelper;
import org.ajax4jsf.webapp.BaseFilter;
import org.ajax4jsf.webapp.WebXml;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
public class InternetResourceService {
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/OneTimeRenderer.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/OneTimeRenderer.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/OneTimeRenderer.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -27,7 +27,7 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.Messages;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -35,7 +35,7 @@
import javax.faces.lifecycle.LifecycleFactory;
import javax.faces.render.RenderKitFactory;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ScriptRenderer.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ScriptRenderer.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ScriptRenderer.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -27,7 +27,7 @@
import org.ajax4jsf.Messages;
import org.ajax4jsf.javascript.JSMin;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -46,7 +46,7 @@
import javax.faces.model.SelectItem;
import org.ajax4jsf.Messages;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/ServicesUtils.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/ServicesUtils.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/ServicesUtils.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -31,7 +31,7 @@
import javax.faces.FacesException;
import org.ajax4jsf.resource.util.URLToStreamHelper;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -51,7 +51,7 @@
import org.ajax4jsf.request.MultipartRequest;
import org.ajax4jsf.resource.InternetResourceService;
import org.richfaces.component.FileUploadConstants;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseXMLFilter.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseXMLFilter.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseXMLFilter.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -42,7 +42,7 @@
import org.ajax4jsf.application.AjaxViewHandler;
import org.ajax4jsf.context.ContextInitParameters;
import org.ajax4jsf.renderkit.AjaxContainerRenderer;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
public abstract class BaseXMLFilter {
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/CacheContent.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/CacheContent.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/CacheContent.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -37,7 +37,7 @@
import org.ajax4jsf.io.FastBufferOutputStream;
import org.ajax4jsf.io.FastBufferWriter;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.richfaces.util.Util;
import org.slf4j.Logger;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/FilterServletResponseWrapper.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/FilterServletResponseWrapper.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/FilterServletResponseWrapper.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -57,7 +57,7 @@
import org.ajax4jsf.io.FastBufferOutputStream;
import org.ajax4jsf.io.FastBufferReader;
import org.ajax4jsf.io.FastBufferWriter;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
import org.xml.sax.InputSource;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -31,7 +31,7 @@
import org.ajax4jsf.config.WebXMLParser;
import org.richfaces.VersionBean;
import org.richfaces.VersionBean.Version;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Copied: root/framework/trunk/impl/src/main/java/org/richfaces/log/RichfacesLogger.java (from rev 15312, root/framework/trunk/impl/src/main/java/org/richfaces/util/RichfacesLogger.java)
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/log/RichfacesLogger.java (rev 0)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/log/RichfacesLogger.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -0,0 +1,46 @@
+package org.richfaces.log;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public enum RichfacesLogger {
+
+ RESOURCE("Resource"),
+
+ RENDERKIT("Renderkit"),
+
+ CONFIG("Config"),
+
+ CONNECTION("Connection"),
+
+ APPLICATION("Application"),
+
+ CACHE("Cache"),
+
+ CONTEXT("Context"),
+
+ COMPONENTS("Components"),
+
+ WEBAPP("Webapp");
+
+ private static final String LOGGER_NAME_PREFIX = "org.richfaces.log.";
+
+ private String loggerName;
+
+ private RichfacesLogger(String loggerName) {
+ this.loggerName = LOGGER_NAME_PREFIX + loggerName;
+ }
+
+ public String getLoggerName() {
+ return loggerName;
+ }
+
+ public Logger getLogger() {
+ return LoggerFactory.getLogger(loggerName);
+ }
+}
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -40,7 +40,7 @@
import org.ajax4jsf.resource.InternetResource;
import org.ajax4jsf.resource.ResourceContext;
import org.richfaces.context.SingletonsContext;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.richfaces.util.Util;
import org.slf4j.Logger;
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/resource/AbstractCacheableResource.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/resource/AbstractCacheableResource.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/resource/AbstractCacheableResource.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -27,7 +27,7 @@
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.richfaces.util.Util;
import org.slf4j.Logger;
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/resource/CachedResourceImpl.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/resource/CachedResourceImpl.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/resource/CachedResourceImpl.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -37,7 +37,7 @@
import org.ajax4jsf.io.ByteBuffer;
import org.ajax4jsf.io.FastBufferInputStream;
import org.ajax4jsf.io.FastBufferOutputStream;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.richfaces.util.Util;
import org.slf4j.Logger;
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -45,7 +45,7 @@
import org.ajax4jsf.cache.CacheManager;
import org.richfaces.context.AttributesContext;
import org.richfaces.context.SingletonsContext;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.richfaces.util.Util;
import org.richfaces.util.RequestStateManager.BooleanRequestStateVariable;
import org.slf4j.Logger;
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -42,7 +42,7 @@
import org.ajax4jsf.Messages;
import org.ajax4jsf.resource.util.URLToStreamHelper;
import org.ajax4jsf.util.ELUtils;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinPropertyResolver.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinPropertyResolver.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinPropertyResolver.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -27,7 +27,7 @@
import javax.faces.el.PropertyResolver;
import org.ajax4jsf.Messages;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
Deleted: root/framework/trunk/impl/src/main/java/org/richfaces/util/RichfacesLogger.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/util/RichfacesLogger.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/util/RichfacesLogger.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -1,46 +0,0 @@
-package org.richfaces.util;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * @author Anton Belevich
- *
- */
-public enum RichfacesLogger {
-
- RESOURCE("Resource"),
-
- RENDERKIT("Renderkit"),
-
- CONFIG("Config"),
-
- CONNECTION("Connection"),
-
- APPLICATION("Application"),
-
- CACHE("Cache"),
-
- CONTEXT("Context"),
-
- COMPONENTS("Components"),
-
- WEBAPP("Webapp");
-
- private static final String LOGGER_NAME_PREFIX = "org.richfaces.log.";
-
- private String loggerName;
-
- private RichfacesLogger(String loggerName) {
- this.loggerName = LOGGER_NAME_PREFIX + loggerName;
- }
-
- public String getLoggerName() {
- return loggerName;
- }
-
- public Logger getLogger() {
- return LoggerFactory.getLogger(loggerName);
- }
-}
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxCommandRendererBase.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxCommandRendererBase.java 2009-08-26 13:22:50 UTC (rev 15313)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxCommandRendererBase.java 2009-08-26 13:28:21 UTC (rev 15314)
@@ -31,7 +31,7 @@
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererBase;
-import org.richfaces.util.RichfacesLogger;
+import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
/**
15 years, 4 months
JBoss Rich Faces SVN: r15313 - root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-08-26 09:22:50 -0400 (Wed, 26 Aug 2009)
New Revision: 15313
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxCommandRendererBase.java
Log:
https://jira.jboss.org/jira/browse/RF-7559
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxCommandRendererBase.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxCommandRendererBase.java 2009-08-26 13:21:43 UTC (rev 15312)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxCommandRendererBase.java 2009-08-26 13:22:50 UTC (rev 15313)
@@ -31,8 +31,8 @@
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererBase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
@@ -46,8 +46,7 @@
})
public abstract class AjaxCommandRendererBase extends RendererBase {
- private static final Log _log = LogFactory
- .getLog(AjaxCommandRendererBase.class);
+ private static final Logger _log = RichfacesLogger.RENDERKIT.getLogger();
protected void doDecode(FacesContext facesContext, UIComponent uiComponent) {
if (isSubmitted(facesContext, uiComponent)) {
15 years, 4 months
JBoss Rich Faces SVN: r15312 - in root/framework/trunk/impl/src/main/java/org: ajax4jsf/component and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-08-26 09:21:43 -0400 (Wed, 26 Aug 2009)
New Revision: 15312
Modified:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycle.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycleFactory.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxRegionBrige.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/InitPhaseListener.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxChildrenRenderer.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxContainerRenderer.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/ChameleonRenderKitFactory.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/RendererBase.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/OneTimeRenderer.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ScriptRenderer.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseXMLFilter.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/CacheContent.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/FilterServletResponseWrapper.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
root/framework/trunk/impl/src/main/java/org/richfaces/util/RichfacesLogger.java
Log:
https://jira.jboss.org/jira/browse/RF-7559
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -36,13 +36,12 @@
import org.ajax4jsf.component.AjaxViewRoot;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.context.ViewIdHolder;
-import org.ajax4jsf.context.ViewResources;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.resource.InternetResource;
import org.ajax4jsf.webapp.BaseFilter;
import org.ajax4jsf.webapp.FilterServletResponseWrapper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
@@ -56,7 +55,7 @@
public static final String SERIALIZED_STATE_KEY = "org.ajax4jsf.view.serializedstate";
- private static final Log _log = LogFactory.getLog(AjaxViewHandler.class);
+ private static final Logger _log = RichfacesLogger.APPLICATION.getLogger();
public static final String VIEW_EXPIRED = "org.ajax4jsf.view.EXPIRED";
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycle.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycle.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycle.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -29,8 +29,8 @@
import javax.faces.lifecycle.Lifecycle;
import javax.faces.lifecycle.LifecycleFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* @author shura (latest modification by $Author: alexsmirnov $)
@@ -46,7 +46,7 @@
private Lifecycle _default;
- private static Log _log = LogFactory.getLog(DebugLifecycle.class);
+ private static Logger _log = RichfacesLogger.APPLICATION.getLogger();
public static final String DEBUG_LYFECYCLE_ID = "DEBUG";
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycleFactory.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycleFactory.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/application/DebugLifecycleFactory.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -26,8 +26,8 @@
import javax.faces.lifecycle.Lifecycle;
import javax.faces.lifecycle.LifecycleFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* @author shura (latest modification by $Author: alexsmirnov $)
@@ -36,8 +36,7 @@
*/
public class DebugLifecycleFactory extends LifecycleFactory {
- private static final Log _log = LogFactory
- .getLog(DebugLifecycleFactory.class);
+ private static final Logger _log = RichfacesLogger.APPLICATION.getLogger();
private LifecycleFactory _defaultFactory;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxRegionBrige.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxRegionBrige.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxRegionBrige.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -35,8 +35,8 @@
import org.ajax4jsf.Messages;
import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.event.AjaxListener;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
@@ -62,7 +62,7 @@
// Private Fields
- private static final Log log = LogFactory.getLog(AjaxRegionBrige.class);
+ private static final Logger log = RichfacesLogger.COMPONENTS.getLogger();
/**
* Listener for call on Ajax Requests
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -52,8 +52,8 @@
import org.ajax4jsf.event.AjaxListener;
import org.ajax4jsf.event.EventsQueue;
import org.ajax4jsf.renderkit.AjaxContainerRenderer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* Custom ViewRoot for support render parts of tree for Ajax requests. Main
@@ -74,7 +74,7 @@
private AjaxRegionBrige _brige;
- private static final Log _log = LogFactory.getLog(AjaxViewRoot.class);
+ private static final Logger _log = RichfacesLogger.COMPONENTS.getLogger();
/**
*
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -58,8 +58,8 @@
import org.ajax4jsf.model.ExtendedDataModel;
import org.ajax4jsf.model.SerializableDataModel;
import org.ajax4jsf.renderkit.AjaxChildrenRenderer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* Base class for iterable components, like dataTable, Tomahawk dataList,
@@ -79,7 +79,7 @@
public final static DataModel EMPTY_MODEL = new ListDataModel(
Collections.EMPTY_LIST);
- private static final Log _log = LogFactory.getLog(UIDataAdaptor.class);
+ private static final Logger _log = RichfacesLogger.COMPONENTS.getLogger();
/**
* Base class for visit data model at phases decode, validation and update
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -55,8 +55,8 @@
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererUtils;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* This class incapsulated
@@ -69,7 +69,7 @@
public static final String SERVLET_ERROR_EXCEPTION_ATTRIBUTE = "javax.servlet.error.exception";
- private static final Log log = LogFactory.getLog(AjaxContext.class);
+ private static final Logger log = RichfacesLogger.CONTEXT.getLogger();
Set<String> ajaxAreasToRender = new LinkedHashSet<String>();
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -21,11 +21,8 @@
package org.ajax4jsf.event;
-import java.io.IOException;
-import java.util.Iterator;
import java.util.Map;
-import javax.faces.FacesException;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
@@ -34,9 +31,9 @@
import org.ajax4jsf.Messages;
import org.ajax4jsf.context.AjaxContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.richfaces.skin.SkinFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* Listener for act before Render phase to set RenderKit Id for current skin.
@@ -54,7 +51,7 @@
public static final String VIEW_BEAN_PREFIX = "org.ajax4jsf.viewbean:";
- private static final Log log = LogFactory.getLog(AjaxPhaseListener.class);
+ private static final Logger log = RichfacesLogger.APPLICATION.getLogger();
public static final String AJAX_BEAN_PREFIX = "org.ajax4jsf.ajaxviewbean:";
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/InitPhaseListener.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/InitPhaseListener.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/event/InitPhaseListener.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -34,8 +34,8 @@
import javax.faces.lifecycle.LifecycleFactory;
import org.ajax4jsf.application.AjaxViewHandler;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* One time called listener, for initialize framework at first request.
@@ -44,10 +44,14 @@
*/
public class InitPhaseListener implements PhaseListener {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 8389169240912928686L;
private volatile boolean removed= false;
private volatile boolean initialized = false;
- private static final Log log = LogFactory.getLog(InitPhaseListener.class);
+ private static final Logger log = RichfacesLogger.APPLICATION.getLogger();
/* (non-Javadoc)
* @see javax.faces.event.PhaseListener#afterPhase(javax.faces.event.PhaseEvent)
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxChildrenRenderer.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxChildrenRenderer.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxChildrenRenderer.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -34,8 +34,8 @@
import org.ajax4jsf.component.AjaxChildrenEncoder;
import org.ajax4jsf.component.AjaxOutput;
import org.ajax4jsf.context.AjaxContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* @author shura
@@ -44,7 +44,7 @@
public abstract class AjaxChildrenRenderer extends AjaxComponentRendererBase
implements AjaxRenderer {
- public static final Log log = LogFactory.getLog(AjaxChildrenRenderer.class);
+ private static final Logger log = RichfacesLogger.RENDERKIT.getLogger();
public static final String[] SPECIAL_COMPONENTS_TYPES = {
"org.ajax4jsf.Bundle"/* UILoadBundle.COMPONENT_TYPE */,
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxContainerRenderer.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxContainerRenderer.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxContainerRenderer.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -33,8 +33,8 @@
import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.event.AjaxEvent;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* Base renderer for all AJAX - subview components.
@@ -65,7 +65,7 @@
public static final String AJAX_UPDATE_HEADER = "Ajax-Update-Ids";
- static final Log log = LogFactory.getLog(AjaxContainerRenderer.class);
+ private static final Logger log = RichfacesLogger.RENDERKIT.getLogger();
public static final String AJAX_FLAG_HEADER = "Ajax-Response";
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -62,8 +62,8 @@
import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.util.ServicesUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* @author shura
@@ -107,7 +107,7 @@
*/
public static final String LIMITRENDER_ATTR_NAME = "limitRender";
- private static Log log = LogFactory.getLog(AjaxRendererUtils.class);
+ private static final Logger log = RichfacesLogger.RENDERKIT.getLogger();
public static final String AJAX_REGIONS_ATTRIBUTE = "reRender";
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/ChameleonRenderKitFactory.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/ChameleonRenderKitFactory.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/ChameleonRenderKitFactory.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -30,8 +30,8 @@
import javax.faces.render.RenderKitFactory;
import org.ajax4jsf.Messages;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* @author shura (latest modification by $Author: alexsmirnov $)
@@ -46,8 +46,7 @@
// private static final String AJAX_RENDER_KIT_PARAMETER =
// "AJAX_RENDER_KIT_ID";
- private static final Log _log = LogFactory
- .getLog(ChameleonRenderKitFactory.class);
+ private static final Logger _log = RichfacesLogger.RENDERKIT.getLogger();
/**
* @param defaultFactory
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/RendererBase.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/RendererBase.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/RendererBase.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -35,10 +35,10 @@
import org.ajax4jsf.Messages;
import org.ajax4jsf.resource.InternetResource;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.richfaces.skin.Skin;
import org.richfaces.skin.SkinFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
@@ -54,7 +54,7 @@
* logger for common cases.
*/
protected static final String JAVASCRIPT_NAMESPACE = "Exadel";
- private static final Log log = LogFactory.getLog(RendererBase.class);
+ private static final Logger log = RichfacesLogger.RENDERKIT.getLogger();
private static final RendererUtils utils = RendererUtils.getInstance();
private SkinFactory skinFactory = null;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -30,9 +30,9 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.Messages;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
import org.richfaces.util.Util;
+import org.slf4j.Logger;
/**
* Base class for all Html page resources - images, scripts, styles etc. Realise
@@ -47,8 +47,7 @@
*/
public abstract class InternetResourceBase implements InternetResource {
- private static final Log log = LogFactory
- .getLog(InternetResourceBase.class);
+ private static final Logger log = RichfacesLogger.RESOURCE.getLogger();
static final int BUFFER_SIZE = 1024;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -46,12 +46,11 @@
import org.ajax4jsf.resource.util.URLToStreamHelper;
import org.ajax4jsf.webapp.BaseFilter;
import org.ajax4jsf.webapp.WebXml;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
public class InternetResourceService {
- private static final Log log = LogFactory
- .getLog(InternetResourceService.class);
+ private static final Logger log = RichfacesLogger.RESOURCE.getLogger();
static final String ENABLE_CACHING_PARAMETER = "enable-cache";
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/OneTimeRenderer.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/OneTimeRenderer.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/OneTimeRenderer.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -27,8 +27,8 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.Messages;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* Base class for resources, rendered only one time in page ( JavaScript, CSS )
@@ -38,7 +38,7 @@
*/
public abstract class OneTimeRenderer extends BaseResourceRenderer {
- private static final Log log = LogFactory.getLog(OneTimeRenderer.class);
+ private static final Logger log = RichfacesLogger.RESOURCE.getLogger();
/* (non-Javadoc)
* @see org.ajax4jsf.resource.BaseResourceRenderer#encodeBegin(org.ajax4jsf.resource.InternetResource, javax.faces.context.FacesContext, java.lang.Object, java.util.Map)
*/
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -35,8 +35,8 @@
import javax.faces.lifecycle.LifecycleFactory;
import javax.faces.render.RenderKitFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* Lifecycle for simulate faces request processing for resource.
@@ -49,7 +49,7 @@
private Lifecycle lifecycle;
- private static final Log _log = LogFactory.getLog(ResourceLifecycle.class);
+ private static final Logger _log = RichfacesLogger.RESOURCE.getLogger();
/*
* (non-Javadoc)
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ScriptRenderer.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ScriptRenderer.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/resource/ScriptRenderer.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -27,10 +27,8 @@
import org.ajax4jsf.Messages;
import org.ajax4jsf.javascript.JSMin;
-import org.ajax4jsf.resource.InternetResource;
-import org.ajax4jsf.resource.ResourceContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
@@ -41,7 +39,7 @@
private static final String COMPRESS_SCRIPTS_PARAMETER = "org.ajax4jsf.COMPRESS_SCRIPT";
- private static final Log _log = LogFactory.getLog(ScriptRenderer.class);
+ private static final Logger _log = RichfacesLogger.RESOURCE.getLogger();
/* (non-Javadoc)
* @see org.ajax4jsf.resource.BaseResourceRenderer#send(org.ajax4jsf.resource.InternetResource, org.ajax4jsf.resource.ResourceContext)
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -50,9 +50,9 @@
import org.ajax4jsf.renderkit.AjaxContainerRenderer;
import org.ajax4jsf.request.MultipartRequest;
import org.ajax4jsf.resource.InternetResourceService;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.richfaces.component.FileUploadConstants;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* Base class for request processing filters, with convert Htmp content to XML
@@ -70,7 +70,7 @@
public static final String AJAX_PUSH_KEY_HEADER = "Ajax-Push-Key";
- private static final Log log = LogFactory.getLog(BaseFilter.class);
+ private static final Logger log = RichfacesLogger.WEBAPP.getLogger();
public static final boolean DEBUG = true;
@@ -153,7 +153,7 @@
parameters.append(name).append(" : '").append(
config.getInitParameter(name)).append('\n');
}
- log.debug(parameters);
+ log.debug(parameters.toString());
// log.debug("Stack Trace", new Exception());
}
// Save config
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseXMLFilter.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseXMLFilter.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/BaseXMLFilter.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -42,13 +42,13 @@
import org.ajax4jsf.application.AjaxViewHandler;
import org.ajax4jsf.context.ContextInitParameters;
import org.ajax4jsf.renderkit.AjaxContainerRenderer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
public abstract class BaseXMLFilter {
public static final String AJAX_EXPIRED = "Ajax-Expired";
- private static final Log log = LogFactory.getLog(BaseXMLFilter.class);
+ private static final Logger log = RichfacesLogger.WEBAPP.getLogger();
public static final String APPLICATION_SCOPE_KEY = BaseXMLFilter.class.getName();
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/CacheContent.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/CacheContent.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/CacheContent.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -37,9 +37,9 @@
import org.ajax4jsf.io.FastBufferOutputStream;
import org.ajax4jsf.io.FastBufferWriter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
import org.richfaces.util.Util;
+import org.slf4j.Logger;
/**
* @author shura (latest modification by $Author: alexsmirnov $)
@@ -52,7 +52,7 @@
*/
private static final long serialVersionUID = 8120940486890871177L;
- private static final Log _log = LogFactory.getLog(CacheContent.class);
+ private static final Logger _log = RichfacesLogger.WEBAPP.getLogger();
// private transient ByteArrayOutputStream outputStream ;
private transient FastBufferOutputStream outputStream;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/FilterServletResponseWrapper.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/FilterServletResponseWrapper.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/FilterServletResponseWrapper.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -57,8 +57,8 @@
import org.ajax4jsf.io.FastBufferOutputStream;
import org.ajax4jsf.io.FastBufferReader;
import org.ajax4jsf.io.FastBufferWriter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
import org.xml.sax.InputSource;
/**
@@ -69,7 +69,7 @@
*/
public class FilterServletResponseWrapper extends HttpServletResponseWrapper {
- private static final Log log = LogFactory.getLog(FilterServletResponseWrapper.class);
+ private static final Logger log = RichfacesLogger.WEBAPP.getLogger();
public static final String DEFAULT_ENCODING = "UTF-8";
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -29,10 +29,10 @@
import javax.servlet.http.HttpServletRequest;
import org.ajax4jsf.config.WebXMLParser;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.richfaces.VersionBean;
import org.richfaces.VersionBean.Version;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* Parse at startup application web.xml and store servlet and filter mappings.
@@ -51,7 +51,7 @@
*/
private static final long serialVersionUID = -9042908418843695017L;
- static final Log _log = LogFactory.getLog(WebXml.class);
+ static final Logger _log = RichfacesLogger.WEBAPP.getLogger();
public static final String RESOURCE_URI_PREFIX = "a4j";
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/util/RichfacesLogger.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/util/RichfacesLogger.java 2009-08-26 13:02:34 UTC (rev 15311)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/util/RichfacesLogger.java 2009-08-26 13:21:43 UTC (rev 15312)
@@ -20,8 +20,14 @@
APPLICATION("Application"),
- CACHE("Cache");
+ CACHE("Cache"),
+ CONTEXT("Context"),
+
+ COMPONENTS("Components"),
+
+ WEBAPP("Webapp");
+
private static final String LOGGER_NAME_PREFIX = "org.richfaces.log.";
private String loggerName;
15 years, 4 months
JBoss Rich Faces SVN: r15311 - in root/framework/trunk/impl/src/main/java/org: ajax4jsf/util and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-08-26 09:02:34 -0400 (Wed, 26 Aug 2009)
New Revision: 15311
Modified:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/CacheManager.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/EhCacheCacheFactory.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/LRUMapCacheFactory.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/ServicesUtils.java
root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java
root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinPropertyResolver.java
root/framework/trunk/impl/src/main/java/org/richfaces/webapp/taglib/UIComponentELTagBase.java
Log:
https://jira.jboss.org/jira/browse/RF-7559
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/CacheManager.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/CacheManager.java 2009-08-26 12:41:39 UTC (rev 15310)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/CacheManager.java 2009-08-26 13:02:34 UTC (rev 15311)
@@ -28,15 +28,16 @@
import java.util.Properties;
import org.ajax4jsf.resource.util.URLToStreamHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* CacheManager is used in J2SE environments for looking up named caches.
*/
//TODO stop caches on application stop
public class CacheManager {
- private static final Log log = LogFactory.getLog(CacheManager.class);
+
+ private static final Logger log = RichfacesLogger.CACHE.getLogger();
private static final String FACTORY_PROPERTY_NAME = "org.ajax4jsf.cache.CacheFactory";
public static final String CACHE_MANAGER_FACTORY_CLASS = "org.ajax4jsf.cache.CACHE_MANAGER_FACTORY_CLASS";
@@ -121,7 +122,7 @@
return s == null || "".equals(s);
}
- String findFactory(String factoryId, Map env) {
+ String findFactory(String factoryId, Map<?, ?> env) {
String envFactoryClass = (String) env.get(CACHE_MANAGER_FACTORY_CLASS);
if (!isEmptyString(envFactoryClass)) return envFactoryClass;
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/EhCacheCacheFactory.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/EhCacheCacheFactory.java 2009-08-26 12:41:39 UTC (rev 15310)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/EhCacheCacheFactory.java 2009-08-26 13:02:34 UTC (rev 15311)
@@ -5,8 +5,8 @@
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* @author Nick Belaevski
@@ -14,7 +14,7 @@
*/
public class EhCacheCacheFactory implements CacheFactory {
- private static final Log log = LogFactory.getLog(EhCacheCacheFactory.class);
+ private static final Logger log = RichfacesLogger.CACHE.getLogger();
public Cache createCache(Map<?, ?> env) {
log.info("Creating EhCache cache instance");
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/LRUMapCacheFactory.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/LRUMapCacheFactory.java 2009-08-26 12:41:39 UTC (rev 15310)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/LRUMapCacheFactory.java 2009-08-26 13:02:34 UTC (rev 15311)
@@ -23,8 +23,8 @@
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
@@ -34,7 +34,7 @@
*/
public class LRUMapCacheFactory implements CacheFactory {
- private static final Log log = LogFactory.getLog(LRUMapCacheFactory.class);
+ private static final Logger log = RichfacesLogger.CACHE.getLogger();
public final static String CACHE_SIZE_PARAMETER = "org.ajax4jsf.cache.LRU_MAP_CACHE_SIZE";
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java 2009-08-26 12:41:39 UTC (rev 15310)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/cache/OSCacheCacheFactory.java 2009-08-26 13:02:34 UTC (rev 15311)
@@ -28,8 +28,8 @@
import java.util.Properties;
import org.ajax4jsf.resource.util.URLToStreamHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
import com.opensymphony.oscache.general.GeneralCacheAdministrator;
@@ -40,7 +40,7 @@
*/
public class OSCacheCacheFactory implements CacheFactory {
- private static final Log log = LogFactory.getLog(OSCacheCacheFactory.class);
+ private static final Logger log = RichfacesLogger.CACHE.getLogger();
private Properties loadProperties(URL url) throws IOException {
Properties properties = new Properties();
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java 2009-08-26 12:41:39 UTC (rev 15310)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java 2009-08-26 13:02:34 UTC (rev 15311)
@@ -43,12 +43,11 @@
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;
-import javax.faces.el.ValueBinding;
import javax.faces.model.SelectItem;
import org.ajax4jsf.Messages;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* @author Maksim Kaszynski
@@ -56,7 +55,7 @@
*/
public class SelectUtils {
- private static final Log log = LogFactory.getLog(SelectUtils.class);
+ private static final Logger log = RichfacesLogger.APPLICATION.getLogger();
/**
* Gathers all select items from specified component's children
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/ServicesUtils.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/ServicesUtils.java 2009-08-26 12:41:39 UTC (rev 15310)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/util/ServicesUtils.java 2009-08-26 13:02:34 UTC (rev 15311)
@@ -31,8 +31,8 @@
import javax.faces.FacesException;
import org.ajax4jsf.resource.util.URLToStreamHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* @author shura
@@ -40,7 +40,7 @@
*/
public class ServicesUtils {
- private static final Log log = LogFactory.getLog(ServicesUtils.class);
+ private static final Logger log = RichfacesLogger.APPLICATION.getLogger();
private static Map<String, Map<ClassLoader, Class<?>>> _services =
Collections.synchronizedMap(new HashMap<String, Map<ClassLoader, Class<?>>>());
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java 2009-08-26 12:41:39 UTC (rev 15310)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java 2009-08-26 13:02:34 UTC (rev 15311)
@@ -38,13 +38,12 @@
import javax.faces.application.Application;
import javax.faces.application.ApplicationFactory;
import javax.faces.context.FacesContext;
-import javax.faces.el.ReferenceSyntaxException;
import org.ajax4jsf.Messages;
import org.ajax4jsf.resource.util.URLToStreamHelper;
import org.ajax4jsf.util.ELUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* Implementation of {@link SkinFactory} with building skins from properties
@@ -102,7 +101,7 @@
private ValueExpression skinBinding = null;
private String baseSkinName = null;
private ValueExpression baseSkinBinding = null;
- private static final Log log = LogFactory.getLog(SkinFactoryImpl.class);
+ private static final Logger log = RichfacesLogger.APPLICATION.getLogger();
private static final String A4J_BASE_SKIN_PARAMETER = "org.ajax4jsf.BASE_SKIN";
@@ -298,7 +297,6 @@
* @return
* @throws SkinNotFoundException
* @throws FacesException
- * @throws ReferenceSyntaxException
*/
protected Properties loadProperties(String name, String[] paths) throws SkinNotFoundException, FacesException {
ClassLoader loader = getClassLoader();
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinPropertyResolver.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinPropertyResolver.java 2009-08-26 12:41:39 UTC (rev 15310)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/skin/SkinPropertyResolver.java 2009-08-26 13:02:34 UTC (rev 15311)
@@ -27,9 +27,8 @@
import javax.faces.el.PropertyResolver;
import org.ajax4jsf.Messages;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.richfaces.skin.Skin;
+import org.richfaces.util.RichfacesLogger;
+import org.slf4j.Logger;
/**
* Resolve Skin propertyes.
@@ -39,7 +38,7 @@
*/
public class SkinPropertyResolver extends PropertyResolver {
- private static final Log log = LogFactory.getLog(SkinPropertyResolver.class);
+ private static final Logger log = RichfacesLogger.APPLICATION.getLogger();
private PropertyResolver parent = null;
/**
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/webapp/taglib/UIComponentELTagBase.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/webapp/taglib/UIComponentELTagBase.java 2009-08-26 12:41:39 UTC (rev 15310)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/webapp/taglib/UIComponentELTagBase.java 2009-08-26 13:02:34 UTC (rev 15311)
@@ -35,8 +35,6 @@
import org.ajax4jsf.Messages;
import org.ajax4jsf.component.UIDataAdaptor;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
/**
* @author Maksim Kaszynski
@@ -44,8 +42,6 @@
*/
public abstract class UIComponentELTagBase extends UIComponentELTag {
- private static final Log log = LogFactory.getLog(UIComponentELTagBase.class);
-
protected void setActionListenerProperty(UIComponent component, MethodExpression actionListener) {
if (actionListener != null) {
if (component instanceof ActionSource2) {
15 years, 4 months
JBoss Rich Faces SVN: r15310 - in root/ui/trunk/components/core/src/main/java/org/richfaces: component/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-08-26 08:41:39 -0400 (Wed, 26 Aug 2009)
New Revision: 15310
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIPush.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxFunction.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlPush.java
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxPushRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-7759
HtmlAjaxFunction updated to comply with JSF 2.0 standards
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIPush.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIPush.java 2009-08-26 12:29:52 UTC (rev 15309)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIPush.java 2009-08-26 12:41:39 UTC (rev 15310)
@@ -22,13 +22,10 @@
package org.richfaces.component;
import java.io.IOException;
-import java.util.Collection;
-import java.util.Collections;
import javax.el.MethodExpression;
import javax.faces.component.NamingContainer;
import javax.faces.component.UICommand;
-import javax.faces.component.behavior.ClientBehaviorHolder;
import javax.faces.context.FacesContext;
import javax.faces.event.BehaviorEvent;
import javax.faces.event.FacesEvent;
@@ -39,16 +36,12 @@
* @author shura
*
*/
-public class UIPush extends UICommand implements ClientBehaviorHolder {
+public class UIPush extends UICommand {
public static final String COMPONENT_TYPE = "org.richfaces.Push";
public final static String COMPONENT_FAMILY = "org.richfaces.Push";
- public static final String ON_DATA_AVAILABLE = "ondataavailable";
-
- private static final Collection<String> EVENT_NAMES = Collections.singleton(ON_DATA_AVAILABLE);
-
private transient boolean hasActiveBehavior = false;
private static enum PropertyKeys {
@@ -114,16 +107,6 @@
}
@Override
- public String getDefaultEventName() {
- return ON_DATA_AVAILABLE;
- }
-
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
- @Override
public String getFamily() {
return COMPONENT_FAMILY;
}
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxFunction.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxFunction.java 2009-08-26 12:29:52 UTC (rev 15309)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlAjaxFunction.java 2009-08-26 12:41:39 UTC (rev 15310)
@@ -5,12 +5,8 @@
import java.util.Collections;
import java.util.LinkedHashSet;
-import javax.el.ELException;
-import javax.el.ValueExpression;
-import javax.faces.FacesException;
import javax.faces.component.UICommand;
import javax.faces.component.behavior.ClientBehaviorHolder;
-import javax.faces.context.FacesContext;
public class HtmlAjaxFunction extends UICommand implements ClientBehaviorHolder {
@@ -22,643 +18,81 @@
new LinkedHashSet<String>(Arrays.asList("begin", "complete", "beforedomupdate"))
);
+ private static enum PropertyKeys {
+ limitRender, name, onbeforedomupdate, onbegin, oncomplete, execute, render, status
+ }
+
public HtmlAjaxFunction() {
setRendererType("org.richfaces.FunctionRenderer");
}
- /*
- * Limits JSF tree processing (decoding, conversion, validation and model updating) only to a component that sends the request. Boolean
- */
- private boolean _ajaxSingle = false;
-
- private boolean _ajaxSingleSet = false;
-
- /*
- * If "true", after process validations phase it skips updates of model beans on a force render response. It can be used for validating components input
- */
- private boolean _bypassUpdates = false;
-
- private boolean _bypassUpdatesSet = false;
-
- /*
- * Serialized (on default with JSON) data passed on the client by a developer on AJAX request. It's accessible via "data.foo" syntax
- */
- private Object _data = null;
-
- /*
- * Name of requests queue to avoid send next request before complete other from same event. Can be used to reduce number of requests of frequently events (key press, mouse move etc.)
- */
- private String _eventsQueue = null;
-
- /*
- * ID of an element to set focus after request is completed on client side
- */
- private String _focus = null;
-
- /*
- * Attribute allows to ignore an Ajax Response produced by a request if the newest 'similar' request is
-in a queue already. ignoreDupResponses="true" does not cancel the request while it is processed on the server,
-but just allows to avoid unnecessary updates on the client side if the response isn't actual now
- */
- private boolean _ignoreDupResponses = false;
-
- private boolean _ignoreDupResponsesSet = false;
-
- /*
- * If "true", then of all AJAX-rendered on the page components only those will be updated,
- which ID's are passed to the "reRender" attribute of the describable component.
- "false"-the default value-means that all components with ajaxRendered="true" will be updated.
- */
- private boolean _limitRender = false;
-
- private boolean _limitRenderSet = false;
-
- /*
- * Name of generated JavaScript function definition
- */
- private String _name = null;
-
- /*
- * The client-side script method to be called before DOM is updated
- */
- private String _onbeforedomupdate = null;
-
- private String _onbegin = null;
+ public boolean isLimitRender() {
+ return Boolean.parseBoolean(getStateHelper().eval(PropertyKeys.limitRender,
+ Boolean.FALSE).toString());
+ }
- /*
- * The client-side script method to be called after the request is completed
- */
- private String _oncomplete = null;
-
- /*
- * Id['s] (in format of call UIComponent.findComponent()) of components, processed at the phases 2-5 in case of AjaxRequest caused by this component. Can be single id, comma-separated list of Id's, or EL Expression with array or Collection
- */
- private Object _process = null;
-
- /*
- * Id['s] (in format of call UIComponent.findComponent()) of components, rendered in case of AjaxRequest caused by this component. Can be single id, comma-separated list of Id's, or EL Expression with array or Collection
- */
- private Object _reRender = null;
-
- /*
- * Attribute defines the time (in ms.) that the request will be wait in the queue before it is ready to send.
-When the delay time is over, the request will be sent to the server or removed if the newest 'similar' request is in a queue already
- */
- private int _requestDelay = Integer.MIN_VALUE;
-
- private boolean _requestDelaySet = false;
-
- /*
- * If there are any component requests with identical IDs then these requests will be grouped.
- */
- private String _similarityGroupingId = null;
-
- /*
- * ID (in format of call UIComponent.findComponent()) of Request status component
- */
- private String _status = null;
-
- /*
- * Response waiting time on a particular request. If a response is not received during this time, the request is aborted
- */
- private int _timeout = Integer.MIN_VALUE;
-
- private boolean _timeoutSet = false;
-
- public boolean isAjaxSingle(){
- if (this._ajaxSingleSet) {
- return (this._ajaxSingle);
- }
- ValueExpression ve = getValueExpression("ajaxSingle");
- if (ve != null) {
- Boolean value = null;
-
- try {
- value = (Boolean) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- if (null == value) {
- return (this._ajaxSingle);
- }
-
- return value;
- } else {
- return (this._ajaxSingle);
- }
-
+ public void setLimitRender(boolean limitRenderValue) {
+ getStateHelper().put(PropertyKeys.limitRender, limitRenderValue);
}
-
- public void setAjaxSingle(boolean _ajaxSingle){
- this._ajaxSingle = _ajaxSingle;
- this._ajaxSingleSet = true;
+
+ public String getName() {
+ //TODO required attribute
+ return (String) getStateHelper().eval(PropertyKeys.name);
}
-
- public boolean isBypassUpdates(){
- if (this._bypassUpdatesSet) {
- return (this._bypassUpdates);
- }
- ValueExpression ve = getValueExpression("bypassUpdates");
- if (ve != null) {
- Boolean value = null;
-
- try {
- value = (Boolean) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- if (null == value) {
- return (this._bypassUpdates);
- }
-
- return value;
- } else {
- return (this._bypassUpdates);
- }
-
+
+ public void setName(String name) {
+ getStateHelper().put(PropertyKeys.name, name);
}
-
- public void setBypassUpdates(boolean _bypassUpdates){
- this._bypassUpdates = _bypassUpdates;
- this._bypassUpdatesSet = true;
+
+ public String getOnbegin() {
+ return (String) getStateHelper().eval(PropertyKeys.onbegin);
}
-
- public Object getData(){
- if (this._data != null) {
- return this._data;
- }
- ValueExpression ve = getValueExpression("data");
- if (ve != null) {
- Object value = null;
-
- try {
- value = (Object) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
+
+ public void setOnbegin(String onbegin) {
+ getStateHelper().put(PropertyKeys.onbegin, onbegin);
}
-
- public void setData(Object _data){
- this._data = _data;
+
+ public String getOnbeforedomupdate() {
+ return (String) getStateHelper().eval(PropertyKeys.onbeforedomupdate);
}
- public String getEventsQueue(){
- if (this._eventsQueue != null) {
- return this._eventsQueue;
- }
- ValueExpression ve = getValueExpression("eventsQueue");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
+ public void setOnbeforedomupdate(String onbeforedomupdate) {
+ getStateHelper().put(PropertyKeys.onbeforedomupdate, onbeforedomupdate);
}
- public void setEventsQueue(String _eventsQueue){
- this._eventsQueue = _eventsQueue;
+ public String getOncomplete() {
+ return (String) getStateHelper().eval(PropertyKeys.oncomplete);
}
- public String getFocus(){
- if (this._focus != null) {
- return this._focus;
- }
- ValueExpression ve = getValueExpression("focus");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
+ public void setOncomplete(String oncomplete) {
+ getStateHelper().put(PropertyKeys.oncomplete, oncomplete);
}
- public void setFocus(String _focus){
- this._focus = _focus;
+ public Object getExecute() {
+ return getStateHelper().eval(PropertyKeys.execute);
}
-
- public boolean isIgnoreDupResponses(){
- if (this._ignoreDupResponsesSet) {
- return (this._ignoreDupResponses);
- }
- ValueExpression ve = getValueExpression("ignoreDupResponses");
- if (ve != null) {
- Boolean value = null;
-
- try {
- value = (Boolean) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- if (null == value) {
- return (this._ignoreDupResponses);
- }
-
- return value;
- } else {
- return (this._ignoreDupResponses);
- }
-
+
+ public void setExecute(Object execute) {
+ getStateHelper().put(PropertyKeys.execute, execute);
}
-
- public void setIgnoreDupResponses(boolean _ignoreDupResponses){
- this._ignoreDupResponses = _ignoreDupResponses;
- this._ignoreDupResponsesSet = true;
+
+ public Object getRender() {
+ return getStateHelper().eval(PropertyKeys.render);
}
- public boolean isLimitRender(){
- if (this._limitRenderSet) {
- return (this._limitRender);
- }
- ValueExpression ve = getValueExpression("limitRender");
- if (ve != null) {
- Boolean value = null;
-
- try {
- value = (Boolean) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- if (null == value) {
- return (this._limitRender);
- }
-
- return value;
- } else {
- return (this._limitRender);
- }
-
+ public void setRender(Object render) {
+ getStateHelper().put(PropertyKeys.render, render);
}
-
- public void setLimitRender(boolean _limitRender){
- this._limitRender = _limitRender;
- this._limitRenderSet = true;
+
+ public String getStatus() {
+ return (String) getStateHelper().eval(PropertyKeys.status);
}
- public String getName(){
- if (this._name != null) {
- return this._name;
- }
- ValueExpression ve = getValueExpression("name");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
+ public void setStatus(String status) {
+ getStateHelper().put(PropertyKeys.status, status);
}
-
- public void setName(String _name){
- this._name = _name;
- }
-
- public String getOnbeforedomupdate(){
- if (this._onbeforedomupdate != null) {
- return this._onbeforedomupdate;
- }
- ValueExpression ve = getValueExpression("onbeforedomupdate");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
- }
-
- public void setOnbeforedomupdate(String _onbeforedomupdate){
- this._onbeforedomupdate = _onbeforedomupdate;
- }
-
- public String getOncomplete(){
- if (this._oncomplete != null) {
- return this._oncomplete;
- }
- ValueExpression ve = getValueExpression("oncomplete");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
- }
-
- public void setOncomplete(String _oncomplete){
- this._oncomplete = _oncomplete;
- }
-
- public Object getProcess(){
- if (this._process != null) {
- return this._process;
- }
- ValueExpression ve = getValueExpression("process");
- if (ve != null) {
- Object value = null;
-
- try {
- value = (Object) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
- }
-
- public void setProcess(Object _process){
- this._process = _process;
- }
-
- public Object getReRender(){
- if (this._reRender != null) {
- return this._reRender;
- }
- ValueExpression ve = getValueExpression("reRender");
- if (ve != null) {
- Object value = null;
-
- try {
- value = (Object) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
- }
-
- public void setReRender(Object _reRender){
- this._reRender = _reRender;
- }
-
- public int getRequestDelay(){
- if (this._requestDelaySet) {
- return (this._requestDelay);
- }
- ValueExpression ve = getValueExpression("requestDelay");
- if (ve != null) {
- Integer value = null;
-
- try {
- value = (Integer) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- if (null == value) {
- return (this._requestDelay);
- }
-
- return value;
- } else {
- return (this._requestDelay);
- }
-
- }
-
- public void setRequestDelay(int _requestDelay){
- this._requestDelay = _requestDelay;
- this._requestDelaySet = true;
- }
-
- public String getSimilarityGroupingId(){
- if (this._similarityGroupingId != null) {
- return this._similarityGroupingId;
- }
- ValueExpression ve = getValueExpression("similarityGroupingId");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
- }
-
- public void setSimilarityGroupingId(String _similarityGroupingId){
- this._similarityGroupingId = _similarityGroupingId;
- }
-
- public String getStatus(){
- if (this._status != null) {
- return this._status;
- }
- ValueExpression ve = getValueExpression("status");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
-
-
- }
-
- public void setStatus(String _status){
- this._status = _status;
- }
-
- public int getTimeout(){
- if (this._timeoutSet) {
- return (this._timeout);
- }
- ValueExpression ve = getValueExpression("timeout");
- if (ve != null) {
- Integer value = null;
-
- try {
- value = (Integer) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- if (null == value) {
- return (this._timeout);
- }
-
- return value;
- } else {
- return (this._timeout);
- }
-
- }
-
- public void setTimeout(int _timeout){
- this._timeout = _timeout;
- this._timeoutSet = true;
- }
-
- /**
- * @return the _onbegin
- */
- public String getOnbegin() {
- if (this._onbegin != null) {
- return this._onbegin;
- }
- ValueExpression ve = getValueExpression("onbegin");
- if (ve != null) {
- String value = null;
-
- try {
- value = (String) ve.getValue(getFacesContext().getELContext());
- } catch (ELException e) {
- throw new FacesException(e);
- }
-
- return value;
- }
-
- return null;
- }
-
- /**
- * @param onbegin the _onbegin to set
- */
- public void setOnbegin(String onbegin) {
- _onbegin = onbegin;
- }
- public String getFamily(){
- return COMPONENT_FAMILY;
- }
-
@Override
- public Object saveState(FacesContext context){
- Object [] state = new Object[24];
- state[0] = super.saveState(context);
- state[1] = Boolean.valueOf(_ajaxSingle);
- state[2] = Boolean.valueOf(_ajaxSingleSet);
- state[3] = Boolean.valueOf(_bypassUpdates);
- state[4] = Boolean.valueOf(_bypassUpdatesSet);
- state[5] = saveAttachedState(context, _data);
- state[6] = _eventsQueue;
- state[7] = _focus;
- state[8] = Boolean.valueOf(_ignoreDupResponses);
- state[9] = Boolean.valueOf(_ignoreDupResponsesSet);
- state[10] = Boolean.valueOf(_limitRender);
- state[11] = Boolean.valueOf(_limitRenderSet);
- state[12] = _name;
- state[13] = _onbeforedomupdate;
- state[14] = _oncomplete;
- state[15] = saveAttachedState(context, _process);
- state[16] = saveAttachedState(context, _reRender);
- state[17] = Integer.valueOf(_requestDelay);
- state[18] = Boolean.valueOf(_requestDelaySet);
- state[19] = _similarityGroupingId;
- state[20] = _status;
- state[21] = Integer.valueOf(_timeout);
- state[22] = Boolean.valueOf(_timeoutSet);
- state[23] = _onbegin;
- return state;
- }
-
- @Override
- public void restoreState(FacesContext context, Object state){
- Object[] states = (Object[]) state;
- super.restoreState(context, states[0]);
- _ajaxSingle = ((Boolean)states[1]).booleanValue();
- _ajaxSingleSet = ((Boolean)states[2]).booleanValue();
- _bypassUpdates = ((Boolean)states[3]).booleanValue();
- _bypassUpdatesSet = ((Boolean)states[4]).booleanValue();
- _data = (Object)restoreAttachedState(context, states[5]);
- _eventsQueue = (String)states[6];;
- _focus = (String)states[7];;
- _ignoreDupResponses = ((Boolean)states[8]).booleanValue();
- _ignoreDupResponsesSet = ((Boolean)states[9]).booleanValue();
- _limitRender = ((Boolean)states[10]).booleanValue();
- _limitRenderSet = ((Boolean)states[11]).booleanValue();
- _name = (String)states[12];;
- _onbeforedomupdate = (String)states[13];;
- _oncomplete = (String)states[14];;
- _process = (Object)restoreAttachedState(context, states[15]);
- _reRender = (Object)restoreAttachedState(context, states[16]);
- _requestDelay = ((Integer)states[17]).intValue();
- _requestDelaySet = ((Boolean)states[18]).booleanValue();
- _similarityGroupingId = (String)states[19];;
- _status = (String)states[20];;
- _timeout = ((Integer)states[21]).intValue();
- _timeoutSet = ((Boolean)states[22]).booleanValue();
- _onbegin = (String) states[23];
- }
-
- @Override
public Collection<String> getEventNames() {
return EVENT_NAMES;
}
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java 2009-08-26 12:29:52 UTC (rev 15309)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java 2009-08-26 12:41:39 UTC (rev 15310)
@@ -56,7 +56,7 @@
getStateHelper().put(PropertyKeys.styleClass, styleClass);
}
- public boolean getLimitRender() {
+ public boolean isLimitRender() {
return Boolean.valueOf(getStateHelper().eval(PropertyKeys.limitRender, Boolean.FALSE).toString());
}
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java 2009-08-26 12:29:52 UTC (rev 15309)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java 2009-08-26 12:41:39 UTC (rev 15310)
@@ -57,7 +57,7 @@
getStateHelper().put(PropertyKeys.styleClass, styleClass);
}
- public boolean getLimitRender() {
+ public boolean isLimitRender() {
return Boolean.valueOf(getStateHelper().eval(PropertyKeys.limitRender, Boolean.FALSE).toString());
}
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlPush.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlPush.java 2009-08-26 12:29:52 UTC (rev 15309)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlPush.java 2009-08-26 12:41:39 UTC (rev 15310)
@@ -26,14 +26,29 @@
*
*/
+import java.util.Collection;
+import java.util.Collections;
+
+import javax.faces.component.behavior.ClientBehaviorHolder;
+
import org.richfaces.component.UIPush;
-public class HtmlPush extends UIPush {
+public class HtmlPush extends UIPush implements ClientBehaviorHolder {
public final static String COMPONENT_FAMILY = "org.richfaces.Push";
public final static String COMPONENT_TYPE = "org.richfaces.Push";
+ public static final String ON_DATA_AVAILABLE = "ondataavailable";
+
+ public static final String DATA_AVAILABLE = "dataAvailable";
+
+ private static final Collection<String> EVENT_NAMES = Collections.singleton(DATA_AVAILABLE);
+
+ private static enum PropertyKeys {
+ ondataavailable
+ }
+
public HtmlPush(){
setRendererType("org.richfaces.PushRenderer");
}
@@ -42,4 +57,21 @@
return COMPONENT_FAMILY;
}
+ @Override
+ public String getDefaultEventName() {
+ return DATA_AVAILABLE;
+ }
+
+ @Override
+ public Collection<String> getEventNames() {
+ return EVENT_NAMES;
+ }
+
+ public String getOndataavailable() {
+ return (String) getStateHelper().eval(PropertyKeys.ondataavailable);
+ }
+
+ public void setOndataavailable(String ondataavailable) {
+ getStateHelper().put(PropertyKeys.ondataavailable, ondataavailable);
+ }
}
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxPushRenderer.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxPushRenderer.java 2009-08-26 12:29:52 UTC (rev 15309)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html/AjaxPushRenderer.java 2009-08-26 12:41:39 UTC (rev 15310)
@@ -39,6 +39,7 @@
import org.ajax4jsf.renderkit.RendererBase;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.richfaces.component.UIPush;
+import org.richfaces.component.html.HtmlPush;
/**
* @author shura
@@ -98,13 +99,13 @@
options.put("pushId", push.getListenerId(context));
options.put("clientId", component.getClientId(context));
- String behaviorsChain = AjaxRendererUtils.createBehaviorsChain(context, push, UIPush.ON_DATA_AVAILABLE,
- UIPush.ON_DATA_AVAILABLE, true);
+ String behaviorsChain = AjaxRendererUtils.createBehaviorsChain(context, push, HtmlPush.ON_DATA_AVAILABLE,
+ HtmlPush.DATA_AVAILABLE, true);
if (behaviorsChain != null) {
JSFunctionDefinition dataAvailableHandler = new JSFunctionDefinition(JSReference.EVENT);
dataAvailableHandler.addToBody(behaviorsChain);
- options.put(UIPush.ON_DATA_AVAILABLE, dataAvailableHandler);
+ options.put(HtmlPush.ON_DATA_AVAILABLE, dataAvailableHandler);
}
function.addParameter(options);
script.append(function.toScript());
15 years, 4 months
JBoss Rich Faces SVN: r15309 - root.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-08-26 08:29:52 -0400 (Wed, 26 Aug 2009)
New Revision: 15309
Modified:
root/pom.xml
root/richfaces-examples.xml
Log:
Update 4.0 ALPHA1 assembler for new structure
https://jira.jboss.org/jira/browse/RF-7745
Modified: root/pom.xml
===================================================================
--- root/pom.xml 2009-08-26 11:20:28 UTC (rev 15308)
+++ root/pom.xml 2009-08-26 12:29:52 UTC (rev 15309)
@@ -45,6 +45,7 @@
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-4</version>
<executions>
<execution>
Modified: root/richfaces-examples.xml
===================================================================
--- root/richfaces-examples.xml 2009-08-26 11:20:28 UTC (rev 15308)
+++ root/richfaces-examples.xml 2009-08-26 12:29:52 UTC (rev 15309)
@@ -23,9 +23,10 @@
<fileSets>
<fileSet>
<directory>/</directory>
- <excludes>
- <exclude>target</exclude>
- </excludes>
+ <includes>
+ <include>src/**</include>
+ <include>pom.xml</include>
+ </includes>
</fileSet>
</fileSets>
</sources>
@@ -53,8 +54,8 @@
<fileSet>
<directory>/</directory>
<includes>
- <include>**/src</include>
- <include>./pom.xml</include>
+ <include>src/**</include>
+ <include>pom.xml</include>
</includes>
</fileSet>
</fileSets>
15 years, 4 months
JBoss Rich Faces SVN: r15308 - in root/ui/trunk/components/core/src/main/java/org: ajax4jsf/facelets/tag and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-08-26 07:20:28 -0400 (Wed, 26 Aug 2009)
New Revision: 15308
Modified:
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag/AjaxHandler.java
root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBehaviorRenderer.java
root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java
Log:
Modified: root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2009-08-26 10:53:57 UTC (rev 15307)
+++ root/ui/trunk/components/core/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2009-08-26 11:20:28 UTC (rev 15308)
@@ -22,9 +22,8 @@
private static enum Attributes {
- limitRender, queueId, statusId, render, execute, similarityGroupingId, other;
+ limitRender, queueId, statusId, render, execute, similarityGroupingId, oncomplete, onbegin, onbeforedomupdate, other;
-
public static Attributes toAttribute(String name) {
try {
@@ -47,11 +46,77 @@
private Set <String> execute;
+ private String oncomplete;
+ private String onbeforedomupdate;
+
+ private String onbegin;
+
protected Set<String> asSet(Object render) {
return AjaxRendererUtils.asSet(render);
}
+ public void setOnbegin(String onbegin) {
+ this.onbegin = onbegin;
+ clearInitialState();
+ }
+
+ public String getOnbegin() {
+ if(this.onbegin != null) {
+ return this.onbegin;
+ }
+
+ ValueExpression ve = getValueExpression(Attributes.onbegin.toString());
+ if(ve != null) {
+ ELContext elContext = FacesContext.getCurrentInstance().getELContext();
+ String value = ((String)ve.getValue(elContext));
+ return value;
+ }
+
+ return this.onbegin;
+ }
+
+ public void setOnBeforeDomUpdate(String onbeforedomupdate) {
+ this.onbeforedomupdate = onbeforedomupdate;
+ clearInitialState();
+ }
+
+ public String getOnBeforeDomUpdate() {
+ if(this.onbeforedomupdate != null) {
+ return this.onbeforedomupdate;
+ }
+
+ ValueExpression ve = getValueExpression(Attributes.onbeforedomupdate.toString());
+ if(ve != null) {
+ ELContext elContext = FacesContext.getCurrentInstance().getELContext();
+ String value = ((String)ve.getValue(elContext));
+ return value;
+ }
+
+ return this.onbeforedomupdate;
+ }
+
+
+ public void setOncomplete(String oncomplete) {
+ this.oncomplete = oncomplete;
+ clearInitialState();
+ }
+
+ public String getOncomplete() {
+ if(this.oncomplete != null) {
+ return this.oncomplete;
+ }
+
+ ValueExpression ve = getValueExpression(Attributes.oncomplete.toString());
+ if(ve != null) {
+ ELContext elContext = FacesContext.getCurrentInstance().getELContext();
+ String value = ((String)ve.getValue(elContext));
+ return value;
+ }
+
+ return this.oncomplete;
+ }
+
public void setRender(Collection<String> render) {
this.render = asSet(render);
clearInitialState();
Modified: root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag/AjaxHandler.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag/AjaxHandler.java 2009-08-26 10:53:57 UTC (rev 15307)
+++ root/ui/trunk/components/core/src/main/java/org/ajax4jsf/facelets/tag/AjaxHandler.java 2009-08-26 11:20:28 UTC (rev 15308)
@@ -29,8 +29,6 @@
private final TagAttribute event;
private final TagAttribute execute;
private final TagAttribute render;
- private final TagAttribute onevent;
- private final TagAttribute onerror;
private final TagAttribute disabled;
private final TagAttribute immediate;
private final TagAttribute listener;
@@ -38,6 +36,11 @@
private final TagAttribute queueId;
private final TagAttribute statusId;
private final TagAttribute similarityGroupingId;
+ private final TagAttribute onevent;
+ private final TagAttribute onerror;
+ private final TagAttribute onbegin;
+ private final TagAttribute oncomplete;
+ private final TagAttribute onbeforedomupdate;
private final boolean wrapping;
@@ -46,8 +49,6 @@
this.event = this.getAttribute("event");
this.execute = this.getAttribute("execute");
this.render = this.getAttribute("render");
- this.onevent = this.getAttribute("onevent");
- this.onerror = this.getAttribute("onerror");
this.disabled = this.getAttribute("disabled");
this.immediate = this.getAttribute("immediate");
this.listener = this.getAttribute("listener");
@@ -55,7 +56,12 @@
this.queueId = this.getAttribute("queueId");
this.statusId = this.getAttribute("statusId");
this.similarityGroupingId = this.getAttribute("similarityGroupingId");
- this.wrapping = isWrapping();
+ this.onevent = this.getAttribute("onevent");
+ this.onerror = this.getAttribute("onerror");
+ this.onbegin = this.getAttribute("onbegin");
+ this.oncomplete = this.getAttribute("oncomplete");
+ this.onbeforedomupdate = this.getAttribute("onBeforeDomUpdate");
+ this.wrapping = isWrapping();
}
public void apply(FaceletContext fContext, UIComponent parent) throws IOException {
@@ -151,8 +157,6 @@
Application application = fContext.getFacesContext().getApplication();
AjaxBehavior ajaxBehavior = (AjaxBehavior)application.createBehavior(AjaxBehavior.BEHAVIOR_ID);
- setBehaviorAttribute(fContext, ajaxBehavior, this.onevent, String.class);
- setBehaviorAttribute(fContext, ajaxBehavior, this.onerror, String.class);
setBehaviorAttribute(fContext, ajaxBehavior, this.disabled, Boolean.class);
setBehaviorAttribute(fContext, ajaxBehavior, this.immediate, Boolean.class);
setBehaviorAttribute(fContext, ajaxBehavior, this.execute, Object.class);
@@ -161,6 +165,11 @@
setBehaviorAttribute(fContext, ajaxBehavior, this.queueId, String.class);
setBehaviorAttribute(fContext, ajaxBehavior, this.statusId, String.class);
setBehaviorAttribute(fContext, ajaxBehavior, this.similarityGroupingId, String.class);
+ setBehaviorAttribute(fContext, ajaxBehavior, this.onevent, String.class);
+ setBehaviorAttribute(fContext, ajaxBehavior, this.onerror, String.class);
+ setBehaviorAttribute(fContext, ajaxBehavior, this.onbegin, String.class);
+ setBehaviorAttribute(fContext, ajaxBehavior, this.oncomplete, String.class);
+ setBehaviorAttribute(fContext, ajaxBehavior, this.onbeforedomupdate, String.class);
registerBehaviorListener(fContext, ajaxBehavior, listener);
Modified: root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBehaviorRenderer.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBehaviorRenderer.java 2009-08-26 10:53:57 UTC (rev 15307)
+++ root/ui/trunk/components/core/src/main/java/org/ajax4jsf/renderkit/AjaxBehaviorRenderer.java 2009-08-26 11:20:28 UTC (rev 15308)
@@ -14,6 +14,7 @@
import javax.faces.render.FacesBehaviorRenderer;
import javax.faces.render.RenderKitFactory;
+import org.ajax4jsf.component.AjaxClientBehavior;
import org.ajax4jsf.component.behavior.AjaxBehavior;
import org.ajax4jsf.javascript.JSFunction;
import org.richfaces.context.PartialViewContextFactoryImpl;
@@ -86,19 +87,20 @@
JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(parent, context, AjaxRendererUtils.AJAX_FUNCTION_NAME);
- AjaxEventOptions options = buildOptions(context, bContext);
+ AjaxEventOptions options = buildOptions(context, bContext, behavior);
ajaxFunction.addParameter(options);
return ajaxFunction.toString();
}
- public AjaxEventOptions buildOptions(FacesContext context, ClientBehaviorContext bContext) {
+ public AjaxEventOptions buildOptions(FacesContext context, ClientBehaviorContext bContext, AjaxClientBehavior behavior) {
UIComponent parent = bContext.getComponent();
String eventName = bContext.getEventName();
-
- AjaxEventOptions options = AjaxRendererUtils.buildEventOptions(context, parent);
+ AjaxEventOptions options = AjaxRendererUtils.buildEventOptions(context, behavior, parent);
options.setParameter(PartialViewContextImpl.BEHAVIOR_EVENT_PARAMETER, eventName);
options.setParameter(PartialViewContextFactoryImpl.RICHFACES_AJAX, parent.getClientId());
+
return options;
}
+
}
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java 2009-08-26 10:53:57 UTC (rev 15307)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/AjaxFunctionRendererBase.java 2009-08-26 11:20:28 UTC (rev 15308)
@@ -54,7 +54,7 @@
// Create AJAX Submit function.
JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(
component, context, AjaxRendererUtils.AJAX_FUNCTION_NAME);
- AjaxEventOptions options = AjaxRendererUtils.buildEventOptions(context, component);
+ AjaxEventOptions options = AjaxRendererUtils.buildEventOptions(context, null, component);
ajaxFunction.addParameter(options);
Map<String, Object> parameters = options.getParameters();
15 years, 4 months
JBoss Rich Faces SVN: r15307 - root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-08-26 06:53:57 -0400 (Wed, 26 Aug 2009)
New Revision: 15307
Removed:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/CommonAtributesAccessorImpl.java
Modified:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/CommonAttributesAccessor.java
Log:
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-08-26 01:13:23 UTC (rev 15306)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-08-26 10:53:57 UTC (rev 15307)
@@ -50,6 +50,7 @@
import javax.servlet.http.HttpServletResponse;
import org.ajax4jsf.Messages;
+import org.ajax4jsf.component.AjaxClientBehavior;
import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.component.AjaxLoadBundleComponent;
@@ -288,30 +289,21 @@
}
}
- public static <A,T> AjaxEventOptions buildEventOptions(T t , CommonAttributesAccessor<A, T> accessor) {
+ public static <A,T> AjaxEventOptions buildEventOptions(A a, T t , CommonAttributesAccessor<A, T> accessor) {
AjaxEventOptions ajaxEventOptions = new AjaxEventOptions();
- String ajaxStatusName = accessor.getStatusId(t);
+ String ajaxStatusName = accessor.getStatusId(a,t);
if(ajaxStatusName != null && ajaxStatusName.trim().length() != 0) {
ajaxEventOptions.set(STATUS_ATTR_NAME, ajaxStatusName);
}
-
- Map<String, Object> parameters = ajaxEventOptions.getParameters();
- A context = accessor.getContext();
-
- if(context instanceof ClientBehaviorContext) {
- UIComponent parent = ((ClientBehaviorContext) context).getComponent();
- FacesContext facesContext = ((ClientBehaviorContext) context).getFacesContext();
- appendParameters(facesContext, parent, parameters);
- } else if(context instanceof FacesContext){
- FacesContext facesContext = (FacesContext)context;
- appendParameters(facesContext, (UIComponent)t, parameters);
- }
+ appendParameters(FacesContext.getCurrentInstance(), (UIComponent)t, ajaxEventOptions.getParameters());
return ajaxEventOptions;
}
- private static enum EventOptionsData {
+
+
+ private static enum EventOptionsData {
begin {
@Override
public String getAttributeValue(UIComponent component) {
@@ -336,20 +328,36 @@
public abstract String getAttributeValue(UIComponent component);
}
- public static AjaxEventOptions buildEventOptions(FacesContext facesContext,
- UIComponent component) {
+
+
+
+ public static AjaxEventOptions buildEventOptions(FacesContext facesContext, AjaxClientBehavior ajaxBehavior, UIComponent component) {
AjaxEventOptions ajaxEventOptions = new AjaxEventOptions();
+ Map<String, Object> parametersMap = new LinkedHashMap<String, Object>();
String ajaxStatusName = getAjaxStatus(component);
+
+ if(ajaxBehavior != null) {
+ ajaxStatusName = ajaxBehavior.getStatusId() != null ? ajaxBehavior.getStatusId() : ajaxStatusName;
+
+ } else {
+ appendBehaviorParams(facesContext, component, ajaxEventOptions, parametersMap);
+ }
+
if (ajaxStatusName != null && ajaxStatusName.length() != 0) {
ajaxEventOptions.set(STATUS_ATTR_NAME, ajaxStatusName);
}
-
- Map<String, Object> parametersMap = new LinkedHashMap<String, Object>();
+
appendParameters(facesContext, component, parametersMap);
ajaxEventOptions.getParameters().putAll(parametersMap);
+ return ajaxEventOptions;
+ }
+
+
+
+ private static void appendBehaviorParams(FacesContext facesContext, UIComponent component, AjaxEventOptions ajaxEventOptions, Map<String, Object> parametersMap) {
Collection<Parameter> behaviorParametersList = null;
Map<String, List<ClientBehavior>> behaviorsMap = Collections.EMPTY_MAP; /* null object */
@@ -378,8 +386,6 @@
ajaxEventOptions.set(behaviorName, behaviorsChain);
}
}
-
- return ajaxEventOptions;
}
// public static AjaxEventOptions buildEventOptions(FacesContext facesContext,
Deleted: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/CommonAtributesAccessorImpl.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/CommonAtributesAccessorImpl.java 2009-08-26 01:13:23 UTC (rev 15306)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/CommonAtributesAccessorImpl.java 2009-08-26 10:53:57 UTC (rev 15307)
@@ -1,103 +0,0 @@
-package org.ajax4jsf.renderkit;
-
-import javax.faces.component.UIComponent;
-
-import org.ajax4jsf.component.AjaxClientBehavior;
-
-
-/**
- * @author Anton Belevich
- *
- * @param <T>
- * accessor implementation for the component/behavior common attributes
- */
-public class CommonAtributesAccessorImpl <A,T> implements CommonAttributesAccessor<A,T> {
-
- private A wrappedContext;
-
- public enum types {
- component, behavior;
-
- public static types type(Object obj) {
- if (obj instanceof UIComponent) {
- return component;
- } else if(obj instanceof AjaxClientBehavior) {
- return behavior;
- } else {
- return null;
- }
- }
- }
-
- public CommonAtributesAccessorImpl(A wrappedContext) {
- this.wrappedContext = wrappedContext;
- }
-
- public String getOnBeforeDomUpdate(T t) {
- switch (types.type(t)) {
- case component: return getComponentOnBeforeDomUpdate((UIComponent)t);
- case behavior: return getBehaviorOnBeforeDomUpdate((AjaxClientBehavior)t);
- default: return null;
- }
- }
-
- public String getOnBegin(T t) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getOnComplete(T t) {
- switch (types.type(t)) {
- case component: return getComponentOnComplete((UIComponent)t);
- case behavior: return getBehaviorOnComplete((AjaxClientBehavior)t);
- default: return null;
- }
- }
-
- public String getOnError(T t) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getOnEvent(T t) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getStatusId(T t) {
- switch (types.type(t)) {
- case component: return getComponentAjaxStatus((UIComponent)t);
- case behavior: return getBehaviorAjaxStatus((AjaxClientBehavior)t);
- default: return null;
- }
- }
-
- private String getComponentAjaxStatus(UIComponent component) {
- return AjaxRendererUtils.getAjaxStatus(component);
- }
-
- private String getBehaviorAjaxStatus(AjaxClientBehavior behavior) {
- return behavior.getStatusId();
- }
-
- private String getComponentOnComplete(UIComponent component) {
- return AjaxRendererUtils.getAjaxOncomplete(component);
- }
-
- private String getBehaviorOnComplete(AjaxClientBehavior behavior) {
- return behavior.getOncomplete();
- }
-
- private String getComponentOnBeforeDomUpdate(UIComponent component) {
- return AjaxRendererUtils.getAjaxOnBeforeDomUpdate(component);
- }
-
- private String getBehaviorOnBeforeDomUpdate(AjaxClientBehavior behavior) {
- return behavior.getOnBeforeDomUpdate();
- }
-
- public A getContext() {
- return wrappedContext;
- }
-
-}
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/CommonAttributesAccessor.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/CommonAttributesAccessor.java 2009-08-26 01:13:23 UTC (rev 15306)
+++ root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/CommonAttributesAccessor.java 2009-08-26 10:53:57 UTC (rev 15307)
@@ -1,6 +1,10 @@
package org.ajax4jsf.renderkit;
+import javax.faces.component.UIComponent;
+import org.ajax4jsf.component.AjaxClientBehavior;
+
+
/**
* @author Anton Belevich
*
@@ -10,19 +14,102 @@
* interface for accessors implementation
*/
public interface CommonAttributesAccessor <A,T> {
-
- public String getOnComplete(T t);
+
- public String getOnError(T t);
+ public String getOnComplete(A a, T t);
- public String getOnBegin(T t);
+ public String getOnError(A a, T t);
- public String getOnBeforeDomUpdate(T t);
+ public String getOnBegin(A a, T t);
- public String getOnEvent(T t);
+ public String getOnBeforeDomUpdate(A a, T t);
+
+ public String getOnEvent(A a, T t);
- public String getStatusId(T t);
+ public String getStatusId(A a, T t);
- public A getContext();
+
+ public static final CommonAttributesAccessor<AjaxClientBehavior, UIComponent> C = new CommonAttributesAccessor<AjaxClientBehavior, UIComponent>() {
+ public String getOnBeforeDomUpdate(AjaxClientBehavior a, UIComponent t) {
+ String value = null;
+
+ if(t != null) {
+ value = AjaxRendererUtils.getAjaxOnBeforeDomUpdate(t);
+ }
+
+ if(a != null) {
+ value = a.getOnBeforeDomUpdate();
+ }
+
+ return value;
+ }
+
+ public String getOnBegin(AjaxClientBehavior a, UIComponent t) {
+ String value = null;
+
+ if(t != null) {
+ value = AjaxRendererUtils.getAjaxOncomplete(t);
+ }
+
+ if(a != null) {
+ value = a.getOncomplete();
+ }
+
+ return value;
+ }
+
+ public String getOnComplete(AjaxClientBehavior a, UIComponent t) {
+ String value = null;
+
+ if(t != null) {
+ value = AjaxRendererUtils.getAjaxOncomplete(t);
+ }
+
+ if(a != null) {
+ value = a.getOncomplete();
+ }
+
+ return value;
+ }
+
+ public String getOnError(AjaxClientBehavior a, UIComponent t) {
+ String value = null;
+ if(t != null) {
+ // TODO AjaxRenderUtils add getAjaxOnError(UIComponent component) method ??
+ }
+
+ if(a != null) {
+ value = a.getOnerror();
+ }
+
+ return value;
+ }
+
+ public String getOnEvent(AjaxClientBehavior a, UIComponent t) {
+ String value = null;
+ if(t != null) {
+ // TODO AjaxRenderUtils add getAjaxOnEvent(UIComponent component) method ??
+ }
+
+ if(a != null) {
+ value = a.getOnevent();
+ }
+
+ return value;
+ }
+
+ public String getStatusId(AjaxClientBehavior a, UIComponent t) {
+ String value = null;
+ if(t != null) {
+ AjaxRendererUtils.getAjaxStatus(t);
+ }
+
+ if(a != null) {
+ a.getStatusId();
+ }
+
+ return value;
+ }
+ };
}
15 years, 4 months
JBoss Rich Faces SVN: r15306 - in root/cdk/trunk/plugins: generator/src/main/java/org/richfaces/cdk/apt and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-08-25 21:13:23 -0400 (Tue, 25 Aug 2009)
New Revision: 15306
Added:
root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Behavior.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventName.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ClassAdapter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ClassBean.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacetAdapter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacetBean.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JAXBCopyTest.java
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/UITestCommand.java
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/parent.xml
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/UITestCommand.java
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ComponentClassGenerator.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Extensible.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Facet.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/CdkEntityResolver.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/JAXBBinding.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ComponentAdapter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ComponentBean.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyAdapter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyBean.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ComponentProcessorTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileManagerTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FacesConfigTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FragmentParserTest.java
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/component.xml
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/include.xml
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/pom.xml
Log:
Implement and test faces.config.xml component element parser.
Added: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Behavior.java
===================================================================
--- root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Behavior.java (rev 0)
+++ root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Behavior.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -0,0 +1,56 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.CLASS)
+(a)Target(ElementType.TYPE)
+@Inherited
+public @interface Behavior {
+
+ public static final String NAME = "org.richfaces.cdk.annotations.Behavior";
+
+ /**
+ * <p class="changed_added_4_0">
+ * behavior-id with which instances of implementation class can be created b JSF Application implementation. If this value an empty, behavior-id will be inferred from class name.
+ * </p>
+ *
+ * @return converter type.
+ */
+ public String value() ;
+
+
+}
Property changes on: root/cdk/trunk/plugins/annotations/src/main/java/org/richfaces/cdk/annotations/Behavior.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -46,6 +46,7 @@
import org.richfaces.cdk.CdkContext;
import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.NamingConventions;
+import org.richfaces.cdk.annotations.Icon;
import org.richfaces.cdk.model.ClassDescription;
import org.richfaces.cdk.model.InvalidNameException;
import org.richfaces.cdk.util.PropertyUtils;
@@ -156,6 +157,10 @@
return exists;
}
+ public <T extends Annotation> T getAnnotation(Class<T> annotationType) {
+ return element.getAnnotation(annotationType);
+ }
+
}
/**
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/ComponentProcessor.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -24,13 +24,21 @@
package org.richfaces.cdk.apt;
import java.util.List;
+import java.util.Map;
import java.util.Set;
+import java.util.Map.Entry;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.AnnotationValue;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Modifier;
+import javax.lang.model.element.Name;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.ElementFilter;
import org.richfaces.cdk.CdkContext;
@@ -39,12 +47,14 @@
import org.richfaces.cdk.annotations.Attributes;
import org.richfaces.cdk.annotations.Component;
import org.richfaces.cdk.annotations.DisplayName;
+import org.richfaces.cdk.annotations.Facet;
import org.richfaces.cdk.annotations.Family;
import org.richfaces.cdk.annotations.Generate;
import org.richfaces.cdk.annotations.Icon;
import org.richfaces.cdk.model.ClassDescription;
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.Property;
+import org.richfaces.cdk.xmlconfig.CdkEntityResolver;
import org.richfaces.cdk.xmlconfig.FragmentParser;
/**
@@ -54,9 +64,10 @@
* @author asmirnov(a)exadel.com
*
*/
-(a)SupportedAnnotationTypes(Component.NAME)
+@SupportedAnnotationTypes({"javax.faces.component.FacesComponent",Component.NAME})
public class ComponentProcessor extends CdkProcessor {
+ private static final String FACES_COMPONENT = "javax.faces.component.FacesComponent";
private final ComponentLibrary library;
private FragmentParser fragmentParser;
@@ -99,7 +110,6 @@
// Should that component be generated ?
setClassNames(componentElement, component);
setComponentProperties(componentElement, component);
- library.getComponents().add(component);
} catch (Exception e) {
// rise error and continue.
processingEnv.getMessager().printMessage(
@@ -108,7 +118,39 @@
continue;
}
}
- // TODO - process classes annotated as "FacesComponent".
+ // process classes annotated as "FacesComponent".
+ TypeElement facesComponentAnnotation = this.processingEnv.getElementUtils().getTypeElement(FACES_COMPONENT);
+ Set<? extends TypeElement> annotatedWith = ElementFilter.typesIn(roundEnv.getElementsAnnotatedWith(facesComponentAnnotation));
+ for (TypeElement element : annotatedWith) {
+ List<? extends AnnotationMirror> mirrors = element.getAnnotationMirrors();
+ for (AnnotationMirror mirror : mirrors) {
+ if(FACES_COMPONENT.equals(mirror.getAnnotationType().toString())){
+ Map<? extends ExecutableElement, ? extends AnnotationValue> valuesWithDefaults = processingEnv.getElementUtils().getElementValuesWithDefaults(mirror);
+ for (Entry<? extends ExecutableElement, ? extends AnnotationValue> valueEntry : valuesWithDefaults.entrySet()) {
+ Name name = valueEntry.getKey().getSimpleName();
+ if("value".equals(name.toString())){
+ try {
+ Object value = valueEntry.getValue().getValue();
+ if(null!=value && value instanceof String){
+ org.richfaces.cdk.model.Component component = library.findOrCreateComponent(value.toString());
+ ClassDescription componentClass = new ClassDescription(element
+ .getQualifiedName().toString());
+ component.setComponentClass(componentClass);
+ component.setGenerate(false);
+ setComponentProperties(element, component);
+ }
+ } catch (Exception e) {
+ // rise error and continue.
+ processingEnv.getMessager().printMessage(
+ javax.tools.Diagnostic.Kind.ERROR, e.getMessage(),
+ element);
+ continue;
+ }
+ }
+ }
+ }
+ }
+ }
return true;
}
return false;
@@ -119,12 +161,48 @@
// Component family
setComponeneFamily(componentElement, component);
setComponentDescription(componentElement, component);
+ processFacets(componentElement,component);
// TODO - process Events attribute.
// TODO - renderers, ....
// Process attributes.
processAttributes(componentElement, component);
}
+ private void processFacets(TypeElement componentElement,
+ org.richfaces.cdk.model.Component component) throws CdkException {
+ Set<BeanProperty> properties = getBeanPropertiesAnnotatedWith(
+ Facet.class, componentElement);
+ // TODO - encapsulate attribute builder into utility class.
+ for (BeanProperty beanProperty : properties) {
+ org.richfaces.cdk.model.Facet facet = component.findOrCreateFacet(beanProperty
+ .getName());
+ // Documentation
+ facet.setDescription(beanProperty.getDocComment());
+ Icon icon = beanProperty.getAnnotation(Icon.class);
+ if (null != icon) {
+ facet.setIcon(icon.value());
+ }
+ DisplayName displayName = beanProperty
+ .getAnnotation(DisplayName.class);
+ if (null != displayName) {
+ facet.setDisplayname(displayName.value());
+ }
+ // Flags.
+ facet.setGenerate(beanProperty.isExists());
+ }
+ // TODO - @Facets annotation.
+// Face attributes = componentElement
+// .getAnnotation(Attributes.class);
+// if (null != attributes) {
+// String[] includes = attributes.value();
+// for (String attributesConfig : includes) {
+// // process additional properties.
+// component.getAttributes().addAll(fragmentParser.parseProperties(attributesConfig));
+// }
+// }
+
+ }
+
private void setComponentDescription(TypeElement componentElement,
org.richfaces.cdk.model.Component component) {
// JavaDoc comments
@@ -171,14 +249,14 @@
if (null != generate) {
component.setComponentClass(new ClassDescription(generate.value()));
component.setBaseClass(baseClass);
- component.setExists(false);
+ component.setGenerate(false);
} else if (componentElement.getModifiers().contains(Modifier.ABSTRACT)) {
// Final component class will be set by validator.
component.setBaseClass(baseClass);
- component.setExists(false);
+ component.setGenerate(false);
} else {
component.setComponentClass(baseClass);
- component.setExists(true);
+ component.setGenerate(true);
}
}
@@ -192,11 +270,20 @@
.getName());
// Documentation
atribute.setDescription(beanProperty.getDocComment());
- // Id.
+ Icon icon = beanProperty.getAnnotation(Icon.class);
+ if (null != icon) {
+ atribute.setIcon(icon.value());
+ }
+ DisplayName displayName = beanProperty
+ .getAnnotation(DisplayName.class);
+ if (null != displayName) {
+ atribute.setDisplayname(displayName.value());
+ }
+ // type.
atribute.setType(new ClassDescription(beanProperty.getType()
.toString()));
// Flags.
- atribute.setExists(beanProperty.isExists());
+ atribute.setGenerate(beanProperty.isExists());
}
Attributes attributes = componentElement
.getAnnotation(Attributes.class);
@@ -208,9 +295,29 @@
}
}
// TODO - Process standard information for parent classes
+ List<? extends TypeMirror> interfaces = componentElement.getInterfaces();
+ for (TypeMirror interfaceMirror : interfaces) {
+ processTypeProperties(component,interfaceMirror);
+ }
+ processTypeProperties(component,componentElement.getSuperclass());
// and interfaces.
}
+ private void processTypeProperties(
+ org.richfaces.cdk.model.Component component,
+ TypeMirror interfaceMirror) {
+ String name = interfaceMirror.toString();
+ try{
+ component.getAttributes().addAll(fragmentParser.parseProperties(CdkEntityResolver.URN_ATTRIBUTES+name+".xml"));
+ } catch(CdkException e){
+ // TODO - log errors ?
+ }
+ List<? extends TypeMirror> supertypes = processingEnv.getTypeUtils().directSupertypes(interfaceMirror);
+ for (TypeMirror supertype : supertypes) {
+ processTypeProperties(component, supertype);
+ }
+ }
+
public ComponentLibrary getLibrary() {
return library;
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ComponentClassGenerator.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ComponentClassGenerator.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/ComponentClassGenerator.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -57,7 +57,7 @@
protected boolean isMyComponent(Visitable c) {
if (c instanceof Component) {
Component component = (Component) c;
- return !component.isExists();
+ return !component.isGenerate();
}
return false;
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Component.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -28,7 +28,7 @@
@SuppressWarnings("serial")
@XmlType(name="faces-config-componentType")
@XmlAccessorType( XmlAccessType.NONE )
-public final class Component implements ModelElement<Component,Component.Type>, DescriptionGroup,Extensible<ConfigExtension> {
+public final class Component implements ModelElement<Component,Component.Type>, DescriptionGroup,Extensible {
/**
@@ -78,7 +78,7 @@
/**
* <p class="changed_added_4_0">Is that component c</p>
*/
- private boolean exists = true;
+ private boolean generate = true;
/**
* <p class="changed_added_4_0">
@@ -102,7 +102,7 @@
@Override
public Facet create(Name key) {
- return new Facet(key.getType());
+ return new Facet(key);
}
};
@@ -295,19 +295,19 @@
/**
* <p class="changed_added_4_0"></p>
- * @return the exists
+ * @return the generate
*/
@Merge
- public boolean isExists() {
- return exists;
+ public boolean isGenerate() {
+ return generate;
}
/**
* <p class="changed_added_4_0"></p>
- * @param exists the exists to set
+ * @param generate the generate to set
*/
- public void setExists(boolean exists) {
- this.exists = exists;
+ public void setGenerate(boolean exists) {
+ this.generate = exists;
}
/**
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventName.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventName.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventName.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -0,0 +1,113 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.model;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@SuppressWarnings("serial")
+public class EventName implements Serializable {
+
+ private String name;
+
+ private boolean defaultEvent = false;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the name
+ */
+ @XmlValue
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the defaultEvent
+ */
+ @XmlAttribute(name="default")
+ public boolean isDefaultEvent() {
+ return defaultEvent;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param defaultEvent the defaultEvent to set
+ */
+ public void setDefaultEvent(boolean defaultEvent) {
+ this.defaultEvent = defaultEvent;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ EventName other = (EventName) obj;
+ if (name == null) {
+ if (other.name != null) {
+ return false;
+ }
+ } else if (!name.equals(other.name)) {
+ return false;
+ }
+ return true;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventName.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Extensible.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Extensible.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Extensible.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -36,6 +36,6 @@
*/
public E getExtension();
-// public void setExtension(E ext);
+ public void setExtension(E ext);
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Facet.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Facet.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Facet.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -29,7 +29,7 @@
*
*/
@SuppressWarnings("serial")
-public class Facet implements ModelElement<Facet,Facet.Name>{
+public class Facet implements ModelElement<Facet,Facet.Name>,DescriptionGroup,Extensible<ConfigExtension>{
public static final class Name extends Key {
@@ -42,14 +42,28 @@
private String description;
+ private String displayname;
+ private String icon;
+
+ private ConfigExtension extension;
+
+ private boolean generate;
/**
* <p class="changed_added_4_0"></p>
* @param name
*/
- public Facet(String name) {
- this.name = new Name(name);
+ public Facet(Name name) {
+ this.name = name;
}
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the name
+ */
+ public Name getName() {
+ return name;
+ }
+
@Override
public Name getKey() {
return name;
@@ -73,12 +87,68 @@
/**
* <p class="changed_added_4_0"></p>
- * @return the name
+ * @return the displayname
*/
- public Name getName() {
- return name;
+ public String getDisplayname() {
+ return displayname;
}
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param displayname the displayname to set
+ */
+ public void setDisplayname(String displayname) {
+ this.displayname = displayname;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the icon
+ */
+ public String getIcon() {
+ return icon;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param icon the icon to set
+ */
+ public void setIcon(String icon) {
+ this.icon = icon;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the generate
+ */
+ public boolean isGenerate() {
+ return generate;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param generate the generate to set
+ */
+ public void setGenerate(boolean generate) {
+ this.generate = generate;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the extension
+ */
+ public ConfigExtension getExtension() {
+ return extension;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param extension the extension to set
+ */
+ public void setExtension(ConfigExtension extension) {
+ this.extension = extension;
+ }
+
@Override
public void merge(Facet other) {
ComponentLibrary.merge(this, other);
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Property.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -21,15 +21,19 @@
package org.richfaces.cdk.model;
+import java.util.List;
import java.util.Set;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
/**
* That class represents JSF component property.
* @author asmirnov(a)exadel.com
*
*/
@SuppressWarnings("serial")
-public class Property implements DescriptionGroup, ModelElement<Property,Property.Name> {
+public class Property implements DescriptionGroup, ModelElement<Property,Property.Name>, Extensible {
public static final class Name extends Key {
@@ -64,24 +68,30 @@
/**
- * <p class="changed_added_4_0">Is that bean property exists in the class or should be generated ?</p>
+ * <p class="changed_added_4_0">Is that bean property generate in the class or should be generated ?</p>
*/
- private boolean exists;
+ private boolean generate=false;
- private boolean hidden;
+ private boolean hidden=false;
- private boolean elExpression;
+ private boolean literal=false;
+
+ private boolean required=false;
- private String dafaultValue;
+ private String defaultValue;
private String suggestedValue;
private boolean passThrough=false;
-
- private boolean defaultBehavior=false;
- private Set<String> behaviorNames;
+ private Set<EventName> eventNames = Sets.newHashSet();
+ private List<ClassDescription> signature = Lists.newArrayList();
+
+ private Set<String> aliases = Sets.newHashSet();
+
+ private ConfigExtension extension;
+
/**
* <p class="changed_added_4_0"></p>
* @param name
@@ -178,19 +188,19 @@
/**
* <p class="changed_added_4_0"></p>
- * @return the dafaultValue
+ * @return the defaultValue
*/
@Merge
- public String getDafaultValue() {
- return dafaultValue;
+ public String getDefaultValue() {
+ return defaultValue;
}
/**
* <p class="changed_added_4_0"></p>
- * @param dafaultValue the dafaultValue to set
+ * @param defaultValue the defaultValue to set
*/
- public void setDafaultValue(String dafaultValue) {
- this.dafaultValue = dafaultValue;
+ public void setDefaultValue(String dafaultValue) {
+ this.defaultValue = dafaultValue;
}
/**
@@ -212,22 +222,166 @@
/**
* <p class="changed_added_4_0"></p>
- * @return the exists
+ * @return the generate
*/
@Merge
- public boolean isExists() {
- return exists;
+ public boolean isGenerate() {
+ return generate;
}
/**
* <p class="changed_added_4_0"></p>
- * @param exists the exists to set
+ * @param generate the generate to set
*/
- public void setExists(boolean exists) {
- this.exists = exists;
+ public void setGenerate(boolean exists) {
+ this.generate = exists;
}
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the eventNames
+ */
+ public Set<EventName> getEventNames() {
+ return eventNames;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param eventNames the eventNames to set
+ */
+ public void setEventNames(Set<EventName> eventNames) {
+ this.eventNames = eventNames;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the hidden
+ */
+ public boolean isHidden() {
+ return hidden;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param hidden the hidden to set
+ */
+ public void setHidden(boolean hidden) {
+ this.hidden = hidden;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the literal
+ */
+ public boolean isLiteral() {
+ return literal;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param literal the literal to set
+ */
+ public void setLiteral(boolean literal) {
+ this.literal = literal;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the required
+ */
+ public boolean isRequired() {
+ return required;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param required the required to set
+ */
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the passThrough
+ */
+ public boolean isPassThrough() {
+ return passThrough;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param passThrough the passThrough to set
+ */
+ public void setPassThrough(boolean passThrough) {
+ this.passThrough = passThrough;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the signature
+ */
+ public List<ClassDescription> getSignature() {
+ return signature;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param signature the signature to set
+ */
+ public void setSignature(List<ClassDescription> signature) {
+ this.signature = signature;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the aliases
+ */
+ public Set<String> getAliases() {
+ return aliases;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param aliases the aliases to set
+ */
+ public void setAliases(Set<String> aliases) {
+ this.aliases = aliases;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the extension
+ */
+ public ConfigExtension getExtension() {
+ return extension;
+ }
+
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param extension the extension to set
+ */
+ public void setExtension(ConfigExtension extension) {
+ this.extension = extension;
+ }
+
+
@Override
public void merge(Property other) {
ComponentLibrary.merge(this, other);
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/CdkEntityResolver.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/CdkEntityResolver.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/CdkEntityResolver.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -75,15 +75,15 @@
private static final String SYSTEM_PREFIX = "/META-INF/schema/";
- private static final String URN_RESOURCE = "urn:resource:";
+ public static final String URN_RESOURCE = "urn:resource:";
private static final String RESOURCE_PREFIX = "";
- private static final String URN_CONFIG = "urn:config:";
+ public static final String URN_CONFIG = "urn:config:";
- private static final String URN_TEMPLATES = "urn:templates:";
+ public static final String URN_TEMPLATES = "urn:templates:";
- private static final String URN_ATTRIBUTES = "urn:attributes:";
+ public static final String URN_ATTRIBUTES = "urn:attributes:";
private static final String ATTRIBUTES_PREFIX = "META-INF/cdk/attributes/";
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/JAXBBinding.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/JAXBBinding.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/JAXBBinding.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -23,12 +23,19 @@
package org.richfaces.cdk.xmlconfig;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Collection;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
@@ -42,7 +49,12 @@
import org.richfaces.cdk.CdkContext;
import org.richfaces.cdk.CdkException;
+import org.richfaces.cdk.model.ClassDescription;
import org.richfaces.cdk.model.ComponentLibrary;
+import org.richfaces.cdk.model.ConfigExtension;
+import org.richfaces.cdk.model.Extensible;
+import org.richfaces.cdk.model.Key;
+import org.richfaces.cdk.model.ModelElement;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.SAXNotRecognizedException;
@@ -110,6 +122,7 @@
spf.setFeature(
"http://apache.org/xml/features/xinclude/fixup-base-uris",
false);
+ spf.setXIncludeAware(true);
} catch (ParserConfigurationException e) {
throw new CdkException(
"parser does not support desired configuration", e);
@@ -121,28 +134,28 @@
return spf;
}
- public <T> T unmarshal(File file,
- String schemaLocation, Class<T> bindClass) throws CdkException {
+ public <T> T unmarshal(File file, String schemaLocation, Class<T> bindClass)
+ throws CdkException {
try {
InputSource input = new InputSource(new FileInputStream(file));
T unmarshal = unmarshal(schemaLocation, bindClass, input);
return unmarshal;
} catch (FileNotFoundException e) {
- throw new CdkException("XML file not found",e);
+ throw new CdkException("XML file not found", e);
}
}
- public <T> T unmarshal(String url, String schemaLocation,
- Class<T> bindClass) throws CdkException {
+ public <T> T unmarshal(String url, String schemaLocation, Class<T> bindClass)
+ throws CdkException {
try {
InputSource inputSource = resolver.resolveSystemId(url);
- if(null == inputSource){
+ if (null == inputSource) {
inputSource = new InputSource(url);
}
T unmarshal = unmarshal(schemaLocation, bindClass, inputSource);
return unmarshal;
} catch (FileNotFoundException e) {
- throw new CdkException("XML file not found",e);
+ throw new CdkException("XML file not found", e);
}
}
@@ -222,4 +235,182 @@
}
+ /**
+ * <p class="changed_added_4_0">
+ * This method creates adapter object and copies properties from model
+ * object to adapter.
+ * </p>
+ *
+ * @param <A>
+ * type of adapter object
+ * @param <T>
+ * type of model object.
+ * @param adapterClass
+ * adapter class.
+ * @param modelObject
+ * model object class.
+ * @return initialized instance of adapter object.
+ */
+ public static <A, T> A createAdapter(Class<A> adapterClass, T modelObject)
+ throws CdkException {
+ try {
+ A adapter = adapterClass.newInstance();
+ // Copy properties from model to adapter.
+ copyProperties(modelObject, adapter);
+ copyExtensions(modelObject, adapter, true);
+ return adapter;
+ } catch (InstantiationException e) {
+ throw new CdkException("JAXB adapter class instantiation error", e);
+ } catch (IllegalAccessException e) {
+ throw new CdkException("JAXB adapter class instantiation error", e);
+ }
+ }
+
+ public static <A, T extends ModelElement<T, K>, K extends Key> T createModelElement(
+ Class<T> modelClass, A adapter, K key) throws CdkException {
+ try {
+ Constructor<T> constructor = modelClass.getConstructor(key
+ .getClass());
+ T modelBean = constructor.newInstance(key);
+ copyProperties(adapter, modelBean);
+ copyExtensions(adapter, modelBean, false);
+ return modelBean;
+ } catch (Exception e) {
+ throw new CdkException("CDK model class instantiation error", e);
+ }
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @param <S>
+ * @param <D>
+ * @param source
+ * @param destination
+ * @param fromModel
+ * @throws CdkException
+ */
+ public static <S, D> void copyExtensions(S source, D destination,
+ boolean fromModel) throws CdkException {
+ try {
+ if (source instanceof Extensible
+ && destination instanceof Extensible) {
+ Extensible extensibleSource = (Extensible) source;
+ Extensible extensibleDestination = (Extensible) destination;
+ ConfigExtension sourceExtension = extensibleSource
+ .getExtension();
+ if (null != sourceExtension) {
+ ConfigExtension destinationExtension = createExtension(destination);
+ destinationExtension.setExtensions(sourceExtension
+ .getExtensions());
+ if (fromModel) {
+ copyProperties(source, destinationExtension);
+ } else {
+ copyProperties(sourceExtension, destination);
+ }
+ extensibleDestination.setExtension(destinationExtension);
+ } else if (fromModel) {
+ ConfigExtension destinationExtension = createExtension(destination);
+ copyProperties(source, destinationExtension);
+ extensibleDestination.setExtension(destinationExtension);
+ }
+ }
+ } catch (Exception e) {
+ throw new CdkException("Properties copiing error", e);
+ }
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @param <D>
+ * @param destination
+ * @return
+ * @throws NoSuchMethodException
+ * @throws InstantiationException
+ * @throws IllegalAccessException
+ */
+ private static <D> ConfigExtension createExtension(D destination)
+ throws NoSuchMethodException, InstantiationException,
+ IllegalAccessException {
+ Method method = destination.getClass().getMethod("getExtension");
+ Class<? extends ConfigExtension> destinationExtensionType = (Class<? extends ConfigExtension>) method
+ .getReturnType();
+ ConfigExtension destinationExtension = destinationExtensionType
+ .newInstance();
+ return destinationExtension;
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @param <S>
+ * @param <D>
+ * @param source
+ * @param destination
+ * @throws CdkException
+ */
+ public static <S, D> void copyProperties(S source, D destination)
+ throws CdkException {
+ try {
+ PropertyDescriptor[] targetProperties = Introspector.getBeanInfo(
+ destination.getClass()).getPropertyDescriptors();
+ PropertyDescriptor[] sourceProperties = Introspector.getBeanInfo(
+ source.getClass()).getPropertyDescriptors();
+ for (PropertyDescriptor targetProperty : targetProperties) {
+ Method writeMethod = targetProperty.getWriteMethod();
+ String name = targetProperty.getName();
+ for (PropertyDescriptor sourceProperty : sourceProperties) {
+ Method readMethod = sourceProperty.getReadMethod();
+ if (name.equals(sourceProperty.getName())
+ && null != readMethod) {
+ Class<?> targetType = targetProperty.getPropertyType();
+ Class<?> sourceType = sourceProperty.getPropertyType();
+ Object propertyValue = readMethod.invoke(source);
+ if (null != propertyValue) {
+ if (null != writeMethod) {
+ if (targetType.isAssignableFrom(sourceType)) {
+ writeMethod.invoke(destination,
+ propertyValue);
+ } else if (targetType.equals(String.class)) {
+ writeMethod.invoke(destination,
+ propertyValue.toString());
+ } else if (isCollections(targetType, propertyValue)) {
+ Collection targetCollection = (Collection) targetProperty
+ .getReadMethod()
+ .invoke(destination);
+ if (null != targetCollection) {
+ targetCollection
+ .addAll((Collection) propertyValue);
+ } else {
+ writeMethod.invoke(destination,
+ propertyValue);
+ }
+ }
+ } else if (isCollections(targetType, propertyValue)) {
+ Collection targetCollection = (Collection) targetProperty
+ .getReadMethod().invoke(destination);
+ if (null != targetCollection) {
+ targetCollection
+ .addAll((Collection) propertyValue);
+ }
+ }
+ }
+ }
+ }
+ }
+ } catch (Exception e) {
+ throw new CdkException("Properties copiing error", e);
+ }
+ }
+
+ private static boolean isCollections(Class<?> targetType, Object propertyValue) {
+ return Collection.class
+ .isAssignableFrom(targetType)
+ && propertyValue instanceof Collection;
+ }
+
}
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ClassAdapter.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ClassAdapter.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ClassAdapter.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -0,0 +1,49 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.xmlconfig.model;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.richfaces.cdk.model.ClassDescription;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class ClassAdapter extends XmlAdapter<ClassBean, ClassDescription> {
+
+ @Override
+ public ClassBean marshal(ClassDescription v) throws Exception {
+ ClassBean bean = new ClassBean();
+ bean.setName(v.getName());
+ return bean;
+ }
+
+ @Override
+ public ClassDescription unmarshal(ClassBean v) throws Exception {
+ return new ClassDescription(v.getName());
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ClassAdapter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ClassBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ClassBean.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ClassBean.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -0,0 +1,58 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.xmlconfig.model;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.richfaces.cdk.model.ComponentLibrary;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@XmlType(name="fully-qualified-classType",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+public class ClassBean {
+
+ private String name;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the name
+ */
+ @XmlValue
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ClassBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ComponentAdapter.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ComponentAdapter.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ComponentAdapter.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -28,6 +28,7 @@
import org.richfaces.cdk.model.ClassDescription;
import org.richfaces.cdk.model.Component;
import org.richfaces.cdk.model.ConfigExtension;
+import org.richfaces.cdk.xmlconfig.JAXBBinding;
/**
* <p class="changed_added_4_0"></p>
@@ -38,32 +39,15 @@
@Override
public ComponentBean marshal(Component v) throws Exception {
- ComponentBean bean = new ComponentBean();
- bean.setType(v.getType().toString());
- bean.setClassName(v.getComponentClass().getName());
- bean.getAttributes().addAll(v.getAttributes());
- ComponentBean.ComponentExtension extension = new ComponentBean.ComponentExtension();
- extension.setFamily(v.getFamily());
- ConfigExtension configExtension = v.getExtension();
- if(null != configExtension){
- extension.setExtensions(configExtension.getExtensions());
- }
- bean.setExtension(extension);
+ ComponentBean bean = JAXBBinding.createAdapter(ComponentBean.class, v);
return bean;
}
@Override
public Component unmarshal(ComponentBean v) throws Exception {
Component component = new Component(new Component.Type(v.getType()));
- component.setComponentClass(new ClassDescription(v.getClassName()));
- component.getAttributes().addAll(v.getAttributes());
- ConfigExtension extension = new ConfigExtension();
- ComponentBean.ComponentExtension configExtension = v.getExtension();
- if(null != configExtension){
- component.setFamily(configExtension.getFamily());
- extension.setExtensions(configExtension.getExtensions());
- component.setExtension(extension);
- }
+ JAXBBinding.copyProperties(v, component);
+ JAXBBinding.copyExtensions(v, component, false);
return component;
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ComponentBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ComponentBean.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ComponentBean.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -24,31 +24,47 @@
package org.richfaces.cdk.xmlconfig.model;
import java.util.List;
+import java.util.Set;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.richfaces.cdk.model.ClassDescription;
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.ConfigExtension;
+import org.richfaces.cdk.model.DescriptionGroup;
+import org.richfaces.cdk.model.Extensible;
+import org.richfaces.cdk.model.Facet;
import org.richfaces.cdk.model.Property;
import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
/**
* <p class="changed_added_4_0"></p>
* @author asmirnov(a)exadel.com
*
*/
-public class ComponentBean {
+public class ComponentBean implements Extensible<ComponentBean.ComponentExtension>,DescriptionGroup {
private String type;
- private String className;
+ private ClassDescription componentClass;
+
private List<Property> attributes = Lists.newArrayList();
private ComponentExtension extension;
+
+ private String icon;
+
+ private String description;
+ private String displayname;
+
+ private List<Facet> facets = Lists.newArrayList();
+
/**
* <p class="changed_added_4_0"></p>
* @return the type
@@ -68,19 +84,20 @@
/**
* <p class="changed_added_4_0"></p>
- * @return the className
+ * @return the componentClass
*/
@XmlElement(name="component-class",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
- public String getClassName() {
- return className;
+ @XmlJavaTypeAdapter(ClassAdapter.class)
+ public ClassDescription getComponentClass() {
+ return componentClass;
}
/**
* <p class="changed_added_4_0"></p>
- * @param className the className to set
+ * @param componentClass the componentClass to set
*/
- public void setClassName(String className) {
- this.className = className;
+ public void setComponentClass(ClassDescription className) {
+ this.componentClass = className;
}
/**
* <p class="changed_added_4_0"></p>
@@ -102,9 +119,28 @@
/**
* <p class="changed_added_4_0"></p>
+ * @return the facets
+ */
+ @XmlElement(name="facet",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ @XmlJavaTypeAdapter(FacetAdapter.class)
+ public List<Facet> getFacets() {
+ return facets;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param facets the facets to set
+ */
+ public void setFacets(List<Facet> facets) {
+ this.facets = facets;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
* @return the extension
*/
@XmlElement(name="component-extension",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ @Override
public ComponentExtension getExtension() {
return extension;
}
@@ -113,14 +149,70 @@
* <p class="changed_added_4_0"></p>
* @param extension the extension to set
*/
+ @Override
public void setExtension(ComponentExtension extension) {
this.extension = extension;
}
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the icon
+ */
+ @XmlElement(name="icon",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getIcon() {
+ return icon;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param icon the icon to set
+ */
+ public void setIcon(String icon) {
+ this.icon = icon;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the description
+ */
+ @XmlElement(name="description",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the displayname
+ */
+ @XmlElement(name="display-name",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getDisplayname() {
+ return displayname;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param displayname the displayname to set
+ */
+ public void setDisplayname(String displayname) {
+ this.displayname = displayname;
+ }
+
public static class ComponentExtension extends ConfigExtension {
private String family;
+ private ClassDescription baseClass;
+
+ private boolean generate;
+
/**
* <p class="changed_added_4_0"></p>
* @param family the family to set
@@ -137,5 +229,40 @@
public String getFamily() {
return family;
}
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the baseClass
+ */
+ @XmlElement(name="base-class",namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ @XmlJavaTypeAdapter(ClassAdapter.class)
+ public ClassDescription getBaseClass() {
+ return baseClass;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param baseClass the baseClass to set
+ */
+ public void setBaseClass(ClassDescription baseClass) {
+ this.baseClass = baseClass;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the generate
+ */
+ @XmlElement(name="generate",namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ public boolean isGenerate() {
+ return generate;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param generate the generate to set
+ */
+ public void setGenerate(boolean generate) {
+ this.generate = generate;
+ }
}
}
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacetAdapter.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacetAdapter.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacetAdapter.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -0,0 +1,48 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.xmlconfig.model;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.richfaces.cdk.model.Facet;
+import org.richfaces.cdk.xmlconfig.JAXBBinding;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class FacetAdapter extends XmlAdapter<FacetBean, Facet> {
+
+ @Override
+ public FacetBean marshal(Facet v) throws Exception {
+ return JAXBBinding.createAdapter(FacetBean.class, v);
+ }
+
+ @Override
+ public Facet unmarshal(FacetBean v) throws Exception {
+ return JAXBBinding.createModelElement(Facet.class, v, new Facet.Name(v.getName()));
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacetAdapter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacetBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacetBean.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacetBean.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -0,0 +1,163 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.xmlconfig.model;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.richfaces.cdk.model.ComponentLibrary;
+import org.richfaces.cdk.model.ConfigExtension;
+import org.richfaces.cdk.model.DescriptionGroup;
+import org.richfaces.cdk.model.Extensible;
+import org.richfaces.cdk.xmlconfig.model.ComponentBean.ComponentExtension;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class FacetBean implements Extensible<FacetBean.FacetExtension>,DescriptionGroup{
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+ public static final class FacetExtension extends ConfigExtension {
+
+ private boolean generate;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the generate
+ */
+ @XmlElement(name="generate",namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ public boolean isGenerate() {
+ return generate;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param generate the generate to set
+ */
+ public void setGenerate(boolean generate) {
+ this.generate = generate;
+ }
+
+ }
+
+ private String name;
+
+ private FacetExtension extension;
+
+ private String icon;
+
+ private String description;
+
+ private String displayname;
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the name
+ */
+ @XmlElement(name="facet-name",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the icon
+ */
+ @XmlElement(name="icon",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getIcon() {
+ return icon;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param icon the icon to set
+ */
+ public void setIcon(String icon) {
+ this.icon = icon;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the description
+ */
+ @XmlElement(name="description",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the displayname
+ */
+ @XmlElement(name="display-name",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getDisplayname() {
+ return displayname;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param displayname the displayname to set
+ */
+ public void setDisplayname(String displayname) {
+ this.displayname = displayname;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the extension
+ */
+ @XmlElement(name="facet-extension",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public FacetExtension getExtension() {
+ return extension;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param extension the extension to set
+ */
+ public void setExtension(FacetExtension extension) {
+ this.extension = extension;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacetBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyAdapter.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyAdapter.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyAdapter.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -27,6 +27,7 @@
import org.richfaces.cdk.model.ClassDescription;
import org.richfaces.cdk.model.Property;
+import org.richfaces.cdk.xmlconfig.JAXBBinding;
/**
* <p class="changed_added_4_0"></p>
@@ -37,17 +38,12 @@
@Override
public PropertyBean marshal(Property v) throws Exception {
- PropertyBean bean = new PropertyBean();
- bean.setName(v.getName().toString());
- bean.setType(v.getType().toString());
- return bean;
+ return JAXBBinding.createAdapter(PropertyBean.class, v);
}
@Override
public Property unmarshal(PropertyBean v) throws Exception {
- Property property = new Property(new Property.Name(v.getName()));
- property.setType(new ClassDescription(v.getType()));
- return property;
+ return JAXBBinding.createModelElement(Property.class, v, new Property.Name(v.getName()));
}
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyBean.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/PropertyBean.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -23,19 +23,211 @@
package org.richfaces.cdk.xmlconfig.model;
+import java.util.List;
+import java.util.Set;
+
import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.richfaces.cdk.model.ClassDescription;
import org.richfaces.cdk.model.ComponentLibrary;
+import org.richfaces.cdk.model.ConfigExtension;
+import org.richfaces.cdk.model.DescriptionGroup;
+import org.richfaces.cdk.model.EventName;
+import org.richfaces.cdk.model.Extensible;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
/**
* <p class="changed_added_4_0"></p>
* @author asmirnov(a)exadel.com
*
*/
-public class PropertyBean {
+public class PropertyBean implements Extensible<PropertyBean.PropertyExtension>,DescriptionGroup {
/**
* <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+ public static class PropertyExtension extends ConfigExtension {
+
+ private boolean generate;
+
+ private boolean hidden;
+
+ private boolean literal;
+
+ private boolean required;
+
+ private boolean passThrough=false;
+
+ private Set<EventName> eventNames = Sets.newHashSet();
+
+ private List<ClassDescription> signature = Lists.newArrayList();
+
+ private Set<String> aliases = Sets.newHashSet();
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the generate
+ */
+ @XmlElement(name="generate",namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ public boolean isGenerate() {
+ return generate;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param generate the generate to set
+ */
+ public void setGenerate(boolean generate) {
+ this.generate = generate;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the hidden
+ */
+ @XmlElement(name="hidden",namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ public boolean isHidden() {
+ return hidden;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param hidden the hidden to set
+ */
+ public void setHidden(boolean hidden) {
+ this.hidden = hidden;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the literal
+ */
+ @XmlElement(name="literal",namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ public boolean isLiteral() {
+ return literal;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param literal the literal to set
+ */
+ public void setLiteral(boolean literal) {
+ this.literal = literal;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the required
+ */
+ @XmlElement(name="required",namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ public boolean isRequired() {
+ return required;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param required the required to set
+ */
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the passThrough
+ */
+ @XmlElement(name="pass-through",namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ public boolean isPassThrough() {
+ return passThrough;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param passThrough the passThrough to set
+ */
+ public void setPassThrough(boolean passThrough) {
+ this.passThrough = passThrough;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the eventNames
+ */
+ @XmlElement(name="event-name",namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ public Set<EventName> getEventNames() {
+ return eventNames;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param eventNames the eventNames to set
+ */
+ public void setEventNames(Set<EventName> eventNames) {
+ this.eventNames = eventNames;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the signature
+ */
+ @XmlElementWrapper(name="signature",namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ @XmlElement(name="param",namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ @XmlJavaTypeAdapter(ClassAdapter.class)
+ public List<ClassDescription> getSignature() {
+ return signature;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param signature the signature to set
+ */
+ public void setSignature(List<ClassDescription> signature) {
+ this.signature = signature;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the aliases
+ */
+ @XmlElement(name="alias",namespace=ComponentLibrary.CDK_EXTENSIONS_NAMESPACE)
+ public Set<String> getAliases() {
+ return aliases;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param aliases the aliases to set
+ */
+ public void setAliases(Set<String> aliases) {
+ this.aliases = aliases;
+ }
+
+ }
+
+ private String name;
+
+ private ClassDescription type;
+
+ private String icon;
+
+ private String description;
+
+ private String displayname;
+
+ private String defaultValue;
+
+ private String suggestedValue;
+
+ private PropertyExtension extension;
+
+ /**
+ * <p class="changed_added_4_0"></p>
* @return the name
*/
@XmlElement(name="property-name",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
@@ -56,7 +248,8 @@
* @return the type
*/
@XmlElement(name="property-class",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
- public String getType() {
+ @XmlJavaTypeAdapter(ClassAdapter.class)
+ public ClassDescription getType() {
return type;
}
@@ -64,12 +257,108 @@
* <p class="changed_added_4_0"></p>
* @param type the type to set
*/
- public void setType(String type) {
+ public void setType(ClassDescription type) {
this.type = type;
}
- private String name;
-
- private String type;
-
-}
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the icon
+ */
+ @XmlElement(name="icon",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getIcon() {
+ return icon;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param icon the icon to set
+ */
+ public void setIcon(String icon) {
+ this.icon = icon;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the description
+ */
+ @XmlElement(name="description",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the displayname
+ */
+ @XmlElement(name="display-name",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getDisplayname() {
+ return displayname;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param displayname the displayname to set
+ */
+ public void setDisplayname(String displayname) {
+ this.displayname = displayname;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the defaultValue
+ */
+ @XmlElement(name="default-value",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getDefaultValue() {
+ return defaultValue;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param defaultValue the defaultValue to set
+ */
+ public void setDefaultValue(String defaultValue) {
+ this.defaultValue = defaultValue;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the suggestedValue
+ */
+ @XmlElement(name="suggested-value",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public String getSuggestedValue() {
+ return suggestedValue;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param suggestedValue the suggestedValue to set
+ */
+ public void setSuggestedValue(String suggestedValue) {
+ this.suggestedValue = suggestedValue;
+ }
+
+ @Override
+ @XmlElement(name="property-extension",namespace=ComponentLibrary.FACES_CONFIG_NAMESPACE)
+ public PropertyExtension getExtension() {
+ return extension;
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param extension the extension to set
+ */
+ @Override
+ public void setExtension(PropertyExtension extension) {
+ this.extension = extension;
+ }
+
+}
\ No newline at end of file
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ComponentProcessorTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ComponentProcessorTest.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/ComponentProcessorTest.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -66,12 +66,8 @@
public class ComponentProcessorTest extends CdkTestBase {
- private static final String INTERFACE_JAVA = "org/richfaces/cdk/apt/TestInterface.java";
- private static final String SUB_CLASS_JAVA = "org/richfaces/cdk/apt/TestSubClass.java";
- private static final String CLASS_JAVA = "org/richfaces/cdk/apt/TestClass.java";
- private static final ImmutableSet<String> PROCESS_ANNOTATIONS = ImmutableSet
- .of(TestAnnotation.class.getName());
private static final String COMPONENT_CLASS_JAVA = "org/richfaces/cdk/test/component/AbstractTestComponent.java";
+ private static final String FACES_COMPONENT_CLASS_JAVA = "org/richfaces/cdk/test/component/UITestCommand.java";
/**
@@ -95,9 +91,33 @@
assertEquals(1, components.size());
Component component = Iterables.get(components, 0);
Collection<Property> attributes = component.getAttributes();
- assertEquals(3, attributes.size());
+ assertEquals(5, attributes.size());
}
+ /**
+ * Test method for
+ * {@link org.richfaces.cdk.apt.CdkProcessor#process(java.util.Set, javax.annotation.processing.RoundEnvironment)}
+ * .
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testProcessFacesComponent() throws Exception {
+ // Prepare Mock compilation context.
+ CdkContext cdkContext = createMockContext();
+ ComponentLibrary library = new ComponentLibrary();
+ ComponentProcessor processor = new ComponentProcessor(cdkContext,library);
+ AptBuilder compiler = new AptBuilder();
+ compiler.init(cdkContext);
+ compiler.process(ImmutableList.of(getJavaFile(FACES_COMPONENT_CLASS_JAVA)), processor);
+ verify(cdkContext);
+ Collection<Component> components = library.getComponents();
+ assertEquals(1, components.size());
+ Component component = Iterables.get(components, 0);
+ Collection<Property> attributes = component.getAttributes();
+ assertEquals(2, attributes.size());
+ }
+
private CdkContext createMockContext() throws Exception {
CdkContext cdkContext = createMock(CdkContext.class);
expect(cdkContext.getSourceFolders(StandardSources.JAVA_SOURCES)).andStubReturn(testSourceDirectory);
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileManagerTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileManagerTest.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileManagerTest.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -90,7 +90,7 @@
fileManager.setJavaSourceDirectory(javaSourceDirectory);
replay(mockFileManager);
ArrayList<JavaFileObject> list = Lists.newArrayList(fileManager.list(StandardLocation.SOURCE_PATH, "", ImmutableSet.of(Kind.HTML,Kind.SOURCE), true));
- assertEquals(5, list.size());
+ assertEquals(6, list.size());
}
@Test
public void testGetFileForInputLocationStringString() throws Exception {
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FacesConfigTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FacesConfigTest.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FacesConfigTest.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -32,6 +32,7 @@
import org.richfaces.cdk.CdkTestBase;
import org.richfaces.cdk.model.Component;
import org.richfaces.cdk.model.ComponentLibrary;
+import org.richfaces.cdk.model.Facet;
import org.richfaces.cdk.model.Property;
import org.richfaces.cdk.xmlconfig.model.FacesConfigBean;
@@ -55,7 +56,15 @@
assertEquals("javax.faces.Panel", component.getType().toString());
assertEquals("javax.faces.Panel", component.getFamily());
assertEquals("javax.faces.component.UIPanel", component.getComponentClass().getName());
+ assertEquals("panel.gif", component.getIcon());
+ assertEquals("Panel component", component.getDescription());
+ assertEquals("Panel", component.getDisplayname());
+ assertTrue(component.isGenerate());
+ Facet facet = Iterables.getOnlyElement(component.getFacets());
+ assertEquals("header", facet.getName().toString());
+ assertEquals("Header facet", facet.getDescription());
+ assertTrue(facet.isGenerate());
Collection<Property> attributes = component.getAttributes();
- assertEquals(10, attributes.size());
+ assertEquals(3, attributes.size());
}
}
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FragmentParserTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FragmentParserTest.java 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/FragmentParserTest.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -26,12 +26,17 @@
import static org.junit.Assert.*;
import java.util.Collection;
+import java.util.List;
+import java.util.Set;
import org.junit.Test;
import org.richfaces.cdk.AbstractCdkContext;
+import org.richfaces.cdk.model.ClassDescription;
import org.richfaces.cdk.model.Property;
+import com.google.common.collect.Iterables;
+
/**
* <p class="changed_added_4_0"></p>
* @author asmirnov(a)exadel.com
@@ -46,4 +51,35 @@
assertEquals(3,properties.size());
}
+ @Test
+ public void xincludeTest() throws Exception {
+ FragmentParser parser = FragmentParser.getInstance(new AbstractCdkContext(this.getClass().getClassLoader()));
+ Collection<Property> properties = parser.parseProperties("urn:resource:org/richfaces/cdk/xmlconfig/parent.xml");
+ assertEquals(1,properties.size());
+ }
+
+ @Test
+ public void propertyTest() throws Exception {
+ FragmentParser parser = FragmentParser.getInstance(new AbstractCdkContext(this.getClass().getClassLoader()));
+ Collection<Property> properties = parser.parseProperties("urn:resource:org/richfaces/cdk/xmlconfig/include.xml");
+ assertEquals(1,properties.size());
+ Property property = Iterables.getOnlyElement(properties);
+ assertEquals("ontest2",property.getName().toString());
+ assertEquals("int",property.getType().getName());
+ assertEquals("test2 property",property.getDescription());
+ assertEquals("ontest2.png",property.getIcon());
+ assertEquals("test2 event property",property.getDisplayname());
+ assertEquals("3",property.getDefaultValue());
+ assertEquals("15",property.getSuggestedValue());
+ // CDK extensions.
+ assertTrue(property.isGenerate());
+ assertTrue(property.isHidden());
+ assertTrue(property.isLiteral());
+ assertTrue(property.isPassThrough());
+ assertTrue(property.isRequired());
+ List<ClassDescription> signature = property.getSignature();
+ assertEquals(2, signature.size());
+ Set<String> aliases = property.getAliases();
+ assertEquals(2, aliases.size());
+ }
}
Added: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JAXBCopyTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JAXBCopyTest.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JAXBCopyTest.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -0,0 +1,50 @@
+package org.richfaces.cdk.xmlconfig;
+
+import static org.junit.Assert.*;
+
+import java.util.List;
+
+import org.junit.Test;
+import org.richfaces.cdk.CdkException;
+import org.richfaces.cdk.model.ClassDescription;
+import org.richfaces.cdk.model.Component;
+import org.richfaces.cdk.model.Property;
+import org.richfaces.cdk.xmlconfig.model.ComponentBean;
+import org.richfaces.cdk.xmlconfig.model.ComponentBean.ComponentExtension;
+
+public class JAXBCopyTest {
+
+ private static final String FOO_FAMILY = "foo.Family";
+ private static final String BAZ = "baz";
+ private static final String FOO_DESCTIPTION = "foo.Desctiption";
+ private static final String FOO_UI_BAR = "foo.UIBar";
+ private static final String FOO_BAR = "foo.Bar";
+
+ @Test
+ public void testCreateAdapter() throws Exception {
+ Component component = new Component(new Component.Type(FOO_BAR));
+ component.setDescription(FOO_DESCTIPTION);
+ component.setComponentClass(new ClassDescription(FOO_UI_BAR));
+ component.findOrCreateAttribute(BAZ);
+ component.setFamily(FOO_FAMILY);
+ ComponentBean componentBean = JAXBBinding.createAdapter(ComponentBean.class, component);
+ assertEquals(FOO_BAR,componentBean.getType());
+ List<Property> attributes = componentBean.getAttributes();
+ assertEquals(1,attributes.size());
+ assertEquals(BAZ,attributes.get(0).getName().toString());
+ ComponentExtension extension = componentBean.getExtension();
+ assertNotNull(extension);
+ assertEquals(FOO_FAMILY, extension.getFamily());
+ }
+
+ @Test
+ public void testCopyExtensions() {
+// fail("Not yet implemented");
+ }
+
+ @Test
+ public void testCopyProperties() {
+// fail("Not yet implemented");
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/JAXBCopyTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/UITestCommand.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/UITestCommand.java (rev 0)
+++ root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/UITestCommand.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -0,0 +1,132 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.test.component;
+
+import javax.el.MethodExpression;
+import javax.faces.component.ActionSource2;
+import javax.faces.component.FacesComponent;
+import javax.faces.component.UIComponentBase;
+import javax.faces.el.MethodBinding;
+import javax.faces.event.ActionListener;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@FacesComponent("cdk.TestCommand")
+public class UITestCommand extends UIComponentBase implements ActionSource2 {
+
+ private static final String COMPONENT_FAMILY="cdk.TestFamily";
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.UIComponent#getFamily()
+ */
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#addActionListener(javax.faces.event.ActionListener)
+ */
+ public void addActionListener(ActionListener listener) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#getAction()
+ */
+ public MethodBinding getAction() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#getActionListener()
+ */
+ public MethodBinding getActionListener() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#getActionListeners()
+ */
+ public ActionListener[] getActionListeners() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#isImmediate()
+ */
+ public boolean isImmediate() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#removeActionListener(javax.faces.event.ActionListener)
+ */
+ public void removeActionListener(ActionListener listener) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#setAction(javax.faces.el.MethodBinding)
+ */
+ public void setAction(MethodBinding action) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#setActionListener(javax.faces.el.MethodBinding)
+ */
+ public void setActionListener(MethodBinding actionListener) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setActionExpression(MethodExpression action) {
+ // TODO Auto-generated method stub
+
+ }
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#setImmediate(boolean)
+ */
+ public void setImmediate(boolean immediate) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public MethodExpression getActionExpression() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/test/component/UITestCommand.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/component.xml
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/component.xml 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/component.xml 2009-08-26 01:13:23 UTC (rev 15306)
@@ -8,79 +8,16 @@
<component>
<component-type>javax.faces.Panel</component-type>
<component-class>javax.faces.component.UIPanel</component-class>
+ <facet>
+ <description>Header facet</description>
+ <facet-name>header</facet-name>
+ <facet-extension>
+ <cdk:generate>true</cdk:generate>
+ </facet-extension>
+ </facet>
<property>
<description><![CDATA[
- A mutable Map of the attributes associated with
- this component, keyed by attribute name.
- ]]></description>
- <display-name>Attributes Map</display-name>
- <icon />
- <property-name>attributes</property-name>
- <property-class>java.util.Map</property-class>
- <property-extension>
- <tag-attribute>false</tag-attribute>
- <read-only>true</read-only>
- </property-extension>
- </property>
- <property>
- <description><![CDATA[
- The number of child components associated with
- this component.
- ]]></description>
- <display-name>Child Component Count</display-name>
- <icon />
- <property-name>childCount</property-name>
- <property-class>int</property-class>
- <property-extension>
- <tag-attribute>false</tag-attribute>
- <read-only>true</read-only>
- </property-extension>
- </property>
- <property>
- <description><![CDATA[
- A mutable List of the child components associated with
- this component.
- ]]></description>
- <display-name>Child Component List</display-name>
- <icon />
- <property-name>children</property-name>
- <property-class>java.util.List</property-class>
- <property-extension>
- <tag-attribute>false</tag-attribute>
- <read-only>true</read-only>
- </property-extension>
- </property>
- <property>
- <description><![CDATA[
- A mutable Map of the facets associated with
- this component, keyed by facet name.
- ]]></description>
- <display-name>Facets Map</display-name>
- <icon />
- <property-name>facets</property-name>
- <property-class>java.util.Map</property-class>
- <property-extension>
- <tag-attribute>false</tag-attribute>
- <read-only>true</read-only>
- </property-extension>
- </property>
- <property>
- <description><![CDATA[
- The component family to which this component belongs. This property
- is used to select an appropriate Renderer.
- ]]></description>
- <display-name>Component Family</display-name>
- <icon />
- <property-name>family</property-name>
- <property-class>java.lang.String</property-class>
- <property-extension>
- <tag-attribute>false</tag-attribute>
- <read-only>true</read-only>
- </property-extension>
- </property>
- <property>
- <description><![CDATA[
The component identifier for this component. This value must be
unique within the closest parent component that is a naming
container.
@@ -119,37 +56,13 @@
<value-expression-enabled>true</value-expression-enabled>
</property-extension>
</property>
- <property>
- <description><![CDATA[
- Identifier used (in conjunction with the "family" property) to
- select an appropriate Renderer to encode and decode this component.
- ]]></description>
- <display-name>Renderer Type</display-name>
- <icon />
- <property-name>rendererType</property-name>
- <property-class>java.lang.String</property-class>
- <property-extension>
- <tag-attribute>false</tag-attribute>
- </property-extension>
- </property>
- <property>
- <description><![CDATA[
- Flag indicating whether or not this component takes responsibility
- for rendering its own children. This decision is normally delegated
- to the associated Renderer, if there is one.
- ]]></description>
- <display-name>Renders Children</display-name>
- <icon />
- <property-name>rendersChildren</property-name>
- <property-class>boolean</property-class>
- <property-extension>
- <tag-attribute>false</tag-attribute>
- <read-only>true</read-only>
- </property-extension>
- </property>
-
+ <icon>panel.gif</icon>
+ <description>Panel component</description>
+ <display-name>Panel</display-name>
<component-extension>
<cdk:component-family>javax.faces.Panel</cdk:component-family>
+ <cdk:base-class>javax.faces.component.UIComponentBase</cdk:base-class>
+ <cdk:generate>true</cdk:generate>
</component-extension>
</component>
</faces-config>
\ No newline at end of file
Modified: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/include.xml
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/include.xml 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/include.xml 2009-08-26 01:13:23 UTC (rev 15306)
@@ -3,25 +3,27 @@
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:cdk="http://richfaces.org/cdk/extensions">
<property>
- <description><![CDATA[
- test2 property.
- ]]></description>
- <display-name>test2</display-name>
- <property-name>test2</property-name>
+ <description><![CDATA[test2 property]]></description>
+ <display-name>test2 event property</display-name>
+ <icon>ontest2.png</icon>
+ <property-name>ontest2</property-name>
<property-class>int</property-class>
+ <default-value>3</default-value>
+ <suggested-value>15</suggested-value>
<property-extension>
- <cdk:el-expression>false</cdk:el-expression>
+ <cdk:literal>true</cdk:literal>
+ <cdk:generate>true</cdk:generate>
+ <cdk:hidden>true</cdk:hidden>
+ <cdk:required>true</cdk:required>
+ <cdk:pass-through>true</cdk:pass-through>
+ <cdk:event-name>ontest2</cdk:event-name>
+ <cdk:event-name default="true">action</cdk:event-name>
+ <cdk:signature>
+ <cdk:param>boolean</cdk:param>
+ <cdk:param>java.lang.String</cdk:param>
+ </cdk:signature>
+ <cdk:alias>foo</cdk:alias>
+ <cdk:alias>bar</cdk:alias>
</property-extension>
</property>
- <property>
- <description><![CDATA[
- test3 property.
- ]]></description>
- <display-name>test3</display-name>
- <property-name>test3</property-name>
- <property-class>double</property-class>
- <property-extension>
- <cdk:el-expression>false</cdk:el-expression>
- </property-extension>
- </property>
</cdk:properties>
Added: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/parent.xml
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/parent.xml (rev 0)
+++ root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/parent.xml 2009-08-26 01:13:23 UTC (rev 15306)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<cdk:properties xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns="http://java.sun.com/xml/ns/javaee" xmlns:cdk="http://richfaces.org/cdk/extensions">
+ <!--
+ <xi:include
+ href="urn:resource:org/richfaces/cdk/xmlconfig/include.xml"
+ xpointer="xmlns(jsf=http://java.sun.com/xml/ns/javaee)xpointer(//jsf:property)"/>
+ -->
+
+ <xi:include
+ href="urn:resource:org/richfaces/cdk/xmlconfig/include.xml"
+
+ xpointer="element(/1/1)"/>
+
+</cdk:properties>
Property changes on: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/xmlconfig/parent.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/pom.xml
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/pom.xml 2009-08-25 21:18:02 UTC (rev 15305)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/pom.xml 2009-08-26 01:13:23 UTC (rev 15306)
@@ -48,5 +48,10 @@
<artifactId>annotations</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.2</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Added: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/UITestCommand.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/UITestCommand.java (rev 0)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/UITestCommand.java 2009-08-26 01:13:23 UTC (rev 15306)
@@ -0,0 +1,132 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk.test.component;
+
+import javax.el.MethodExpression;
+import javax.faces.component.ActionSource2;
+import javax.faces.component.FacesComponent;
+import javax.faces.component.UIComponentBase;
+import javax.faces.el.MethodBinding;
+import javax.faces.event.ActionListener;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@FacesComponent("cdk.TestCommand")
+public class UITestCommand extends UIComponentBase implements ActionSource2 {
+
+ private static final String COMPONENT_FAMILY="cdk.TestFamily";
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.UIComponent#getFamily()
+ */
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#addActionListener(javax.faces.event.ActionListener)
+ */
+ public void addActionListener(ActionListener listener) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#getAction()
+ */
+ public MethodBinding getAction() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#getActionListener()
+ */
+ public MethodBinding getActionListener() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#getActionListeners()
+ */
+ public ActionListener[] getActionListeners() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#isImmediate()
+ */
+ public boolean isImmediate() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#removeActionListener(javax.faces.event.ActionListener)
+ */
+ public void removeActionListener(ActionListener listener) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#setAction(javax.faces.el.MethodBinding)
+ */
+ public void setAction(MethodBinding action) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#setActionListener(javax.faces.el.MethodBinding)
+ */
+ public void setActionListener(MethodBinding actionListener) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setActionExpression(MethodExpression action) {
+ // TODO Auto-generated method stub
+
+ }
+ /* (non-Javadoc)
+ * @see javax.faces.component.ActionSource#setImmediate(boolean)
+ */
+ public void setImmediate(boolean immediate) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public MethodExpression getActionExpression() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/UITestCommand.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 4 months