package com.capgemini.reports.teamcenter.resolution;

import com.capgemini.framework.teamcenter.authent.TcSession;
import com.capgemini.framework.teamcenter.exceptions.EmptyNomenclatureException;
import com.capgemini.reports.bomlineholder.BOMLineHolder;
import com.capgemini.reports.bomlineholder.BOMLineHolder.BOMLineHolderState;
import com.capgemini.reports.exceptions.InvalidInputException;
import com.capgemini.reports.exceptions.MalformedNomenclatureException;
import com.capgemini.reports.teamcenter.resolution.structureservice.SingleStructureServiceCaller;
import com.capgemini.reports.teamcenter.resolution.structureservice.SingleStructureServiceCaller.SingleLevelExpander;
import com.teamcenter.soa.client.model.strong.BOMLine;

/**
 * Use this interface to specify how explode a nomenclature, step by step, in a {@link SingleStructureServiceCaller}.<br>
 * Exemple: Explode a Generic, look for its RFGeneric, explod ONLY this RFGeneric, look for a PArt, return that Part.<br>
 */
public interface IBOMLineExplorer {

    /**
     * Explore a Top {@link BOMLineHolder}.<br/>
     * The BOMLineHolder should already possess the Teamcenter objects ({@link BOMLine}s) so this BOM must be not built (status Frozen via {@link BOMLineHolderState}).
     */
    BOMLineHolder explore(final TcSession session, final SingleLevelExpander expander, final BOMLineHolder bomLineHolder) throws EmptyNomenclatureException, InvalidInputException,
            MalformedNomenclatureException;
}
