JBoss Rich Faces SVN: r17992 - root/build/parent/tags.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-07-12 21:03:30 -0400 (Mon, 12 Jul 2010)
New Revision: 17992
Added:
root/build/parent/tags/richfaces-parent-8/
Log:
[maven-scm] copy for tag richfaces-parent-8
Copied: root/build/parent/tags/richfaces-parent-8 (from rev 17991, root/build/parent/trunk)
14 years, 6 months
JBoss Rich Faces SVN: r17990 - root/build/parent/trunk.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-07-12 20:59:59 -0400 (Mon, 12 Jul 2010)
New Revision: 17990
Modified:
root/build/parent/trunk/pom.xml
Log:
RF-8921 Updated jsf versions, and made other minor updates
Modified: root/build/parent/trunk/pom.xml
===================================================================
--- root/build/parent/trunk/pom.xml 2010-07-12 23:54:50 UTC (rev 17989)
+++ root/build/parent/trunk/pom.xml 2010-07-13 00:59:59 UTC (rev 17990)
@@ -256,61 +256,6 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.2</version>
</plugin>
- <!--
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.2.3</version>
- <extensions>true</extensions>
- <dependencies>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jbossorg-docbook-xslt</artifactId>
- <version>1.1.0</version>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jbossorg-jdocbook-style</artifactId>
- <version>1.1.0</version>
- <type>jdocbook-style</type>
- </dependency>
- </dependencies>
- <configuration>
- <sourceDirectory>${project.basedir}/src/main/docbook</sourceDirectory>
- <sourceDocumentName>${docname}.xml</sourceDocumentName>
- <masterTranslation>en-US</masterTranslation>
- <imageResource>
- <directory>${project.basedir}/src/main/docbook/en-US</directory>
- <includes>
- <include>images/*.png</include>
- </includes>
- </imageResource>
- <formats>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
- <finalName>${pdf.name}</finalName>
- </format>
- <format>
- <formatName>html</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- <format>
- <formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- </format>
- </formats>
- <options>
- <xincludeSupported>true</xincludeSupported>
- <xmlTransformerType>saxon</xmlTransformerType>
- <docbookVersion>1.72.0</docbookVersion>
- <localeSeparator>-</localeSeparator>
- </options>
- </configuration>
- </plugin>
- -->
</plugins>
</pluginManagement>
<plugins>
@@ -413,35 +358,18 @@
</activation>
<properties>
<!-- Define jsf 2 api dependency -->
- <jsf2.api.groupid>com.sun.faces</jsf2.api.groupid>
+ <jsf2.api.groupid>javax.faces</jsf2.api.groupid>
<jsf2.api.artifactid>jsf-api</jsf2.api.artifactid>
- <jsf2.api.version>2.0.2</jsf2.api.version>
- <!-- Define jsf 2 impl dependency -->
+ <jsf2.api.version>2.0</jsf2.api.version>
+ <!-- Define jsf 2 impl dependency
+ NOTE: This is the version that is available from maven repo, and is the same
+ as 2.0.3.FCS, the mojarra team did not upload as FCS -->
<jsf2.impl.groupid>com.sun.faces</jsf2.impl.groupid>
<jsf2.impl.artifactid>jsf-impl</jsf2.impl.artifactid>
- <jsf2.impl.version>2.0.2</jsf2.impl.version>
+ <jsf2.impl.version>2.0.3-b03</jsf2.impl.version>
</properties>
</profile>
<profile>
- <id>jsf_ri_javax</id>
- <activation>
- <property>
- <name>jsf_profile</name>
- <value>jsf_ri_javax</value>
- </property>
- </activation>
- <properties>
- <!-- Define jsf 2 api dependency -->
- <jsf2.api.groupid>javax.faces</jsf2.api.groupid>
- <jsf2.api.artifactid>jsf-api</jsf2.api.artifactid>
- <jsf2.api.version>2.0.2-FCS</jsf2.api.version>
- <!-- Define jsf 2 impl dependency -->
- <jsf2.impl.groupid>javax.faces</jsf2.impl.groupid>
- <jsf2.impl.artifactid>jsf-impl</jsf2.impl.artifactid>
- <jsf2.impl.version>2.0.2-FCS</jsf2.impl.version>
- </properties>
- </profile>
- <profile>
<id>jsf_ri_snapshot</id>
<activation>
<property>
@@ -451,9 +379,9 @@
</activation>
<properties>
<!-- Define jsf 2 api dependency -->
- <jsf2.api.groupid>com.sun.faces</jsf2.api.groupid>
+ <jsf2.api.groupid>javax.faces</jsf2.api.groupid>
<jsf2.api.artifactid>jsf-api</jsf2.api.artifactid>
- <jsf2.api.version>2.0.3-SNAPSHOT</jsf2.api.version>
+ <jsf2.api.version>2.0</jsf2.api.version>
<!-- Define jsf 2 impl dependency -->
<jsf2.impl.groupid>com.sun.faces</jsf2.impl.groupid>
<jsf2.impl.artifactid>jsf-impl</jsf2.impl.artifactid>
@@ -513,7 +441,7 @@
</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/build/parent/trunk
</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces</url>
+ <url>http://fisheye.jboss.org/browse/richfaces/root/build/parent/trunk</url>
</scm>
</project>
14 years, 6 months
JBoss Rich Faces SVN: r17988 - in root/core/trunk/impl/src/main/java/org: richfaces/application and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-07-12 19:35:30 -0400 (Mon, 12 Jul 2010)
New Revision: 17988
Modified:
root/core/trunk/impl/src/main/java/org/ajax4jsf/context/InitParametersStorage.java
root/core/trunk/impl/src/main/java/org/richfaces/application/DefaultModule.java
Log:
https://jira.jboss.org/browse/RF-8768
Modified: root/core/trunk/impl/src/main/java/org/ajax4jsf/context/InitParametersStorage.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/ajax4jsf/context/InitParametersStorage.java 2010-07-12 23:32:43 UTC (rev 17987)
+++ root/core/trunk/impl/src/main/java/org/ajax4jsf/context/InitParametersStorage.java 2010-07-12 23:35:30 UTC (rev 17988)
@@ -26,14 +26,11 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
-import javax.inject.Singleton;
-
/**
* <p class="changed_added_4_0"></p>
* @author asmirnov(a)exadel.com
*
*/
-@Singleton
public class InitParametersStorage {
ConcurrentMap<String,Object> storage = new ConcurrentHashMap<String, Object>(5);
Modified: root/core/trunk/impl/src/main/java/org/richfaces/application/DefaultModule.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/application/DefaultModule.java 2010-07-12 23:32:43 UTC (rev 17987)
+++ root/core/trunk/impl/src/main/java/org/richfaces/application/DefaultModule.java 2010-07-12 23:35:30 UTC (rev 17988)
@@ -1,6 +1,7 @@
package org.richfaces.application;
import org.ajax4jsf.cache.Cache;
+import org.ajax4jsf.context.InitParametersStorage;
import org.ajax4jsf.renderkit.AJAXDataSerializer;
import org.richfaces.resource.DefaultResourceCodec;
import org.richfaces.resource.ResourceCodec;
@@ -16,6 +17,7 @@
factory.setInstance(Cache.class,new CacheProvider());
factory.setInstance(Uptime.class, new Uptime());
factory.setInstance(DependencyInjector.class, new DependencyInjectionServiceImpl());
+ factory.setInstance(InitParametersStorage.class, new InitParametersStorage());
}
}
14 years, 6 months
JBoss Rich Faces SVN: r17987 - root/core/trunk/impl.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-07-12 19:32:43 -0400 (Mon, 12 Jul 2010)
New Revision: 17987
Modified:
root/core/trunk/impl/pom.xml
Log:
https://jira.jboss.org/browse/RF-8768
Modified: root/core/trunk/impl/pom.xml
===================================================================
--- root/core/trunk/impl/pom.xml 2010-07-12 23:29:51 UTC (rev 17986)
+++ root/core/trunk/impl/pom.xml 2010-07-12 23:32:43 UTC (rev 17987)
@@ -52,10 +52,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- </dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
14 years, 6 months
JBoss Rich Faces SVN: r17986 - in root/core/trunk: impl/src/main/java/org/richfaces and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-07-12 19:29:51 -0400 (Mon, 12 Jul 2010)
New Revision: 17986
Added:
root/core/trunk/api/src/main/java/org/richfaces/application/ServiceException.java
root/core/trunk/api/src/main/java/org/richfaces/application/ServicesFactory.java
root/core/trunk/impl/src/main/java/org/richfaces/application/DependencyInjectionServiceImpl.java
root/core/trunk/impl/src/main/java/org/richfaces/application/Initializable.java
root/core/trunk/impl/src/main/java/org/richfaces/application/Module.java
root/core/trunk/impl/src/main/java/org/richfaces/application/ServiceLoader.java
root/core/trunk/impl/src/main/java/org/richfaces/application/ServicesFactoryImpl.java
root/core/trunk/impl/src/main/java/org/richfaces/application/Uptime.java
Removed:
root/core/trunk/impl/src/main/java/org/richfaces/jsr330/
root/core/trunk/impl/src/test/java/org/richfaces/jsr330/
Modified:
root/core/trunk/api/src/main/java/org/richfaces/application/DependencyInjector.java
root/core/trunk/api/src/main/java/org/richfaces/application/ServiceTracker.java
root/core/trunk/impl/src/main/java/org/richfaces/application/CacheProvider.java
root/core/trunk/impl/src/main/java/org/richfaces/application/DefaultModule.java
root/core/trunk/impl/src/main/java/org/richfaces/application/InitializationListener.java
root/core/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java
root/core/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java
root/core/trunk/impl/src/test/java/org/richfaces/resource/AbstractBaseResourceTest.java
root/core/trunk/impl/src/test/java/org/richfaces/resource/ResourceHandlerImplTest.java
Log:
https://jira.jboss.org/browse/RF-8768
Modified: root/core/trunk/api/src/main/java/org/richfaces/application/DependencyInjector.java
===================================================================
--- root/core/trunk/api/src/main/java/org/richfaces/application/DependencyInjector.java 2010-07-12 21:49:59 UTC (rev 17985)
+++ root/core/trunk/api/src/main/java/org/richfaces/application/DependencyInjector.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -1,41 +1,35 @@
-/*
- * $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.application;
-
-/**
- * <p class="changed_added_4_0"></p>
- * @author asmirnov(a)exadel.com
- *
- */
-public interface DependencyInjector {
-
- public <T> T create(Class<T> type);
-
- public <T> T create(Class<T> type,String name);
-
- public void inject(Object value);
-
- public void destroy();
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.application;
+
+import javax.faces.context.FacesContext;
+
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public interface DependencyInjector {
+
+ public void inject(FacesContext context, Object bean);
+
+}
Copied: root/core/trunk/api/src/main/java/org/richfaces/application/ServiceException.java (from rev 17965, root/core/trunk/impl/src/main/java/org/richfaces/jsr330/ServiceException.java)
===================================================================
--- root/core/trunk/api/src/main/java/org/richfaces/application/ServiceException.java (rev 0)
+++ root/core/trunk/api/src/main/java/org/richfaces/application/ServiceException.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -0,0 +1,67 @@
+/*
+ * $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.application;
+
+import javax.faces.FacesException;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@SuppressWarnings("serial")
+public class ServiceException extends FacesException {
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ */
+ public ServiceException() {
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param message
+ */
+ public ServiceException(String message) {
+ super(message);
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param cause
+ */
+ public ServiceException(Throwable cause) {
+ super(cause);
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param message
+ * @param cause
+ */
+ public ServiceException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+}
Property changes on: root/core/trunk/api/src/main/java/org/richfaces/application/ServiceException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/core/trunk/api/src/main/java/org/richfaces/application/ServiceTracker.java
===================================================================
--- root/core/trunk/api/src/main/java/org/richfaces/application/ServiceTracker.java 2010-07-12 21:49:59 UTC (rev 17985)
+++ root/core/trunk/api/src/main/java/org/richfaces/application/ServiceTracker.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -21,7 +21,6 @@
*/
package org.richfaces.application;
-import java.util.Date;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -47,59 +46,33 @@
*/
public final class ServiceTracker {
- private static final class Service {
- final DependencyInjector injector;
- final Date startTime = new Date();
- /**
- * <p class="changed_added_4_0"></p>
- * @param injector
- */
- public Service(DependencyInjector injector) {
- this.injector = injector;
- }
- }
/**
* <p class="changed_added_4_0">
* </p>
*/
- private static final Map<ClassLoader, Service> INSTANCES =
- new ConcurrentHashMap<ClassLoader, Service>();
+ private static final Map<ClassLoader, ServicesFactory> INSTANCES =
+ new ConcurrentHashMap<ClassLoader, ServicesFactory>();
private ServiceTracker() {
}
- public static <T> T getService(Class<T> target,String name) {
- return getInjector().create(target,name);
- }
public static <T> T getService(Class<T> target) {
- return getInjector().create(target);
+ return getServicesFactory().getInstance(target);
}
public static <T> T getService(FacesContext context, Class<T> target) {
- return getInjector().create(target);
+ return getServicesFactory().getInstance(target);
}
- /**
- * <p class="changed_added_4_0">Inject dependencies to the object instance.</p>
- * @param value
- */
- public static void inject(Object value){
- getInjector().inject(value);
- }
- private static DependencyInjector getInjector() {
- Service service = getCurrentService();
- return service.injector;
- }
-
- private static Service getCurrentService() {
+ private static ServicesFactory getServicesFactory() {
if(!INSTANCES.containsKey(getCurrentLoader())){
throw new FacesException("Service Traccker has not been initialized");
}
- Service service = INSTANCES.get(getCurrentLoader());
+ ServicesFactory service = INSTANCES.get(getCurrentLoader());
return service;
}
@@ -113,21 +86,19 @@
/**
* <p class="changed_added_4_0">Set dependency injection service implementation.</p>
- * @param injector
+ * @param factory
*/
- public static void setInjector(DependencyInjector injector) {
- INSTANCES.put(getCurrentLoader(), new Service(injector));
+ public static void setFactory(ServicesFactory factory) {
+ INSTANCES.put(getCurrentLoader(), factory);
}
/**
* <p class="changed_added_4_0">Remove dependency injection service associated with current context.</p>
*/
public static void release() {
- INSTANCES.remove(getCurrentLoader());
+ ServicesFactory servicesFactory = INSTANCES.remove(getCurrentLoader());
+ servicesFactory.release();
}
- public static Date getStartTime(FacesContext context) {
- return getCurrentService().startTime;
- }
}
Copied: root/core/trunk/api/src/main/java/org/richfaces/application/ServicesFactory.java (from rev 17965, root/core/trunk/api/src/main/java/org/richfaces/application/DependencyInjector.java)
===================================================================
--- root/core/trunk/api/src/main/java/org/richfaces/application/ServicesFactory.java (rev 0)
+++ root/core/trunk/api/src/main/java/org/richfaces/application/ServicesFactory.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -0,0 +1,39 @@
+/*
+ * $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.application;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public interface ServicesFactory {
+
+ public <T> T getInstance(Class<T> type) throws ServiceException;
+
+ public <T> void setInstance(Class<T> type, T instance);
+
+ public void release();
+
+}
Modified: root/core/trunk/impl/src/main/java/org/richfaces/application/CacheProvider.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/application/CacheProvider.java 2010-07-12 21:49:59 UTC (rev 17985)
+++ root/core/trunk/impl/src/main/java/org/richfaces/application/CacheProvider.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -23,15 +23,13 @@
package org.richfaces.application;
+import java.util.Date;
import java.util.Map;
import javax.faces.context.FacesContext;
-import javax.inject.Provider;
import org.ajax4jsf.cache.Cache;
import org.ajax4jsf.cache.CacheManager;
-import org.richfaces.jsr330.Binders;
-import org.richfaces.jsr330.Initializable;
import org.richfaces.resource.ResourceHandlerImpl;
/**
@@ -40,27 +38,62 @@
*
*/
-public class CacheProvider implements Provider<Cache>, Initializable {
+public class CacheProvider implements Initializable,Cache {
private Cache instance;
private CacheManager cacheManager;
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param key
+ * @return
+ * @see org.ajax4jsf.cache.Cache#get(java.lang.Object)
+ */
+ public Object get(Object key) {
+ return this.instance.get(key);
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param key
+ * @param value
+ * @param expired
+ * @see org.ajax4jsf.cache.Cache#put(java.lang.Object, java.lang.Object, java.util.Date)
+ */
+ public void put(Object key, Object value, Date expired) {
+ this.instance.put(key, value, expired);
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @see org.ajax4jsf.cache.Cache#start()
+ */
+ public void start() {
+ this.instance.start();
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @see org.ajax4jsf.cache.Cache#stop()
+ */
+ public void stop() {
+ this.instance.stop();
+ }
+
/* (non-Javadoc)
* @see org.richfaces.jsr330.Initializable#destroy()
*/
- public void destroy() {
+ public void release() {
cacheManager.destroy();
}
/* (non-Javadoc)
* @see org.richfaces.jsr330.Initializable#init(org.richfaces.jsr330.Binders)
*/
- public boolean init(Binders injectorImpl) {
+ public void init() {
FacesContext facesContext = FacesContext.getCurrentInstance();
cacheManager = new CacheManager();
Map<?, ?> envMap = facesContext.getExternalContext().getInitParameterMap();
instance = cacheManager.createCache(facesContext, ResourceHandlerImpl.RESOURCE_CACHE_NAME, envMap);
- return true; // Cache is singleton.
}
public Cache get() {
Modified: root/core/trunk/impl/src/main/java/org/richfaces/application/DefaultModule.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/application/DefaultModule.java 2010-07-12 21:49:59 UTC (rev 17985)
+++ root/core/trunk/impl/src/main/java/org/richfaces/application/DefaultModule.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -2,8 +2,6 @@
import org.ajax4jsf.cache.Cache;
import org.ajax4jsf.renderkit.AJAXDataSerializer;
-import org.richfaces.jsr330.Module;
-import org.richfaces.jsr330.InjectorConfig;
import org.richfaces.resource.DefaultResourceCodec;
import org.richfaces.resource.ResourceCodec;
import org.richfaces.skin.SkinFactory;
@@ -11,11 +9,13 @@
public class DefaultModule implements Module {
- public void configure(InjectorConfig injector) {
- injector.register(SkinFactory.class).to(SkinFactoryImpl.class).asSingleton();
- injector.register(AJAXDataSerializer.class).to(AJAXDataSerializer.class).asSingleton();
- injector.register(ResourceCodec.class).toService(DefaultResourceCodec.class).asSingleton();
- injector.register(Cache.class).toProviderInstance(new CacheProvider());
+ public void configure(ServicesFactory factory) {
+ factory.setInstance(SkinFactory.class, new SkinFactoryImpl());
+ factory.setInstance(AJAXDataSerializer.class,new AJAXDataSerializer());
+ factory.setInstance(ResourceCodec.class,ServiceLoader.loadService(ResourceCodec.class, DefaultResourceCodec.class));
+ factory.setInstance(Cache.class,new CacheProvider());
+ factory.setInstance(Uptime.class, new Uptime());
+ factory.setInstance(DependencyInjector.class, new DependencyInjectionServiceImpl());
}
}
Added: root/core/trunk/impl/src/main/java/org/richfaces/application/DependencyInjectionServiceImpl.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/application/DependencyInjectionServiceImpl.java (rev 0)
+++ root/core/trunk/impl/src/main/java/org/richfaces/application/DependencyInjectionServiceImpl.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -0,0 +1,373 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.application;
+
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.text.MessageFormat;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import javax.el.ExpressionFactory;
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+
+import org.richfaces.log.RichfacesLogger;
+import org.richfaces.resource.PostConstructResource;
+import org.richfaces.resource.ResourceParameter;
+import org.richfaces.resource.ResourceParameterELResolver;
+import org.slf4j.Logger;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class DependencyInjectionServiceImpl implements DependencyInjector {
+
+ private static final Logger LOGGER = RichfacesLogger.APPLICATION.getLogger();
+
+ private abstract static class Injector<T extends Annotation> {
+
+ private PropertyDescriptor propertyDescriptor;
+
+ private T dependency;
+
+ public Injector(PropertyDescriptor propertyDescriptor, T dependency) {
+ super();
+ this.propertyDescriptor = propertyDescriptor;
+ this.dependency = dependency;
+ }
+
+ protected T getDependency() {
+ return dependency;
+ }
+
+ protected PropertyDescriptor getPropertyDescriptor() {
+ return propertyDescriptor;
+ }
+
+ protected abstract Object evaluateProperty(FacesContext context, Class<?> propertyType);
+
+ public void inject(FacesContext context, Object bean) throws IllegalArgumentException, IllegalAccessException,
+ InvocationTargetException {
+
+ Method writeMethod = propertyDescriptor.getWriteMethod();
+
+ if (writeMethod != null) {
+ writeMethod.invoke(bean, evaluateProperty(context, propertyDescriptor.getPropertyType()));
+ } else {
+ throw new IllegalStateException(
+ MessageFormat.format("Write method for property {0} doesn't exist", propertyDescriptor.getName()));
+ }
+ }
+
+ }
+
+ private static final class PropertyDependencyInjector extends Injector<ResourceParameter> {
+
+ public PropertyDependencyInjector(PropertyDescriptor propertyDescriptor, ResourceParameter dependency) {
+ super(propertyDescriptor, dependency);
+ }
+
+ private Object getExpressionValue(FacesContext context, String expressionString, Class<?> expectedType) {
+ ExpressionFactory expressionFactory = context.getApplication().getExpressionFactory();
+ ValueExpression expression = expressionFactory.createValueExpression(context.getELContext(),
+ expressionString, expectedType);
+ return expression.getValue(context.getELContext());
+ }
+
+ protected Object evaluateProperty(FacesContext context, Class<?> propertyType) {
+ Class<?> expectedType;
+ if (!propertyType.isPrimitive()) {
+ expectedType = Object.class;
+ } else {
+ expectedType = propertyType;
+ }
+
+ ResourceParameter resourceParameter = getDependency();
+
+ String expression = resourceParameter.expression();
+ String name = resourceParameter.name();
+
+ if (expression.length() != 0 && name.length() != 0) {
+ throw new IllegalStateException(MessageFormat.format(
+ "'name' and 'expression' should not be specified simultaneously: {0}",
+ resourceParameter));
+ }
+
+ Object propertyValue = null;
+ if (expression.length() != 0) {
+ propertyValue = getExpressionValue(context, expression, expectedType);
+ } else {
+ if (name.length() == 0) {
+ name = getPropertyDescriptor().getName();
+ }
+
+ Map<String, Object> parameters = (Map<String, Object>) context.getAttributes().get(
+ ResourceParameterELResolver.CONTEXT_ATTRIBUTE_NAME);
+
+ propertyValue = parameters.get(name);
+ }
+
+ if (propertyValue == null || "".equals(propertyValue)) {
+ String defaultValue = resourceParameter.defaultValue();
+ if (defaultValue != null && defaultValue.length() != 0) {
+ propertyValue = getExpressionValue(context, defaultValue, expectedType);
+ }
+ }
+
+ if (!propertyType.isPrimitive() && propertyValue != null) {
+ propertyValue = context.getApplication().getExpressionFactory().coerceToType(propertyValue, propertyType);
+ }
+
+ return propertyValue;
+ }
+ }
+
+ private static final class IntrospectionData {
+
+ private Method postConstructMethod = null;
+
+ private Map<String, Injector<?>> injectorsMap = null;
+
+ public Map<String, Injector<?>> getInjectorsMap() {
+ if (injectorsMap != null) {
+ return injectorsMap;
+ }
+
+ return Collections.emptyMap();
+ }
+
+ public void addInjector(String propertyName, Injector<?> injector) {
+ if (injectorsMap == null) {
+ injectorsMap = new HashMap<String, Injector<?>>();
+ }
+
+ injectorsMap.put(propertyName, injector);
+ }
+
+ public Method getPostConstructMethod() {
+ return postConstructMethod;
+ }
+
+ public void setPostConstructMethod(Method postConstructMethod) {
+ this.postConstructMethod = postConstructMethod;
+ }
+ }
+
+ private ConcurrentMap<Class<?>, IntrospectionData> classesCache = new ConcurrentHashMap<Class<?>, IntrospectionData>();
+
+ private void invokeMethod(Object bean, Method method) throws IllegalArgumentException, IllegalAccessException,
+ InvocationTargetException {
+
+ if (method != null) {
+ method.setAccessible(true);
+ method.invoke(bean);
+ }
+ }
+
+ private boolean isUncheckedException(Class<?> type) {
+ // JLS 2nd edition - 11.2 Compile-Time Checking of Exceptions
+ return RuntimeException.class.isAssignableFrom(type) || Error.class.isAssignableFrom(type);
+ }
+
+ private void verifyPostConstructMethod(Method method) {
+ if (method.getParameterTypes().length != 0) {
+ throw new IllegalStateException(
+ MessageFormat.format("Post-construction method {0} has one or more parameters", method.toString()));
+ }
+
+ if (!Void.TYPE.equals(method.getReturnType())) {
+ throw new IllegalStateException(
+ MessageFormat.format("Post-construction method {0} has incorrect return type", method.toString()));
+ }
+
+ if ((method.getModifiers() & Modifier.STATIC) != 0) {
+ throw new IllegalStateException(
+ MessageFormat.format("Post-construction method {0} is static", method.toString()));
+ }
+
+ Class<?>[] exceptionTypes = method.getExceptionTypes();
+ for (Class<?> exceptionType : exceptionTypes) {
+ if (isUncheckedException(exceptionType)) {
+ continue;
+ }
+
+ throw new IllegalStateException(
+ MessageFormat.format("Post-construction method {0} throws checked exception", method.toString()));
+ }
+ }
+
+ private void inspectMethod(Method method, Class<? extends Annotation> annotationClass,
+ IntrospectionData introspectionData) {
+
+ Annotation annotation = method.getAnnotation(annotationClass);
+ if (annotation != null) {
+ verifyPostConstructMethod(method);
+
+ if (introspectionData.getPostConstructMethod() != null) {
+ throw new IllegalStateException(
+ MessageFormat.format("There are two conflicting post-construction methods: {0} and {1}",
+ method.toString(), introspectionData.getPostConstructMethod().toString()));
+ }
+
+ introspectionData.setPostConstructMethod(method);
+ }
+ }
+
+ private void locatePostConstructMethods(Class<?> clazz, IntrospectionData introspectionData) {
+ Method[] methods = clazz.getDeclaredMethods();
+ for (Method method : methods) {
+ inspectMethod(method, PostConstructResource.class, introspectionData);
+ }
+
+ Class<?> superclass = clazz.getSuperclass();
+ if (!Object.class.equals(superclass)) {
+ locatePostConstructMethods(superclass, introspectionData);
+ }
+ }
+
+ private void locateManagedPropertyFields(Class<?> clazz, Map<String, ResourceParameter> fieldsMap) {
+ Field[] fields = clazz.getDeclaredFields();
+ for (Field field : fields) {
+ ResourceParameter dependency = field.getAnnotation(ResourceParameter.class);
+
+ if (dependency != null) {
+ String propertyName = field.getName();
+
+ if (!fieldsMap.containsKey(propertyName)) {
+ fieldsMap.put(propertyName, dependency);
+ }
+ }
+ }
+
+ Class<?> superclass = clazz.getSuperclass();
+ if (!Object.class.equals(superclass)) {
+ locateManagedPropertyFields(superclass, fieldsMap);
+ }
+ }
+
+ private <T extends Annotation> T getAnnotation(PropertyDescriptor descriptor, Class<T> annotationClass) {
+ T annotation = null;
+
+ Method writeMethod = descriptor.getWriteMethod();
+ if (writeMethod != null) {
+ annotation = writeMethod.getAnnotation(annotationClass);
+ }
+
+ if (annotation == null) {
+ Method readMethod = descriptor.getReadMethod();
+ if (readMethod != null) {
+ annotation = readMethod.getAnnotation(annotationClass);
+ }
+ }
+
+ return annotation;
+ }
+
+ private void locateManagedPropertyDescriptors(Class<?> clazz, IntrospectionData introspectionData,
+ Map<String, ResourceParameter> injectableFields) {
+
+ try {
+ BeanInfo beanInfo = Introspector.getBeanInfo(clazz);
+ if (beanInfo != null) {
+ PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors();
+ if (descriptors != null) {
+ for (PropertyDescriptor descriptor : descriptors) {
+ String propertyName = descriptor.getName();
+
+ ResourceParameter dependency = injectableFields.get(propertyName);
+
+ if (dependency == null) {
+ dependency = getAnnotation(descriptor, ResourceParameter.class);
+ }
+
+ if (dependency != null) {
+ Injector<?> injector = new PropertyDependencyInjector(descriptor, dependency);
+ introspectionData.addInjector(propertyName, injector);
+ }
+ }
+ }
+ }
+ } catch (IntrospectionException e) {
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(e.getMessage(), e);
+ }
+ } finally {
+ Introspector.flushFromCaches(clazz);
+ }
+ }
+
+ protected IntrospectionData createIntrospectionData(Class<?> beanClass) {
+ IntrospectionData introspectionData = new IntrospectionData();
+
+ Map<String, ResourceParameter> injectableFields = new HashMap<String, ResourceParameter>();
+ locateManagedPropertyFields(beanClass, injectableFields);
+
+ locateManagedPropertyDescriptors(beanClass, introspectionData, injectableFields);
+
+ locatePostConstructMethods(beanClass, introspectionData);
+
+ return introspectionData;
+ }
+
+ public void inject(FacesContext context, Object bean) {
+ Class<?> beanClass = bean.getClass();
+
+ IntrospectionData introspectionData = classesCache.get(beanClass);
+ if (introspectionData == null) {
+ introspectionData = createIntrospectionData(beanClass);
+ classesCache.put(beanClass, introspectionData);
+ }
+
+ try {
+ Map<String, Injector<?>> injectorsMap = introspectionData.getInjectorsMap();
+ if (!injectorsMap.isEmpty()) {
+ for (Injector<?> injector : injectorsMap.values()) {
+ injector.inject(context, bean);
+ }
+ }
+
+ Method postConstructMethod = introspectionData.getPostConstructMethod();
+ if (postConstructMethod != null) {
+ invokeMethod(bean, postConstructMethod);
+ }
+ } catch (IllegalArgumentException e) {
+ throw new FacesException(e.getMessage(), e);
+ } catch (IllegalAccessException e) {
+ throw new FacesException(e.getMessage(), e);
+ } catch (InvocationTargetException e) {
+ throw new FacesException(e.getMessage(), e);
+ }
+ }
+}
Property changes on: root/core/trunk/impl/src/main/java/org/richfaces/application/DependencyInjectionServiceImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: root/core/trunk/impl/src/main/java/org/richfaces/application/Initializable.java (from rev 17965, root/core/trunk/impl/src/main/java/org/richfaces/jsr330/Initializable.java)
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/application/Initializable.java (rev 0)
+++ root/core/trunk/impl/src/main/java/org/richfaces/application/Initializable.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -0,0 +1,15 @@
+package org.richfaces.application;
+
+
+/**
+ * <p class="changed_added_4_0">Classes that require initialization should implement this interface</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public interface Initializable {
+
+ public void init();
+
+ public void release();
+
+}
\ No newline at end of file
Property changes on: root/core/trunk/impl/src/main/java/org/richfaces/application/Initializable.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/core/trunk/impl/src/main/java/org/richfaces/application/InitializationListener.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/application/InitializationListener.java 2010-07-12 21:49:59 UTC (rev 17985)
+++ root/core/trunk/impl/src/main/java/org/richfaces/application/InitializationListener.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -32,11 +32,6 @@
import javax.faces.event.SystemEventListener;
import org.richfaces.VersionBean;
-import org.richfaces.jsr330.DependencyException;
-import org.richfaces.jsr330.InjectorImpl;
-import org.richfaces.jsr330.Module;
-import org.richfaces.jsr330.ServiceException;
-import org.richfaces.jsr330.ServiceLoader;
import org.richfaces.log.RichfacesLogger;
import org.slf4j.Logger;
@@ -56,8 +51,8 @@
}
protected void onStart() {
- DependencyInjector injector = createInjector();
- ServiceTracker.setInjector(injector);
+ ServicesFactory injector = createFactory();
+ ServiceTracker.setFactory(injector);
if (LOGGER.isInfoEnabled()) {
String versionString = VersionBean.VERSION.toString();
@@ -67,17 +62,15 @@
}
}
- protected DependencyInjector createInjector() {
- InjectorImpl injector = new InjectorImpl();
+ protected ServicesFactory createFactory() {
+ ServicesFactoryImpl injector = new ServicesFactoryImpl();
ArrayList<Module> modules = new ArrayList<Module>();
modules.add(new DefaultModule());
try {
modules.addAll(ServiceLoader.loadServices(Module.class));
- injector.init(modules.toArray(new Module[]{}));
+ injector.init(modules);
} catch (ServiceException e) {
throw new FacesException(e);
- } catch (DependencyException e) {
- throw new FacesException(e);
}
return injector;
}
Copied: root/core/trunk/impl/src/main/java/org/richfaces/application/Module.java (from rev 17965, root/core/trunk/impl/src/main/java/org/richfaces/jsr330/Module.java)
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/application/Module.java (rev 0)
+++ root/core/trunk/impl/src/main/java/org/richfaces/application/Module.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -0,0 +1,13 @@
+package org.richfaces.application;
+
+
+/**
+ * <p class="changed_added_4_0">User-provided configuration module.</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public interface Module {
+
+ public void configure(ServicesFactory factory);
+
+}
Copied: root/core/trunk/impl/src/main/java/org/richfaces/application/ServiceLoader.java (from rev 17965, root/core/trunk/impl/src/main/java/org/richfaces/jsr330/ServiceLoader.java)
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/application/ServiceLoader.java (rev 0)
+++ root/core/trunk/impl/src/main/java/org/richfaces/application/ServiceLoader.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -0,0 +1,211 @@
+/*
+ * $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.application;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import com.google.common.collect.Iterables;
+
+/**
+ * <p class="changed_added_4_0">
+ * This class loads services from files placed to the META-INF/services in classpath.
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public final class ServiceLoader {
+
+ private static final String META_INF_SERVICES = "META-INF/services/";
+ private static final Pattern LEGAL_JAVA_NAME = Pattern.compile("^(([A-Za-z0-9_])+\\.)+[A-Z]([A-Za-z0-9_]*)$");
+
+ private ServiceLoader() {
+
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * Load and instantiate all service implementations.
+ * </p>
+ *
+ * @param <S>
+ * @param serviceClass
+ * @return
+ * @throws ServiceException
+ */
+ public static <S> Collection<S> loadServices(Class<S> serviceClass) throws ServiceException {
+ Collection<Class<? extends S>> serviceClasses = loadServiceClasses(serviceClass);
+ List<S> instances = new ArrayList<S>();
+ for (Class<? extends S> implementationClass : serviceClasses) {
+ instances.add(createInstance(implementationClass));
+ }
+ return instances;
+ }
+
+ public static <S> S loadService(Class<S> serviceClass, Class<? extends S> defaultImplementation) {
+ Collection<Class<? extends S>> serviceClasses = loadServiceClasses(serviceClass);
+ try {
+ return createInstance(Iterables.getLast(serviceClasses));
+ } catch (NoSuchElementException e) {
+ return createInstance(defaultImplementation);
+ }
+ }
+
+ private static <S> S createInstance(Class<? extends S> implementationClass) {
+ try {
+ return implementationClass.newInstance();
+ } catch (InstantiationException e) {
+ throw new ServiceException("Cannot instantiate service class, does it have default constructor ?", e);
+ } catch (IllegalAccessException e) {
+ throw new ServiceException("Cannot instantiate service class, illegal access", e);
+ }
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * Load service implementation classes.
+ * </p>
+ *
+ * @param <S>
+ * @param serviceClass
+ * @return
+ * @throws ServiceException
+ */
+ public static <S> Collection<Class<? extends S>> loadServiceClasses(Class<S> serviceClass) throws ServiceException {
+ ClassLoader classLoader = getClassLoader(serviceClass);
+ Set<String> names = new LinkedHashSet<String>();
+ Enumeration<URL> resources;
+ try {
+ resources = classLoader.getResources(META_INF_SERVICES + serviceClass.getName());
+ while (resources.hasMoreElements()) {
+ names.addAll(parse(resources.nextElement()));
+ }
+ } catch (IOException e) {
+ throw new ServiceException("Error load service descriptions", e);
+ }
+ Set<Class<? extends S>> instanceClasses = new LinkedHashSet<Class<? extends S>>();
+ for (String className : names) {
+ instanceClasses.add(loadClass(serviceClass, classLoader, className));
+ }
+ return instanceClasses;
+
+ }
+
+ static Collection<String> parse(URL url) throws ServiceException, IOException {
+ InputStream inputStream = null;
+ try {
+ URLConnection connection = url.openConnection();
+ try {
+ connection.setUseCaches(false);
+ } catch (IllegalArgumentException e) {
+ // Do nothing.
+ }
+ Set<String> names = new HashSet<String>();
+ inputStream = connection.getInputStream();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "utf-8"));
+ String line;
+ while (null != (line = reader.readLine())) {
+ parseLine(line, names);
+ }
+ return names;
+ } finally {
+ if (null != inputStream) {
+ inputStream.close();
+ }
+ }
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * Parse a single line from service description. Skips empty lines and comments started with #
+ * </p>
+ *
+ * @param line
+ * @param names
+ * @throws ServiceException
+ */
+ static void parseLine(String line, Collection<String> names) throws ServiceException {
+ String name;
+ int commentIndex = line.indexOf('#');
+ if (commentIndex >= 0) {
+ name = line.substring(0, commentIndex);
+ } else {
+ name = line;
+ }
+ name = name.trim();
+ if (name.length() > 0) {
+ if (LEGAL_JAVA_NAME.matcher(name).matches()) {
+ names.add(name);
+ } else {
+ throw new ServiceException("Invalid java class name [" + line + "]");
+ }
+ }
+ }
+
+ /**
+ * <p class="changed_added_4_0">
+ * Get class loader
+ * </p>
+ *
+ * @param <S>
+ * @param serviceClass
+ * @return context class loader or loader with which service class has been loaded.
+ */
+ private static <S> ClassLoader getClassLoader(Class<S> serviceClass) {
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ if (null == classLoader) {
+ classLoader = serviceClass.getClassLoader();
+ }
+ return classLoader;
+ }
+
+ private static <S> Class<? extends S> loadClass(Class<S> serviceClass, ClassLoader classLoader, String className)
+ throws ServiceException {
+ try {
+ Class<?> implementationClass = classLoader.loadClass(className);
+ if (serviceClass.isAssignableFrom(implementationClass)) {
+ return implementationClass.asSubclass(serviceClass);
+ } else {
+ throw new ServiceException("Class " + className + " in not the instance of " + serviceClass.getName());
+ }
+ } catch (ClassNotFoundException e) {
+ throw new ServiceException("Class " + className + " not found", e);
+ }
+ }
+
+}
Property changes on: root/core/trunk/impl/src/main/java/org/richfaces/application/ServiceLoader.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/core/trunk/impl/src/main/java/org/richfaces/application/ServicesFactoryImpl.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/application/ServicesFactoryImpl.java (rev 0)
+++ root/core/trunk/impl/src/main/java/org/richfaces/application/ServicesFactoryImpl.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -0,0 +1,45 @@
+package org.richfaces.application;
+
+import java.util.List;
+
+import com.google.common.collect.ClassToInstanceMap;
+import com.google.common.collect.ImmutableClassToInstanceMap;
+import com.google.common.collect.MutableClassToInstanceMap;
+
+public class ServicesFactoryImpl implements ServicesFactory {
+
+ private ClassToInstanceMap<Object> instances;
+
+ public <T> T getInstance(Class<T> type) throws ServiceException {
+ return instances.getInstance(type);
+ }
+
+ public void release() {
+ for (Object service : instances.values()) {
+ if (service instanceof Initializable) {
+ Initializable initializableService = (Initializable) service;
+ initializableService.release();
+ }
+ }
+ instances = null;
+ }
+
+ public void init(Iterable<Module> modules) {
+ instances = MutableClassToInstanceMap.create();
+ for (Module module : modules) {
+ module.configure(this);
+ }
+ for (Object service : instances.values()) {
+ if (service instanceof Initializable) {
+ Initializable initializableService = (Initializable) service;
+ initializableService.init();
+ }
+ }
+ instances = ImmutableClassToInstanceMap.copyOf(instances);
+ }
+
+ public <T> void setInstance(Class<T> type, T instance) {
+ instances.putInstance(type, instance);
+ }
+
+}
Property changes on: root/core/trunk/impl/src/main/java/org/richfaces/application/ServicesFactoryImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: root/core/trunk/impl/src/main/java/org/richfaces/application/Uptime.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/application/Uptime.java (rev 0)
+++ root/core/trunk/impl/src/main/java/org/richfaces/application/Uptime.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -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.application;
+
+import java.util.Date;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class Uptime {
+
+ private Date startTime;
+
+ public Uptime() {
+ startTime = new Date();
+ }
+
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the startTime
+ */
+ public Date getStartTime() {
+ return this.startTime;
+ }
+
+}
Property changes on: root/core/trunk/impl/src/main/java/org/richfaces/application/Uptime.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: root/core/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java 2010-07-12 21:49:59 UTC (rev 17985)
+++ root/core/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -38,6 +38,7 @@
import javax.faces.context.FacesContext;
import org.richfaces.application.ServiceTracker;
+import org.richfaces.application.Uptime;
import org.richfaces.log.RichfacesLogger;
import org.richfaces.util.Util;
import org.slf4j.Logger;
@@ -74,7 +75,7 @@
// TODO - originally lastModified was set during resource creation.
// as resources can be managed beans this approach does not seem good
if (lastModified == null) {
- lastModified = ServiceTracker.getStartTime(context);
+ lastModified = ServiceTracker.getService(Uptime.class).getStartTime();
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(
Modified: root/core/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java 2010-07-12 21:49:59 UTC (rev 17985)
+++ root/core/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -42,6 +42,7 @@
import javax.servlet.http.HttpServletResponse;
import org.ajax4jsf.cache.Cache;
+import org.richfaces.application.DependencyInjector;
import org.richfaces.application.ServiceTracker;
import org.richfaces.log.RichfacesLogger;
import org.richfaces.util.RequestStateManager.BooleanRequestStateVariable;
@@ -362,7 +363,7 @@
Map<Object, Object> attributes = facesContext.getAttributes();
try {
attributes.put(ResourceParameterELResolver.CONTEXT_ATTRIBUTE_NAME, parameters);
- ServiceTracker.inject(resource);
+ ServiceTracker.getService(DependencyInjector.class).inject(facesContext,resource);
} finally {
attributes.remove(ResourceParameterELResolver.CONTEXT_ATTRIBUTE_NAME);
}
Modified: root/core/trunk/impl/src/test/java/org/richfaces/resource/AbstractBaseResourceTest.java
===================================================================
--- root/core/trunk/impl/src/test/java/org/richfaces/resource/AbstractBaseResourceTest.java 2010-07-12 21:49:59 UTC (rev 17985)
+++ root/core/trunk/impl/src/test/java/org/richfaces/resource/AbstractBaseResourceTest.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -40,10 +40,11 @@
import org.easymock.EasyMock;
import org.jboss.test.faces.AbstractFacesTest;
+import org.richfaces.application.Module;
import org.richfaces.application.ServiceTracker;
-import org.richfaces.jsr330.InjectorConfig;
-import org.richfaces.jsr330.InjectorImpl;
-import org.richfaces.jsr330.Module;
+import org.richfaces.application.ServicesFactory;
+import org.richfaces.application.ServicesFactoryImpl;
+import org.richfaces.application.Uptime;
import org.richfaces.util.Util;
/**
@@ -145,15 +146,16 @@
EasyMock.eq("org.richfaces.resource.MockResource"),
EasyMock.eq(null), EasyMock.eq("4_0_alpha"))).andReturn("/rfRes/Resource2/4_0_alpha");
EasyMock.replay(resourceCodec);
- InjectorImpl injector = new InjectorImpl();
- injector.init(new Module(){
+ ServicesFactoryImpl injector = new ServicesFactoryImpl();
+ injector.init(Collections.<Module>singletonList(new Module(){
- public void configure(InjectorConfig injector) {
- injector.register(ResourceCodec.class).toInstance(resourceCodec);
+ public void configure(ServicesFactory injector) {
+ injector.setInstance(ResourceCodec.class,resourceCodec);
+ injector.setInstance(Uptime.class, new Uptime());
}
- });
- ServiceTracker.setInjector(injector);
+ }));
+ ServiceTracker.setFactory(injector);
MockStateAwareResourceImpl stateAwareResourceImpl = new MockStateAwareResourceImpl();
stateAwareResourceImpl.setLibraryName("custom.library");
Modified: root/core/trunk/impl/src/test/java/org/richfaces/resource/ResourceHandlerImplTest.java
===================================================================
--- root/core/trunk/impl/src/test/java/org/richfaces/resource/ResourceHandlerImplTest.java 2010-07-12 21:49:59 UTC (rev 17985)
+++ root/core/trunk/impl/src/test/java/org/richfaces/resource/ResourceHandlerImplTest.java 2010-07-12 23:29:51 UTC (rev 17986)
@@ -29,6 +29,7 @@
import java.net.URL;
import java.util.ArrayList;
import java.util.Calendar;
+import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;
@@ -40,10 +41,11 @@
import org.easymock.classextension.EasyMock;
import org.jboss.test.faces.AbstractFacesTest;
import org.jboss.test.faces.htmlunit.LocalWebClient;
+import org.richfaces.application.Module;
import org.richfaces.application.ServiceTracker;
-import org.richfaces.jsr330.Module;
-import org.richfaces.jsr330.InjectorConfig;
-import org.richfaces.jsr330.InjectorImpl;
+import org.richfaces.application.ServicesFactory;
+import org.richfaces.application.ServicesFactoryImpl;
+import org.richfaces.application.Uptime;
import org.richfaces.util.Util;
import com.gargoylesoftware.htmlunit.Cache;
@@ -234,16 +236,18 @@
EasyMock.expect(mockedCodec.getResourceKey(EasyMock.<FacesContext>notNull(),
EasyMock.eq("StateHolderResource"))).andReturn("StateHolderResource.jsf?db=1");
EasyMock.replay(mockedCodec,mockCache);
- InjectorImpl injector = new InjectorImpl();
- injector.init(new Module(){
- public void configure(InjectorConfig injector) {
- injector.register(ResourceCodec.class).toInstance(mockedCodec);
- injector.register(org.ajax4jsf.cache.Cache.class).toInstance(mockCache);
+ ServicesFactoryImpl injector = new ServicesFactoryImpl();
+ injector.init(Collections.<Module>singletonList(new Module(){
+
+ public void configure(ServicesFactory injector) {
+ injector.setInstance(ResourceCodec.class,mockedCodec);
+ injector.setInstance(org.ajax4jsf.cache.Cache.class,mockCache);
+ injector.setInstance(Uptime.class, new Uptime());
}
- });
- ServiceTracker.setInjector(injector);
+ }));
+ ServiceTracker.setFactory(injector);
WebRequestSettings settings =
new WebRequestSettings(new URL("http://localhost/rfRes/StateHolderResource.jsf?db=1"));
14 years, 6 months
JBoss Rich Faces SVN: r17985 - in root/cdk/trunk/plugins: generator/src/main/java/org/richfaces/cdk/model/validator and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-07-12 17:49:59 -0400 (Mon, 12 Jul 2010)
New Revision: 17985
Added:
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/renderkit/RendererUtils.java
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacetBean.java
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/pom.xml
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/MethodMetadata.java
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java
Log:
Resolved - issue RF-8889: CDK: @Facet leads to incorrect faces-config.xml
https://jira.jboss.org/secure/browse/RF-8889
Resolved https://jira.jboss.org/browse/RF-8907
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java 2010-07-12 19:18:30 UTC (rev 17984)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java 2010-07-12 21:49:59 UTC (rev 17985)
@@ -1,6 +1,7 @@
package org.richfaces.cdk.apt.processors;
import java.util.Collection;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -161,9 +162,6 @@
}
private List<ClassName> getSignature(Signature signature, AnnotationValue signatureMirror) {
- if (signature == null) {
- return null;
- }
String returnType;
try {
@@ -173,14 +171,14 @@
returnType = returnTypeMirror.toString();
}
- if (signature != null && SIGNATURE_NONE_CLASS_NAME.equals(returnType)) {
+ if (signature != null && !SIGNATURE_NONE_CLASS_NAME.equals(returnType)) {
return getSignatureParams(signature, signatureMirror);
// signature parameters always should be replaced.
// TODO - set method return type.
}
- return null;
+ return Collections.emptyList();
}
private List<ClassName> getSignatureParams(Signature signature, AnnotationValue signatureMirror) {
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java 2010-07-12 19:18:30 UTC (rev 17984)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java 2010-07-12 21:49:59 UTC (rev 17985)
@@ -384,6 +384,9 @@
} else if ("javax.el.MethodExpression".equals(attribute.getType().getName())) {
attribute.setBindingAttribute(true);
}
+ if(attribute.isBindingAttribute() && attribute.getSignature().isEmpty()){
+ log.error("Signature for method expression attribute "+attribute.getName()+" has not been set");
+ }
// Check "generate" flag.
if (generatedComponent) {
// TODO Attribute should be only generated if it does not exist or abstract in the base class.
Modified: 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 2010-07-12 19:18:30 UTC (rev 17984)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/FacetBean.java 2010-07-12 21:49:59 UTC (rev 17985)
@@ -24,6 +24,8 @@
package org.richfaces.cdk.xmlconfig.model;
import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.ConfigExtension;
@@ -33,6 +35,9 @@
*
* @author asmirnov(a)exadel.com
*/
+@XmlType(name = "faces-config-facetType", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE,
+ propOrder = {"name", "extension"})
+(a)XmlJavaTypeAdapter(FacetAdapter.class)
public class FacetBean extends ExtensibleBean<FacetBean.FacetExtension> {
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 2010-07-12 19:18:30 UTC (rev 17984)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/pom.xml 2010-07-12 21:49:59 UTC (rev 17985)
@@ -22,7 +22,7 @@
<inherited>false</inherited>
<configuration>
<options>
- <rendererUtils>#built-in</rendererUtils>
+ <rendererUtils>org.richfaces.cdk.test.renderkit.RendererUtils</rendererUtils>
</options>
</configuration>
</execution>
Modified: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/MethodMetadata.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/MethodMetadata.java 2010-07-12 19:18:30 UTC (rev 17984)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/MethodMetadata.java 2010-07-12 21:49:59 UTC (rev 17985)
@@ -1,12 +1,33 @@
package org.richfaces;
+import javax.el.MethodExpression;
+import javax.faces.el.MethodBinding;
import javax.faces.view.facelets.FaceletContext;
import javax.faces.view.facelets.Metadata;
+import javax.faces.view.facelets.TagAttribute;
public class MethodMetadata extends Metadata {
+ public MethodMetadata(TagAttribute attribute, Class<String> class1, Class<Integer> class2) {
+ // TODO Auto-generated constructor stub
+ }
+
+ public MethodMetadata(TagAttribute attribute, Class<String> class1) {
+ // TODO Auto-generated constructor stub
+ }
+
@Override
public void applyMetadata(FaceletContext ctx, Object instance) {
}
+ protected MethodBinding getMethodBinding(FaceletContext ctx) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ protected MethodExpression getMethodExpression(FaceletContext ctx) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
Modified: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java 2010-07-12 19:18:30 UTC (rev 17984)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java 2010-07-12 21:49:59 UTC (rev 17985)
@@ -25,8 +25,12 @@
import java.util.List;
+import javax.el.MethodExpression;
+import javax.el.ValueExpression;
import javax.faces.component.UIComponentBase;
import javax.faces.component.ValueHolder;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.ValueBinding;
import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.Description;
@@ -34,6 +38,7 @@
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.cdk.annotations.RendererSpecificComponent;
+import org.richfaces.cdk.annotations.Signature;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.cdk.test.event.TestEvent;
@@ -49,7 +54,7 @@
family="org.richfaces.Test",
description=@Description(displayName="Test Component",largeIcon="large.gif",smallIcon="spall.png"),
generate="org.richfaces.cdk.test.component.UITestComponent",
- facets=@Facet(name="caption"),
+ facets=@Facet(name="caption",generate=true,description=@Description("Caption Facet")),
fires=TestEvent.class,
interfaces=ValueHolder.class,
components={
@@ -84,4 +89,16 @@
*/
@Attribute
public abstract void setBarValue(List<Object> bar);
+
+ @Attribute(signature = @Signature(parameters = String.class, returnType = Boolean.class))
+ public abstract MethodExpression getMethodExpressionListener();
+
+ @Attribute(signature = @Signature(parameters = {String.class,Integer.class}, returnType = int.class))
+ public abstract MethodBinding getMethodBindingListener();
+
+ @Attribute(required=true)
+ public abstract ValueExpression getValueExpressionProperty();
+
+ @Attribute(required=true)
+ public abstract ValueBinding getValueBindingProperty();
}
Added: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/renderkit/RendererUtils.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/renderkit/RendererUtils.java (rev 0)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/renderkit/RendererUtils.java 2010-07-12 21:49:59 UTC (rev 17985)
@@ -0,0 +1,39 @@
+package org.richfaces.cdk.test.renderkit;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+public class RendererUtils {
+
+ public static boolean shouldRenderAttribute(Object value) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public static void renderPassThroughAttributes(FacesContext facesContext, UIComponent component,
+ Attributes passThroughAttributes0) throws IOException {
+ // TODO Auto-generated method stub
+
+ }
+ public static Attributes attributes() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+ public class Attributes {
+
+ public Attributes generic(String string, String string2,String ...events) {
+ return this;
+ }
+
+ public Attributes bool(String string, String string2) {
+ // 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/renderkit/RendererUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 6 months
JBoss Rich Faces SVN: r17984 - in root: core/trunk/api and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-07-12 15:18:30 -0400 (Mon, 12 Jul 2010)
New Revision: 17984
Modified:
root/commons/trunk/api/checkstyle-suppressions.xml
root/core/trunk/api/checkstyle-suppressions.xml
root/core/trunk/impl/checkstyle-suppressions.xml
Log:
Merged checkstyle-suppressions.xml information required by panel module into the other locations
Modified: root/commons/trunk/api/checkstyle-suppressions.xml
===================================================================
--- root/commons/trunk/api/checkstyle-suppressions.xml 2010-07-12 18:52:04 UTC (rev 17983)
+++ root/commons/trunk/api/checkstyle-suppressions.xml 2010-07-12 19:18:30 UTC (rev 17984)
@@ -25,4 +25,8 @@
and must be removed from here -->
<suppress checks="IllegalCatch" files="AbstractThreadedTest.java" />
<suppress checks="IllegalCatch" files="StagingServer.java" />
+
+ <!-- TODO it is hot fix for building process, this files belong to the ui/output/trunk/panela/ui module,
+ and must be removed from here -->
+ <suppress checks="IllegalCatch" files="AbstractTogglePanel.java" />
</suppressions>
Modified: root/core/trunk/api/checkstyle-suppressions.xml
===================================================================
--- root/core/trunk/api/checkstyle-suppressions.xml 2010-07-12 18:52:04 UTC (rev 17983)
+++ root/core/trunk/api/checkstyle-suppressions.xml 2010-07-12 19:18:30 UTC (rev 17984)
@@ -25,4 +25,8 @@
and must be removed from here -->
<suppress checks="IllegalCatch" files="AbstractThreadedTest.java" />
<suppress checks="IllegalCatch" files="StagingServer.java" />
+
+ <!-- TODO it is hot fix for building process, this files belong to the ui/output/trunk/panela/ui module,
+ and must be removed from here -->
+ <suppress checks="IllegalCatch" files="AbstractTogglePanel.java" />
</suppressions>
Modified: root/core/trunk/impl/checkstyle-suppressions.xml
===================================================================
--- root/core/trunk/impl/checkstyle-suppressions.xml 2010-07-12 18:52:04 UTC (rev 17983)
+++ root/core/trunk/impl/checkstyle-suppressions.xml 2010-07-12 19:18:30 UTC (rev 17984)
@@ -25,4 +25,8 @@
and must be removed from here -->
<suppress checks="IllegalCatch" files="AbstractThreadedTest.java" />
<suppress checks="IllegalCatch" files="StagingServer.java" />
+
+ <!-- TODO it is hot fix for building process, this files belong to the ui/output/trunk/panela/ui module,
+ and must be removed from here -->
+ <suppress checks="IllegalCatch" files="AbstractTogglePanel.java" />
</suppressions>
14 years, 6 months