Permalink
Browse files

Migrate org.omnifaces.component.output.cache to org.omnifaces.util.cache

  • Loading branch information...
BalusC committed Apr 16, 2017
1 parent 8b3899b commit e2a3f2579186f1e3b6f650b99d785a50d15ffed2
@@ -29,10 +29,10 @@
import org.omnifaces.cdi.eager.EagerBeansWebListener;
import org.omnifaces.cdi.push.Socket;
import org.omnifaces.component.output.Cache;
import org.omnifaces.component.output.cache.CacheInitializer;
import org.omnifaces.eventlistener.DefaultServletContextListener;
import org.omnifaces.facesviews.FacesViews;
import org.omnifaces.resourcehandler.GraphicResource;
import org.omnifaces.util.cache.CacheInitializer;
/**
* <p>
@@ -38,14 +38,6 @@
import javax.faces.event.PreRenderViewEvent;
import javax.faces.event.SystemEvent;
import org.omnifaces.component.output.cache.CacheEntry;
import org.omnifaces.component.output.cache.CacheFactory;
import org.omnifaces.component.output.cache.CacheInitializer;
import org.omnifaces.component.output.cache.CacheInstancePerScopeProvider;
import org.omnifaces.component.output.cache.CacheProvider;
import org.omnifaces.component.output.cache.DefaultCache;
import org.omnifaces.component.output.cache.DefaultCacheProvider;
import org.omnifaces.component.output.cache.TimeToLiveCache;
import org.omnifaces.component.output.cache.el.CacheValue;
import org.omnifaces.component.output.cache.el.CachingValueExpression;
import org.omnifaces.filter.OnDemandResponseBufferFilter;
@@ -56,6 +48,14 @@
import org.omnifaces.servlet.HttpServletResponseOutputWrapper;
import org.omnifaces.util.Callback;
import org.omnifaces.util.State;
import org.omnifaces.util.cache.CacheEntry;
import org.omnifaces.util.cache.CacheFactory;
import org.omnifaces.util.cache.CacheInitializer;
import org.omnifaces.util.cache.CacheInstancePerScopeProvider;
import org.omnifaces.util.cache.CacheProvider;
import org.omnifaces.util.cache.DefaultCache;
import org.omnifaces.util.cache.DefaultCacheProvider;
import org.omnifaces.util.cache.TimeToLiveCache;
/**
* <p>
@@ -139,7 +139,7 @@
*
* @since 1.1
* @author Arjan Tijms
* @see org.omnifaces.component.output.cache.Cache
* @see org.omnifaces.util.cache.Cache
* @see CacheEntry
* @see CacheFactory
* @see CacheInitializer
@@ -243,7 +243,7 @@ public void encodeChildren(FacesContext context) throws IOException {
String key = getKeyWithDefault(context);
ResponseWriter responseWriter = context.getResponseWriter();
org.omnifaces.component.output.cache.Cache scopedCache = getCacheImpl(context);
org.omnifaces.util.cache.Cache scopedCache = getCacheImpl(context);
if (isReset()) {
scopedCache.remove(key);
@@ -320,7 +320,7 @@ private void cacheContent(FacesContext context, String content) {
cacheContent(context, CacheFactory.getCache(context, getScope()), getKeyWithDefault(context), content);
}
private void cacheContent(FacesContext context, org.omnifaces.component.output.cache.Cache scopedCache, String key, String content) {
private void cacheContent(FacesContext context, org.omnifaces.util.cache.Cache scopedCache, String key, String content) {
int time = getTime();
if (time > 0) {
scopedCache.put(key, content, time);
@@ -341,7 +341,7 @@ private String getKeyWithDefault(FacesContext context) {
return key;
}
private org.omnifaces.component.output.cache.Cache getCacheImpl(FacesContext context) {
private org.omnifaces.util.cache.Cache getCacheImpl(FacesContext context) {
return CacheFactory.getCache(context, getScope());
}
@@ -22,8 +22,8 @@
import javax.faces.application.Resource;
import javax.faces.context.FacesContext;
import org.omnifaces.component.output.cache.Cache;
import org.omnifaces.component.output.cache.CacheFactory;
import org.omnifaces.util.cache.Cache;
import org.omnifaces.util.cache.CacheFactory;
/**
* <p>
@@ -42,14 +42,14 @@
import javax.faces.event.SystemEvent;
import javax.faces.event.SystemEventListener;
import org.omnifaces.component.output.cache.Cache;
import org.omnifaces.component.script.DeferredScript;
import org.omnifaces.renderer.DeferredScriptRenderer;
import org.omnifaces.renderer.InlineResourceRenderer;
import org.omnifaces.renderer.InlineScriptRenderer;
import org.omnifaces.renderer.InlineStylesheetRenderer;
import org.omnifaces.util.Faces;
import org.omnifaces.util.Hacks;
import org.omnifaces.util.cache.Cache;
/**
* <p>
@@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.omnifaces.component.output.cache; // TODO 3.0: migrate to org.omnifaces.util.cache.
package org.omnifaces.util.cache;
import java.io.Serializable;
@@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.omnifaces.component.output.cache;
package org.omnifaces.util.cache;
import java.io.Serializable;
import java.util.Date;
@@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.omnifaces.component.output.cache;
package org.omnifaces.util.cache;
import javax.faces.context.FacesContext;
import javax.servlet.ServletContext;
@@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.omnifaces.component.output.cache;
package org.omnifaces.util.cache;
import static java.lang.Boolean.parseBoolean;
import static java.util.Collections.list;
@@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.omnifaces.component.output.cache;
package org.omnifaces.util.cache;
import java.util.Map;
@@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.omnifaces.component.output.cache;
package org.omnifaces.util.cache;
import java.util.Map;
@@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.omnifaces.component.output.cache;
package org.omnifaces.util.cache;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.omnifaces.component.output.cache;
package org.omnifaces.util.cache;
import org.omnifaces.util.concurrentlinkedhashmap.ConcurrentLinkedHashMap;
@@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.omnifaces.component.output.cache;
package org.omnifaces.util.cache;
import static java.lang.System.currentTimeMillis;
import static java.util.concurrent.TimeUnit.SECONDS;

0 comments on commit e2a3f25

Please sign in to comment.