Author: nbelaevski
Date: 2009-07-09 14:18:20 -0400 (Thu, 09 Jul 2009)
New Revision: 14870
Added:
framework/trunk/api/src/main/java/org/ajax4jsf/cache/Cache.java
framework/trunk/api/src/main/java/org/ajax4jsf/cache/CacheFactory.java
framework/trunk/api/src/main/java/org/richfaces/resource/
framework/trunk/api/src/main/java/org/richfaces/resource/VersionedResource.java
Modified:
framework/trunk/api/
Log:
Resources:
- new caches added
- resources versioning added
Property changes on: framework/trunk/api
___________________________________________________________________
Name: svn:ignore
- .project
.checkstyle
target
.metadata
.settings
+ .project
.checkstyle
target
.metadata
.settings
.classpath
Added: framework/trunk/api/src/main/java/org/ajax4jsf/cache/Cache.java
===================================================================
--- framework/trunk/api/src/main/java/org/ajax4jsf/cache/Cache.java
(rev 0)
+++ framework/trunk/api/src/main/java/org/ajax4jsf/cache/Cache.java 2009-07-09 18:18:20
UTC (rev 14870)
@@ -0,0 +1,34 @@
+/**
+ * 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.cache;
+
+
+public interface Cache {
+
+ public Object get(Object key);
+
+ public void put(Object key, Object value, long expired);
+
+ public void start();
+
+ public void stop();
+}
Added: framework/trunk/api/src/main/java/org/ajax4jsf/cache/CacheFactory.java
===================================================================
--- framework/trunk/api/src/main/java/org/ajax4jsf/cache/CacheFactory.java
(rev 0)
+++ framework/trunk/api/src/main/java/org/ajax4jsf/cache/CacheFactory.java 2009-07-09
18:18:20 UTC (rev 14870)
@@ -0,0 +1,43 @@
+/**
+ * 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.cache;
+
+import java.util.Map;
+
+/**
+ * CacheFactory is a service provider specific interface.
+ * Service provider should implement CacheFactory to provide
+ * the functionality to create a new implementation specific Cache object.
+ */
+public interface CacheFactory
+{
+ /**
+ * creates a new implementation specific Cache object using the env parameters.
+ * @param env implementation specific environment parameters passed to the
+ * CacheFactory.
+ * @param cacheLoader implementation of the {@link CacheLoader} to use
+ * @param cacheConfigurationloader TODO
+ * @return an implementation specific Cache object.
+ * @throws CacheException if any error occurs.
+ */
+ public Cache createCache(Map<?, ?> env);
+}
Added: framework/trunk/api/src/main/java/org/richfaces/resource/VersionedResource.java
===================================================================
--- framework/trunk/api/src/main/java/org/richfaces/resource/VersionedResource.java
(rev 0)
+++
framework/trunk/api/src/main/java/org/richfaces/resource/VersionedResource.java 2009-07-09
18:18:20 UTC (rev 14870)
@@ -0,0 +1,32 @@
+/**
+ * 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.resource;
+
+/**
+ * @author Nick Belaevski
+ * @since 4.0
+ */
+public interface VersionedResource {
+
+ public String getVersion();
+
+}
Show replies by date