AbstractImporterStep.java 1.18 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  javax.jcr.RepositoryException
 *  org.apache.felix.scr.annotations.Component
 *  org.apache.sling.commons.osgi.OsgiUtil
 *  org.osgi.service.component.ComponentContext
 */
package com.day.cq.wcm.siteimporter.internal.steps;

import com.day.cq.wcm.siteimporter.ImporterContext;
import com.day.cq.wcm.siteimporter.ImporterStep;
import java.util.Dictionary;
import javax.jcr.RepositoryException;
import org.apache.felix.scr.annotations.Component;
import org.apache.sling.commons.osgi.OsgiUtil;
import org.osgi.service.component.ComponentContext;

@Component(metatype=0, componentAbstract=1)
public abstract class AbstractImporterStep
implements ImporterStep {
    public static final String P_ORDER = "importerstep.order";
    private Integer order;

    @Override
    public Integer getOrder() {
        return this.order;
    }

    @Override
    public abstract boolean execute(ImporterContext var1);

    protected void activate(ComponentContext context) throws RepositoryException {
        Dictionary props = context.getProperties();
        this.order = OsgiUtil.toInteger(props.get("importerstep.order"), (int)0);
    }
}