Author: nbelaevski
Date: 2011-04-01 11:12:51 -0400 (Fri, 01 Apr 2011)
New Revision: 22353
Removed:
trunk/core/api/src/main/java/org/ajax4jsf/resource/ResourceComponent.java
trunk/core/api/src/main/java/org/ajax4jsf/resource/package-info.java
Modified:
trunk/core/api/src/main/java/org/richfaces/resource/PostConstructResource.java
trunk/core/impl/src/main/java/org/richfaces/cache/EhCacheCache.java
trunk/core/impl/src/main/java/org/richfaces/cache/JBossCacheCache.java
trunk/core/impl/src/main/java/org/richfaces/renderkit/html/ResourceLibraryRenderer.java
trunk/core/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java
Log:
Minor cleanup in core
Deleted: trunk/core/api/src/main/java/org/ajax4jsf/resource/ResourceComponent.java
===================================================================
--- trunk/core/api/src/main/java/org/ajax4jsf/resource/ResourceComponent.java 2011-04-01
14:54:25 UTC (rev 22352)
+++ trunk/core/api/src/main/java/org/ajax4jsf/resource/ResourceComponent.java 2011-04-01
15:12:51 UTC (rev 22353)
@@ -1,132 +0,0 @@
-/**
- * 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.ajax4jsf.resource;
-
-import java.util.Date;
-
-import javax.el.MethodExpression;
-
-/**
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:13 $
- *
- */
-public interface ResourceComponent {
-
- /**
- * Get Mime-type for target .
- * @return
- */
- public abstract String getMimeType();
-
- /**
- * Set Mime-type for target .
- * @param newvalue
- */
- public abstract void setMimeType(String newvalue);
-
- /**
- * Get Last modified date for target .
- * @return
- */
- @Deprecated
- public abstract Date getLastModified();
-
- /**
- * Set Last modified for target .
- * @param newvalue
- */
- @Deprecated
- public abstract void setLastModified(Date newvalue);
-
- /**
- * Get Expiration time for target .
- * @return
- */
- @Deprecated
- public abstract Date getExpires();
-
- /**
- * Set Expiration time for target .
- * @param newvalue
- */
- @Deprecated
- public abstract void setExpires(Date newvalue);
-
- /**
- * Get caching flag for resource.
- * @return
- */
- public abstract boolean isCacheable();
-
- /**
- * Set caching flag for resource.
- * @param newvalue
- */
- public abstract void setCacheable(boolean newvalue);
-
- /**
- * Get session-avare flag for resource.
- * @return true if resource depend of client session. If false, no JSESSIONID encoded
in URI
- */
- @Deprecated
- public abstract boolean isSession();
-
- /**
- * Set session-avare flag for resource.
- * @param newvalue
- */
- @Deprecated
- public abstract void setSession(boolean newvalue);
-
- /**
- * Get Data object, encoded in uri and passed to "send" method for generate
resource content.
- * @return
- */
- public abstract Object getValue();
-
- /**
- * Set Data object, encoded in uri and passed to "send" method for generate
resource content.
- * @param newvalue
- */
- public abstract void setValue(Object newvalue);
-
- /**
- * Get MethodExpression to method in user bean to send resource. Method will
- * called with two parameters - restored data object and servlet output
- * stream.
- *
- * @return MethodExpression
- */
- public abstract MethodExpression getCreateContent();
-
- /**
- * Set MethodExpression to method in user bean to send resource. Method will
- * called with two parameters - restored data object and servlet output
- * stream.
- *
- * @param newvalue - new MethodExpression value
- */
- public abstract void setCreateContent(MethodExpression newvalue);
-}
Deleted: trunk/core/api/src/main/java/org/ajax4jsf/resource/package-info.java
===================================================================
--- trunk/core/api/src/main/java/org/ajax4jsf/resource/package-info.java 2011-04-01
14:54:25 UTC (rev 22352)
+++ trunk/core/api/src/main/java/org/ajax4jsf/resource/package-info.java 2011-04-01
15:12:51 UTC (rev 22353)
@@ -1,5 +0,0 @@
-
-/**
- * Resources-handling functionality
- */
-package org.ajax4jsf.resource;
Modified: trunk/core/api/src/main/java/org/richfaces/resource/PostConstructResource.java
===================================================================
---
trunk/core/api/src/main/java/org/richfaces/resource/PostConstructResource.java 2011-04-01
14:54:25 UTC (rev 22352)
+++
trunk/core/api/src/main/java/org/richfaces/resource/PostConstructResource.java 2011-04-01
15:12:51 UTC (rev 22353)
@@ -31,7 +31,7 @@
*
*/
@Retention(RetentionPolicy.RUNTIME)
-(a)Target({ElementType.METHOD, ElementType.FIELD})
+(a)Target({ElementType.METHOD})
public @interface PostConstructResource {
}
Modified: trunk/core/impl/src/main/java/org/richfaces/cache/EhCacheCache.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/cache/EhCacheCache.java 2011-04-01
14:54:25 UTC (rev 22352)
+++ trunk/core/impl/src/main/java/org/richfaces/cache/EhCacheCache.java 2011-04-01
15:12:51 UTC (rev 22353)
@@ -12,7 +12,7 @@
* @author Nick Belaevski
* @since 4.0
*/
-public class EhCacheCache implements org.richfaces.cache.Cache {
+public class EhCacheCache implements Cache {
private net.sf.ehcache.Ehcache cache;
private boolean preconfiguredCache;
Modified: trunk/core/impl/src/main/java/org/richfaces/cache/JBossCacheCache.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/cache/JBossCacheCache.java 2011-04-01
14:54:25 UTC (rev 22352)
+++ trunk/core/impl/src/main/java/org/richfaces/cache/JBossCacheCache.java 2011-04-01
15:12:51 UTC (rev 22353)
@@ -14,7 +14,6 @@
import javax.transaction.SystemException;
import javax.transaction.Transaction;
-import org.jboss.cache.Cache;
import org.jboss.cache.Fqn;
import org.jboss.cache.eviction.ExpirationAlgorithmConfig;
import org.richfaces.log.Logger;
@@ -24,14 +23,14 @@
* @author Nick Belaevski
* @since 4.0
*/
-public class JBossCacheCache implements org.richfaces.cache.Cache {
+public class JBossCacheCache implements Cache {
private static final Logger LOGGER = RichfacesLogger.CACHE.getLogger();
private static final String RESOURCE = "resource";
- private Cache<String, Object> cache;
+ private org.jboss.cache.Cache<String, Object> cache;
- public JBossCacheCache(Cache<String, Object> cache) {
+ public JBossCacheCache(org.jboss.cache.Cache<String, Object> cache) {
super();
this.cache = cache;
}
Modified:
trunk/core/impl/src/main/java/org/richfaces/renderkit/html/ResourceLibraryRenderer.java
===================================================================
---
trunk/core/impl/src/main/java/org/richfaces/renderkit/html/ResourceLibraryRenderer.java 2011-04-01
14:54:25 UTC (rev 22352)
+++
trunk/core/impl/src/main/java/org/richfaces/renderkit/html/ResourceLibraryRenderer.java 2011-04-01
15:12:51 UTC (rev 22353)
@@ -52,19 +52,6 @@
public ResourceLibraryRenderer() {
super();
}
-
- private void setupResourceAttributes(UIComponent component, ResourceKey resourceKey)
{
- Map<String, Object> attributes = component.getAttributes();
-
- attributes.put("name", resourceKey.getResourceName());
-
- String libraryName = resourceKey.getLibraryName();
- if (libraryName != null) {
- attributes.put("library", libraryName);
- } else {
- attributes.remove("library");
- }
- }
@Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException
{
Modified: trunk/core/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java 2011-04-01
14:54:25 UTC (rev 22352)
+++ trunk/core/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java 2011-04-01
15:12:51 UTC (rev 22353)
@@ -70,6 +70,7 @@
if (mainSkin != null || baseSkin != null) {
skin = new CompositeSkinImpl(mainSkin, baseSkin);
} else {
+ //CompositeSkinImpl caches hash code
skin = new CompositeSkinImpl(getDefaultSkin(context));
}
@@ -87,6 +88,7 @@
if (baseSkin != null) {
skin = new CompositeSkinImpl(baseSkin);
} else {
+ //CompositeSkinImpl caches hash code
skin = new CompositeSkinImpl(getDefaultSkin(context));
}
Show replies by date