package com.capgemini.reports.snecmaobjects.admin;

import com.capgemini.framework.teamcenter.authent.TcSession;
import com.capgemini.framework.teamcenter.object.types.SnecmaObjectTypes;
import com.capgemini.reports.snecmaobjects.visitor.IComponentVisitor;
import com.capgemini.reports.snecmaobjects.visitor.IReceptorVisitor;
import com.teamcenter.soa.client.model.strong.ItemRevision;

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

/** Class representing a RFAdminARevision. */
public class RFAdminARevision extends AbstractAdmin {
    private static final long serialVersionUID = 8090505555455825143L;

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

    public String getResponsableRepere() {
        return getMasterFormRev().getPropertyObject(PV_RESPONSABLE_REPERE).getStringValue();
    }

    public String getSuiviMontage() {
        return getMasterFormRev().getPropertyObject(PV_SUIVI_MONTAGE).getStringValue();
    }

    public String getTransfertLienLogisti() {
        return getMasterFormRev().getPropertyObject(PV_TRANSFERT_LIEN_LOGISTI).getStringValue();
    }

    public String getTransfertLienMontage() {
        return getMasterFormRev().getPropertyObject(PV_TRANSFERT_LIEN_MONTAGE).getStringValue();
    }

    public String getMaqIntExt() {
        return getMasterFormRev().getPropertyObject(PV_MAQ_INT_EXT).getStringValue();
    }

    @Override
    public <T> T accept(final IReceptorVisitor<T> aReceptorVisitor) {
        return aReceptorVisitor.visitReceptor(this);
    }

    @Override
    public <T> T accept(final IComponentVisitor<T> aComponentVisitor) {
        return aComponentVisitor.visitComponent(this);
    }

    @Override
    public boolean isSuperModel() {
        return false;
    }

    @Override
    public String toString() {
        return SnecmaObjectTypes.RF_ADMIN_A_REVISION + " " + this.getItemId();
    }
}
