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.*;

public class RFAdminRevision extends AbstractAdmin {
  private static final long serialVersionUID = 4788588575480262344L;

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

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

  public String getFrontiereAvion() {
    return getMasterFormRev().getPropertyObject(PV_FRONTIERE_AVION).getStringValue();
  }

  public String getFrontiereCooperant() {
    return getMasterFormRev().getPropertyObject(PV_FRONTIERE_COOPERANT).getStringValue();
  }

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

  public String getGeometriePieceRigide() {
    return getMasterFormRev().getPropertyObject(PV_GEOMETRIE_PIECE_RIGIDE).getStringValue();
  }

  public String getGeometrieSimplifiee() {
    return getMasterFormRev().getPropertyObject(PV_GEOMETRIE_SIMPLIFIEE).getStringValue();
  }

  public String getTraceAxiale() {
    return getMasterFormRev().getPropertyObject(PV_TRACE_AXIALE).getStringValue();
  }

  public String getEnveloppeCinematique() {
    return getMasterFormRev().getPropertyObject(PV_ENVELOPPE_CINEMATIQUE).getStringValue();
  }

  public String getEnveloppeMaintenance() {
    return getMasterFormRev().getPropertyObject(PV_ENVELOPPE_MAINTENANCE).getStringValue();
  }

  public String getEnveloppeMontage() {
    return getMasterFormRev().getPropertyObject(PV_ENVELOPPE_MONTAGE).getStringValue();
  }

  public String getInterfaceRfAdmin() {
    return getMasterFormRev().getPropertyObject(PV_INTERFACE_RF_ADMIN).getStringValue();
  }

  public String getProjetMoteur() {
    return getMasterFormRev().getPropertyObject(PV_PROJET_MOTEUR).getStringValue();
  }

  public String getMaqEchangeable() {
    return getMasterFormRev().getPropertyObject(PV_MAQ_ECHANGEABLE).getStringValue();
  }

  public String getWorkpackage() {
    return getMasterFormRev().getPropertyObject(PV_WORKPACKAGE).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_REVISION + " " + this.getItemId();
  }
}
