IsToolsImpl.java 1.11 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.adobe.cq.dam.dm.internalapi.tools.IsTools
 *  org.apache.felix.scr.annotations.Activate
 *  org.apache.felix.scr.annotations.Component
 *  org.apache.felix.scr.annotations.Service
 *  org.osgi.framework.BundleContext
 *  org.osgi.service.component.ComponentContext
 */
package com.adobe.cq.dam.s7imaging.impl.is;

import com.adobe.cq.dam.dm.internalapi.tools.IsTools;
import java.io.File;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Service;
import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext;

@Service(value={IsTools.class})
@Component
public class IsToolsImpl
implements IsTools {
    private String toolsPath;

    @Activate
    protected void activate(ComponentContext ctx) {
        File isHome = ctx.getBundleContext().getDataFile("image-server");
        this.toolsPath = new File(isHome, "is-home/bin64").getAbsolutePath();
    }

    public String getToolsPath() {
        return this.toolsPath;
    }
}