Interface IModelObject

All Known Subinterfaces:
IConfigurableModelObject, ITimedConfigurableModelObject
All Known Implementing Classes:
AbstractJaxbModelObject, AbstractModelObject

public interface IModelObject
Base interface for all model objects.
Author:
Jan Ortmann
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    Constant for the return values of validate methods (i.e. validateSelf() or ruleXYZ()).
    static final boolean
    Constant for the return values of validate methods (i.e. validateSelf() or ruleXYZ()).
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Returns a description for this model object in the specified locale.
    Validates the model object and returns a list of messages.
  • Field Details

    • 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:
    • 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:
  • Method Details

    • 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:
      NullPointerException - if context is null.
    • getDescription

      default String getDescription(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