/*
 * Copyright 2018 Scytl Secure Electronic Voting SA
 *
 * All rights reserved
 *
 * See our extended copyright notice in *file 'Copyright.txt' which is part of this source code package
 */
package com.scytl.products.ov.vw.services.domain.common.csv;

import java.io.OutputStream;

import com.scytl.products.ov.commons.infrastructure.csv.AbstractCSVWriter;
import com.scytl.products.ov.vw.services.domain.model.state.ExportedPartialVotingCardStateItem;

/**
 * The Class ExportedPartialVotingCardStateItemWriter.
 */
public class ExportedPartialVotingCardStateItemWriter
        extends AbstractCSVWriter<ExportedPartialVotingCardStateItem> {

    /**
     * Instantiates a new exported partial voting card state item writer.
     *
     * @param outputStream
     *            the output stream
     */
    public ExportedPartialVotingCardStateItemWriter(
            OutputStream outputStream) {
        super(outputStream);
    }

    /* (non-Javadoc)
     * @see com.scytl.products.ov.vw.services.domain.common.csv.AbstractCSVWriter#extractValues(java.lang.Object)
     */
    @Override
    protected String[] extractValues(
            final ExportedPartialVotingCardStateItem exportedPartialVotingCardStateItem) {

        return new String[] {
                exportedPartialVotingCardStateItem.getVotingCardId(),
                exportedPartialVotingCardStateItem.getState() };
    }

}
