package com.capgemini.reports.documentationobjects;

import com.capgemini.framework.teamcenter.authent.TcSession;
import com.teamcenter.soa.client.model.strong.ItemRevision;

import static com.capgemini.framework.teamcenter.object.SnecmaObjectProperties.*;

/**
 * Represent a document of Gel of Unit.
 */
public class DocTechnic extends AbstractDoc {
    private static final long serialVersionUID = -6347639229060368050L;

    public DocTechnic(final TcSession session, final ItemRevision itemRevision) {
        super(session, itemRevision);
    }

    public String getIndice() {
        return getMasterFormRev().getPropertyObject(PV_INDICE_DOCUMENT).getStringValue();
    }

    public String getReference() {
        return getDocId();
    }

    public String getTypeDocTechnic1() {
        return getMasterFormRev().getPropertyObject(PV_TYPE_DOC_TECHNIC_1).getStringValue();
    }

    public String getTypeDocTechnic2() {
        return getMasterFormRev().getPropertyObject(PV_TYPE_DOC_TECHNIC_2).getStringValue();
    }

    public String getIdOrigine() {
        return getMasterFormRev().getPropertyObject(PV_ID_ORIGINE).getStringValue();
    }

    public String getDesignationEn() {
        return getMasterFormRev().getPropertyObject(PV_DESIGNATION_EN).getStringValue();
    }

    public String getSensibiliteSecurite() {
        return getMasterForm().getPropertyObject(PV_SENSIBILITE_SECURITE).getStringValue();
    }

    @Override
    public <T> T accept(final IDocVisitor<T> docVisitor) {
        return docVisitor.visit(this);
    }
}
