package com.capgemini.framework.teamcenter.object.runtime;

import com.capgemini.framework.teamcenter.object.pom.workspace.bom.TcRevisionRule;
import com.capgemini.framework.teamcenter.object.pom.workspace.bom.TcRevisionRuleProperties;
import com.teamcenter.services.strong.cad._2007_01.StructureManagement.RevisionRuleConfigInfo;

public class TcRevisionRulesConfiguration {

    private final TcRevisionRule revisionRule;
    private final TcRevisionRuleProperties revisionRuleProperties;

    public TcRevisionRulesConfiguration(final TcRevisionRule revisionRule) {
        this(revisionRule, null);
    }

    public TcRevisionRulesConfiguration(final TcRevisionRule revisionRule, final TcRevisionRuleProperties revisionRuleProperties) {
        this.revisionRule = revisionRule;
        this.revisionRuleProperties = revisionRuleProperties;
    }

    public void addInfo(final RevisionRuleConfigInfo revRuleConfigInfo) {
        revisionRule.addInfo(revRuleConfigInfo);
        if (revisionRuleProperties != null) {
            revisionRuleProperties.addInfo(revRuleConfigInfo);
        }
    }
}
