Package org.faktorips.runtime
Interface IModelObject
-
- All Known Subinterfaces:
IConfigurableModelObject,ITimedConfigurableModelObject
- All Known Implementing Classes:
AbstractJaxbModelObject,AbstractModelObject
public interface IModelObjectBase interface for all model objects.- Author:
- Jan Ortmann
-
-
Field Summary
Fields Modifier and Type Field Description static booleanCONTINUE_VALIDATIONConstant for the return values of validate methods (i.e.static booleanSTOP_VALIDATIONConstant for the return values of validate methods (i.e.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.StringgetDescription(java.util.Locale locale)Returns a description for this model object in the specified locale.MessageListvalidate(IValidationContext context)Validates the model object and returns a list of messages.
-
-
-
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 benull.- Throws:
java.lang.NullPointerException- if context isnull.
-
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
toStringmethod if no custom implementation is provided
-
-