cdc.mf.checks.atts.name.AbstractNameMustMatchPattern Maven / Gradle / Ivy
package cdc.mf.checks.atts.name;
import cdc.issues.IssueSeverity;
import cdc.issues.checks.SnapshotManager;
import cdc.issues.rules.Rule;
import cdc.mf.checks.atts.text.AbstractTextMustMatchPattern;
import cdc.mf.model.MfNameItem;
/**
* Check that if an {@link MfNameItem} has a name, it matches a pattern.
*
* @author Damien Carbonne
* @param The {@link MfNameItem} type.
*/
public abstract class AbstractNameMustMatchPattern extends AbstractTextMustMatchPattern {
public static final IssueSeverity SEVERITY = IssueSeverity.CRITICAL;
protected AbstractNameMustMatchPattern(SnapshotManager manager,
Class objectClass,
Rule rule,
String regex) {
super(manager,
objectClass,
rule,
regex);
}
@Override
protected String getText(O object) {
return object.getName();
}
@Override
protected final String getHeader(O object) {
return getTheNameOfHeader(object);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy