package com.capgemini.reports.bomlineholder.processor;

import com.capgemini.reports.snecmaobjects.part.AlternateRevision;
import com.capgemini.reports.snecmaobjects.part.DETRevision;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * This interface presents method for specifying a visitor's behaviour regarding {@link AlternateRevision} and {@link DETRevision} parts. <br>
 * Produces a {@link List} of {@link Map}s with specified Key and Value types.
 *
 * @param <K> the Keys Type
 * @param <V> the Values Type
 */
public interface AltOrDetBehaviour<K, V> extends Serializable {

    /**
     * Tells the Visitor if the parts in the pseudo-folder of the provided ALt or DET should be visited.
     *
     * @return true if parts in the pseudo-folder of the provided ALt or DET should be visited.
     */
    boolean shouldVisitPartsInPseudoFolder();

    /**
     * Tells the Visitor if the parts below the provided ALt or DET (as part of the usual nomenclature relationship) should be visited.
     *
     * @return true if parts in below the provided ALt or DET should be visited.
     */
    boolean shouldVisitPartsBelowAlt();

    /**
     * Formats the line representing objects that are in the pseudo folder.
     *
     * @param map the map to fill
     */
    void treatPartsInPseudoFolder(final Map<K, V> map);


    /**
     * Formats the line representing objects that are directyl below an Alt or a Det.
     *
     * @param receptorMap the map to fill
     */
    void treatAlternateOrDETAsReceptor(final Map<K, V> receptorMap);

}
