PreRenderCacheImpl.java 6.98 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  org.apache.felix.scr.annotations.Activate
 *  org.apache.felix.scr.annotations.Component
 *  org.apache.felix.scr.annotations.Reference
 *  org.apache.felix.scr.annotations.ReferencePolicy
 *  org.apache.felix.scr.annotations.Service
 *  org.slf4j.Logger
 *  scala.Function1
 *  scala.Option
 *  scala.ScalaObject
 *  scala.reflect.ScalaSignature
 */
package com.adobe.forms.cache.impl;

import com.adobe.forms.cache.CacheStore;
import com.adobe.forms.cache.CacheStoreProvider;
import com.adobe.forms.cache.CacheStrategy;
import com.adobe.forms.cache.CacheStrategy$;
import com.adobe.forms.cache.CacheStrategyNone$;
import com.adobe.forms.cache.Cacheable;
import com.adobe.forms.cache.LCFormsCacheConfig;
import com.adobe.forms.cache.PreRenderCache;
import com.adobe.forms.cache.ResourceCache;
import com.adobe.forms.cache.ResourceCache$class;
import java.util.Set;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferencePolicy;
import org.apache.felix.scr.annotations.Service;
import org.slf4j.Logger;
import scala.Function1;
import scala.Option;
import scala.ScalaObject;
import scala.reflect.ScalaSignature;

/*
 * This class specifies class file version 49.0 but uses Java 6 signatures.  Assumed Java 6.
 */
