LaunchManagerFactoryImpl.java 1.5 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.adobe.cq.launches.api.LaunchManager
 *  com.adobe.cq.launches.api.LaunchManagerFactory
 *  com.day.cq.wcm.msm.api.RolloutManager
 *  org.apache.felix.scr.annotations.Component
 *  org.apache.felix.scr.annotations.Reference
 *  org.apache.felix.scr.annotations.Service
 *  org.apache.sling.api.resource.ResourceResolver
 */
package com.adobe.cq.wcm.launches.impl;

import com.adobe.cq.launches.api.LaunchManager;
import com.adobe.cq.launches.api.LaunchManagerFactory;
import com.adobe.cq.wcm.launches.impl.LaunchManagerImpl;
import com.day.cq.wcm.msm.api.RolloutManager;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.apache.sling.api.resource.ResourceResolver;

@Component(immediate=1, metatype=0)
@Service(value={LaunchManagerFactory.class})
public class LaunchManagerFactoryImpl
implements LaunchManagerFactory {
    @Reference
    private RolloutManager rolloutManager;

    public LaunchManager getLaunchManager(ResourceResolver resolver) {
        return new LaunchManagerImpl(resolver, this.rolloutManager);
    }

    protected void bindRolloutManager(RolloutManager rolloutManager) {
        this.rolloutManager = rolloutManager;
    }

    protected void unbindRolloutManager(RolloutManager rolloutManager) {
        if (this.rolloutManager == rolloutManager) {
            this.rolloutManager = null;
        }
    }
}