1 package eu
.etaxonomy
.cdm
.model
.common
;
4 * An interface especially meant to be implemented by entities that can provide a
5 * meaningful description of themselves. If an entity implements this interface, and it
6 * turns out to violate some validation constraint, the CVI will use will use the methods
7 * of this interface when saving data to the error tables, rather than defaults that might
8 * not be very intelligible to the end user. See the invidual methods for what those
9 * defaults are for entity. In fact, {@link CdmBase} implements this interface, but just
10 * returns the defaults for each method.
12 * @author ayco_holleman
15 public interface ISelfDescriptive
{
18 * A user-friendly description of the type of the object. Default: the simple name of
19 * the class of the object.
22 String
getUserFriendlyTypeName();
26 * A user-friendly description of the object itself. Default:
27 * {@link Object#toString()}.
29 String
getUserFriendlyDescription();
33 * A user-friendly name for the specified field (presumably a field that was found to
34 * be invalid by the CVI). Default: the returned as-is.
38 String
getUserFriendlyFieldName(String field
);