@Component(immediate=1)
@Service(value={PreRenderCache.class})
@ScalaSignature(bytes="\u0006\u0001\u0005\u001da\u0001B\u0001\u0003\u00015\u0011!\u0003\u0015:f%\u0016tG-\u001a:DC\u000eDW-S7qY*\u00111\u0001B\u0001\u0005S6\u0004HN\u0003\u0002\u0006\r\u0005)1-Y2iK*\u0011q\u0001C\u0001\u0006M>\u0014Xn\u001d\u0006\u0003\u0013)\tQ!\u00193pE\u0016T\u0011aC\u0001\u0004G>l7\u0001A\n\u0005\u000191\"\u0004\u0005\u0002\u0010)5\t\u0001C\u0003\u0002\u0012%\u0005!A.\u00198h\u0015\u0005\u0019\u0012\u0001\u00026bm\u0006L!!\u0006\t\u0003\r=\u0013'.Z2u!\t9\u0002$D\u0001\u0005\u0013\tIBA\u0001\bQe\u0016\u0014VM\u001c3fe\u000e\u000b7\r[3\u0011\u0005mqR\"\u0001\u000f\u000b\u0003u\tQa]2bY\u0006L!a\b\u000f\u0003\u0017M\u001b\u0017\r\\1PE*,7\r\u001e\u0005\u0006C\u0001!\tAI\u0001\u0007y%t\u0017\u000e\u001e \u0015\u0003\r\u0002\"\u0001\n\u0001\u000e\u0003\tAqA\n\u0001A\u0002\u0013\u0005q%\u0001\ndC\u000eDWm\u0015;pe\u0016\u0004&o\u001c<jI\u0016\u0014X#\u0001\u0015\u0011\u0005]I\u0013B\u0001\u0016\u0005\u0005I\u0019\u0015m\u00195f'R|'/\u001a)s_ZLG-\u001a:\t\u000f1\u0002\u0001\u0019!C\u0001[\u000512-Y2iKN#xN]3Qe>4\u0018\u000eZ3s?\u0012*\u0017\u000f\u0006\u0002/cA\u00111dL\u0005\u0003aq\u0011A!\u00168ji\"9!gKA\u0001\u0002\u0004A\u0013a\u0001=%c!1A\u0007\u0001Q!\n!\n1cY1dQ\u0016\u001cFo\u001c:f!J|g/\u001b3fe\u0002BCa\r\u001cE\u000bB\u0011qGQ\u0007\u0002q)\u0011\u0011HO\u0001\fC:tw\u000e^1uS>t7O\u0003\u0002<y\u0005\u00191o\u0019:\u000b\u0005ur\u0014!\u00024fY&D(BA A\u0003\u0019\t\u0007/Y2iK*\t\u0011)A\u0002pe\u001eL!a\u0011\u001d\u0003\u0013I+g-\u001a:f]\u000e,\u0017A\u00029pY&\u001c\u0017\u0010J\u0001G\u0013\t9\u0005*A\u0004E3:\u000bU*S\"\u000b\u0005%C\u0014a\u0004*fM\u0016\u0014XM\\2f!>d\u0017nY=\t\u000f-\u0003\u0001\u0019!C\u0001\u0019\u0006\u0011Bn\u0019$pe6\u001c8)Y2iK\u000e{gNZ5h+\u0005i\u0005CA\fO\u0013\tyEA\u0001\nM\u0007\u001a{'/\\:DC\u000eDWmQ8oM&<\u0007bB)\u0001\u0001\u0004%\tAU\u0001\u0017Y\u000e4uN]7t\u0007\u0006\u001c\u0007.Z\"p]\u001aLwm\u0018\u0013fcR\u0011af\u0015\u0005\beA\u000b\t\u00111\u0001N\u0011\u0019)\u0006\u0001)Q\u0005\u001b\u0006\u0019Bn\u0019$pe6\u001c8)Y2iK\u000e{gNZ5hA!\"AK\u000e#F\u0011\u001dA\u0006\u00011A\u0005\u0012e\u000baaX:u_J,W#\u0001.\u0011\u0005]Y\u0016B\u0001/\u0005\u0005)\u0019\u0015m\u00195f'R|'/\u001a\u0005\b=\u0002\u0001\r\u0011\"\u0005`\u0003)y6\u000f^8sK~#S-\u001d\u000b\u0003]\u0001DqAM/\u0002\u0002\u0003\u0007!\f\u0003\u0004c\u0001\u0001\u0006KAW\u0001\b?N$xN]3!\u0011\u0015!\u0007\u0001\"\u0001f\u0003!\t7\r^5wCR,G#\u0001\u0018)\u0005\r<\u0007CA\u001ci\u0013\tI\u0007H\u0001\u0005BGRLg/\u0019;f\u0011\u0015Y\u0007\u0001\"\u0005m\u0003%I7/\u00128bE2,G-F\u0001n!\tYb.\u0003\u0002p9\t9!i\\8mK\u0006t\u0007\"B9\u0001\t#\u0011\u0018!C2bG\",g*Y7f+\u0005\u0019\bCA\bu\u0013\t)\bC\u0001\u0004TiJLgn\u001a\u0015\u0005\u0001]T8\u0010\u0005\u00028q&\u0011\u0011\u0010\u000f\u0002\b'\u0016\u0014h/[2f\u0003\u00151\u0018\r\\;fY\u0005a8%\u0001\f)\r\u0001q\u00181AA\u0003!\t9t0C\u0002\u0002\u0002a\u0012\u0011bQ8na>tWM\u001c;\u0002\u0013%lW.\u001a3jCR,\u0017$A\u0001")
public class PreRenderCacheImpl
implements PreRenderCache,
ScalaObject {
    @Reference(policy=ReferencePolicy.DYNAMIC)
    private CacheStoreProvider cacheStoreProvider;
    @Reference(policy=ReferencePolicy.DYNAMIC)
    private LCFormsCacheConfig lcFormsCacheConfig;
    private CacheStore _store;
    private Logger logger;

    public CacheStoreProvider cacheStoreProvider() {
        return this.cacheStoreProvider;
    }

    public void cacheStoreProvider_$eq(CacheStoreProvider cacheStoreProvider) {
        this.cacheStoreProvider = cacheStoreProvider;
    }

    @Override
    public LCFormsCacheConfig lcFormsCacheConfig() {
        return this.lcFormsCacheConfig;
    }

    public void lcFormsCacheConfig_$eq(LCFormsCacheConfig lCFormsCacheConfig) {
        this.lcFormsCacheConfig = lCFormsCacheConfig;
    }

    @Override
    public CacheStore _store() {
        return this._store;
    }

    public void _store_$eq(CacheStore cacheStore) {
        this._store = cacheStore;
    }

    @Activate
    public void activate() {
        this._store_$eq(this.cacheStoreProvider().create(this.cacheName(), this.cacheSize()));
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    @Override
    public boolean isEnabled() {
        CacheStrategy cacheStrategy = CacheStrategy$.MODULE$.apply(this.lcFormsCacheConfig().getCacheStrategy());
        CacheStrategyNone$ cacheStrategyNone$ = CacheStrategyNone$.MODULE$;
        if (cacheStrategy != null) {
            if (!cacheStrategy.equals(cacheStrategyNone$)) return true;
            return false;
        }
        if (cacheStrategyNone$ == null) return false;
        return true;
    }

    @Override
    public String cacheName() {
        return "com_adobe_forms_PRERENDER_CACHE";
    }

    public PreRenderCacheImpl() {
        ResourceCache$class.$init$(this);
        this.cacheStoreProvider = null;
        this.lcFormsCacheConfig = null;
        this._store = null;
    }

    protected void bindCacheStoreProvider(CacheStoreProvider cacheStoreProvider) {
        this.cacheStoreProvider = cacheStoreProvider;
    }

    protected void unbindCacheStoreProvider(CacheStoreProvider cacheStoreProvider) {
        if (this.cacheStoreProvider == cacheStoreProvider) {
            this.cacheStoreProvider = null;
        }
    }

    protected void bindLcFormsCacheConfig(LCFormsCacheConfig lCFormsCacheConfig) {
        this.lcFormsCacheConfig = lCFormsCacheConfig;
    }

    protected void unbindLcFormsCacheConfig(LCFormsCacheConfig lCFormsCacheConfig) {
        if (this.lcFormsCacheConfig == lCFormsCacheConfig) {
            this.lcFormsCacheConfig = null;
        }
    }
}