package com.capgemini.reports.definition.r10report.lines;

import com.capgemini.framework.teamcenter.authent.TcSession;
import com.capgemini.reports.bomlineholder.BOMLineHolder;
import com.capgemini.reports.bomlineholder.flattener.line.AbstractPartRfPart;
import com.capgemini.reports.definition.r10report.DocumentExtractor;
import com.capgemini.reports.definition.r10report.R10Keys;
import lombok.Getter;

import java.util.List;
import java.util.Map;

/**
 * Represents a classical 'triplet' between a Part, a Rf Part and a Part.
 */
@Getter
public class R10PartRfPart extends AbstractPartRfPart<List<Map<R10Keys, String>>, DocumentExtractor> {

    /**
     * Builds a classical 'triplet' between a Part, a Rf Part and a Part.
     *
     * @param partReceptor    the {@link BOMLineHolder} Part receptor
     * @param rfPartComponent the {@link BOMLineHolder} RF Part receptor
     * @param partComponent   the {@link BOMLineHolder} APrt component
     * @param counter         the position of the line in the nomenclature.
     */
    public R10PartRfPart(final TcSession session, final BOMLineHolder partReceptor, final BOMLineHolder rfPartComponent, final BOMLineHolder partComponent,
                         final int counter) {
        super(session, partReceptor, rfPartComponent, partComponent, counter);
    }

    @Override
    public List<Map<R10Keys, String>> transform(final DocumentExtractor extractor) {
        return extractor.extract(this);
    }
}
