Interface IModelObject

    • Field Detail

      • STOP_VALIDATION

        static final boolean STOP_VALIDATION
        Constant for the return values of validate methods (i.e. validateSelf() or ruleXYZ()). Indicates that the validation should be stopped.
        See Also:
        Constant Field Values
      • CONTINUE_VALIDATION

        static final boolean CONTINUE_VALIDATION
        Constant for the return values of validate methods (i.e. validateSelf() or ruleXYZ()). Indicates that the validation should be continued.
        See Also:
        Constant Field Values
    • Method Detail

      • validate

        MessageList validate​(IValidationContext context)
        Validates the model object and returns a list of messages. If no message is generated the method returns an empty list. Note that also messages like warnings or informations can be returned for valid objects.
        Parameters:
        context - provides additional external information that might be necessary to execute the validation. E.g. the business context, the locale to provide locale specific message texts, user information. The parameter must not be null.
        Throws:
        java.lang.NullPointerException - if context is null.
      • getDescription

        default java.lang.String getDescription​(java.util.Locale locale)
        Returns a description for this model object in the specified locale. The description can be used for possible error messages.
        Parameters:
        locale - the locale/language in which the description should be given
        Returns:
        the description for the given locale/language or the result of the toString method if no custom implementation is provided