DefaultFDMPrefillServiceImpl.java 1.93 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.adobe.aemds.guide.addon.fdm.prefill.AbstractFDMPrefillService
 *  com.adobe.forms.common.service.ContentType
 *  com.adobe.forms.common.service.DataOptions
 *  com.adobe.forms.common.service.DataProvider
 *  com.adobe.forms.common.service.FormsException
 *  com.adobe.forms.common.service.PrefillData
 *  org.apache.felix.scr.annotations.Component
 *  org.apache.felix.scr.annotations.Service
 *  org.slf4j.Logger
 *  org.slf4j.LoggerFactory
 */
package com.adobe.aemds.guide.addon.service.impl.fdm;

import com.adobe.aemds.guide.addon.fdm.prefill.AbstractFDMPrefillService;
import com.adobe.forms.common.service.ContentType;
import com.adobe.forms.common.service.DataOptions;
import com.adobe.forms.common.service.DataProvider;
import com.adobe.forms.common.service.FormsException;
import com.adobe.forms.common.service.PrefillData;
import java.io.InputStream;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Component(immediate=1, metatype=0, label="Form Data Model Prefill service")
@Service(value={DataProvider.class})
public class DefaultFDMPrefillServiceImpl
extends AbstractFDMPrefillService {
    private final Logger logger = LoggerFactory.getLogger(DefaultFDMPrefillServiceImpl.class);

    public PrefillData getPrefillData(DataOptions options) throws FormsException {
        PrefillData prefillData = null;
        try {
            prefillData = new PrefillData(this.getData(options), options.getContentType());
        }
        catch (Exception e) {
            this.logger.error("Unable to read data using the fdm prefill service : ", (Throwable)e);
        }
        return prefillData;
    }

    public String getServiceName() {
        return "FDM";
    }

    public String getServiceDescription() {
        return "Form Data Model Prefill service";
    }
}