Package org.faktorips.runtime.model.type
Class ValidationRule
java.lang.Object
org.faktorips.runtime.model.type.ModelElement
org.faktorips.runtime.model.type.TypePart
org.faktorips.runtime.model.type.ValidationRule
-
Constructor Summary
ConstructorsConstructorDescriptionValidationRule(Type type, IpsValidationRule validationRuleAnnotation, IpsConfiguredValidationRule validationConfigurationRule, IpsExtensionProperties extensionProperties, Optional<Deprecation> deprecation) -
Method Summary
Modifier and TypeMethodDescriptionReturns the rule that is overridden by this rule if this rule overrides another one.protected StringgetDocumentation(Locale locale, DocumentationKind type, String fallback) Returns the message code of the validation rule.getName()Returns the name of the validation rule.Returns theSeverityof the validation rule.Returns the rule that is overridden by this rule if this rule overrides another one.booleanReturns whether this validation rule is activated by default.booleanReturns whether this validation rule is changing over time.booleanReturnstrueif this rule overrides another rule.booleanReturns whether this validation rule can be configured by a product component.toString()Methods inherited from class org.faktorips.runtime.model.type.TypePart
getMessageHelper, getMessageKey, getModelType, getType, getTypeName, validateMethods inherited from class org.faktorips.runtime.model.type.ModelElement
createMessageHelper, getDeprecation, getDescription, getExtensionPropertyIds, getExtensionPropertyValue, getLabel, getRelevantProductObject, getRelevantProductObject, invokeField, invokeMethod, isDeprecated
-
Constructor Details
-
ValidationRule
public ValidationRule(Type type, IpsValidationRule validationRuleAnnotation, IpsConfiguredValidationRule validationConfigurationRule, IpsExtensionProperties extensionProperties, Optional<Deprecation> deprecation)
-
-
Method Details
-
isChangingOverTime
public boolean isChangingOverTime()Returns whether this validation rule is changing over time.- Specified by:
isChangingOverTimein classTypePart- Returns:
trueif this validation rule is changing over time, otherwisefalse
-
isActivatedByDefault
public boolean isActivatedByDefault()Returns whether this validation rule is activated by default.- Returns:
trueif this validation rule is activated by default,otherwisefalse
-
isProductRelevant
public boolean isProductRelevant()Returns whether this validation rule can be configured by a product component.- Returns:
trueif this validation rule can be configured by a product component, otherwisefalse
-
getName
Returns the name of the validation rule.- Overrides:
getNamein classModelElement- Returns:
- the name of the validation rule
-
getMsgCode
Returns the message code of the validation rule.- Returns:
- the message code of the validation rule
-
getSeverity
Returns theSeverityof the validation rule.- Returns:
Severityof the validation rule
-
getDocumentation
- Overrides:
getDocumentationin classModelElement
-
isOverriding
public boolean isOverriding()Returnstrueif this rule overrides another rule. That means a supertype declares a rule with the same name.- Returns:
trueif this rule overrides another,falseif not- See Also:
-
getSuperValidationRule
Returns the rule that is overridden by this rule if this rule overrides another one. Otherwise returnsnull.- Returns:
- The rule that is overridden by this rule.
- See Also:
-
findSuperValidationRule
Returns the rule that is overridden by this rule if this rule overrides another one. Otherwise returnsnull.- Returns:
- The rule that is overridden by this rule.
- See Also:
-
toString
- Overrides:
toStringin classModelElement
-