package com.capgemini.reports.snecmaobjects.mockup;

import com.capgemini.framework.teamcenter.authent.TcSession;
import com.capgemini.reports.snecmaobjects.AbstractSnecmaObject;
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.PV_COHERENCE_CONTROL;

/** Class representing a MockupRevision. */
public class MockupRevision extends AbstractSnecmaObject {
    private static final long serialVersionUID = 5130249672177145816L;

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

    public String getCoherenceControl() {
        return getMasterFormRev().getPropertyObject(PV_COHERENCE_CONTROL).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 boolean isMockup() {
        return true;
    }
}
