
package cn.orionsec.ops.handler.importer.impl;

import cn.orionsec.kit.spring.SpringHolder;
import cn.orionsec.ops.dao.ApplicationProfileDAO;
import cn.orionsec.ops.entity.domain.ApplicationProfileDO;
import cn.orionsec.ops.entity.importer.DataImportDTO;
import cn.orionsec.ops.service.api.ApplicationProfileService;


public class AppProfileDataImporter extends AbstractDataImporter<ApplicationProfileDO> {

    private static final ApplicationProfileDAO applicationProfileDAO = SpringHolder.getBean(ApplicationProfileDAO.class);

    private static final ApplicationProfileService applicationProfileService = SpringHolder.getBean(ApplicationProfileService.class);

    public AppProfileDataImporter(DataImportDTO importData) {
        super(importData, applicationProfileDAO);
    }

    @Override
    protected void importFinishCallback(boolean isSuccess) {
        applicationProfileService.clearProfileCache();
    }

}
