CIFSPrintJobService.java 2.04 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.adobe.fd.jcifs.wrapper.api.JCIFSWrapper
 *  org.apache.felix.scr.annotations.Component
 *  org.apache.felix.scr.annotations.Reference
 *  org.apache.felix.scr.annotations.ReferenceCardinality
 *  org.apache.felix.scr.annotations.ReferencePolicy
 *  org.apache.felix.scr.annotations.Service
 */
package com.adobe.fd.stp.internal;

import com.adobe.fd.jcifs.wrapper.api.JCIFSWrapper;
import com.adobe.fd.stp.api.PrinterSpec;
import com.adobe.fd.stp.internal.CryptoService;
import com.adobe.fd.stp.internal.print.jobs.CIFSPrintJob;
import com.adobe.fd.stp.internal.print.jobs.IPrintJob;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.apache.felix.scr.annotations.ReferencePolicy;
import org.apache.felix.scr.annotations.Service;

@Component(label="AEMFD Internal CIFSPrintJob Service", description="AEMFD Internal CIFSPrintJob Service")
@Service(value={CIFSPrintJobService.class})
public class CIFSPrintJobService {
    @Reference(policy=ReferencePolicy.DYNAMIC)
    JCIFSWrapper jcifsWrapper;
    @Reference(policy=ReferencePolicy.DYNAMIC, cardinality=ReferenceCardinality.OPTIONAL_UNARY)
    CryptoService cryptoService;

    public IPrintJob createCIFSPrintJob(PrinterSpec printerSpec) throws Exception {
        return new CIFSPrintJob(printerSpec, this.jcifsWrapper, this.cryptoService);
    }

    protected void bindJcifsWrapper(JCIFSWrapper jCIFSWrapper) {
        this.jcifsWrapper = jCIFSWrapper;
    }

    protected void unbindJcifsWrapper(JCIFSWrapper jCIFSWrapper) {
        if (this.jcifsWrapper == jCIFSWrapper) {
            this.jcifsWrapper = null;
        }
    }

    protected void bindCryptoService(CryptoService cryptoService) {
        this.cryptoService = cryptoService;
    }

    protected void unbindCryptoService(CryptoService cryptoService) {
        if (this.cryptoService == cryptoService) {
            this.cryptoService = null;
        }
    }
}