Interface HasDisplayName

All Superinterfaces:
HasName

public interface HasDisplayName extends HasName
HasDisplayName -- The object has a name to display in UIs. The display name can be combined but should not exceed 100 characters. The method limitTo100Characters(String) can be used for implementations to cut of too long display names.
Since:
0.1.0 2021-04-18
Version:
2.0.2 2022-01-16
Author:
klenkes74 <rlichti@kaiserpfalz-edv.de>
  • Method Details

    • getDisplayName

      @Size(min=3, max=100, message="The length of the string must be between 3 and 100 characters long.") @Pattern(regexp="^[a-zA-Z][-a-zA-Z0-9]{1,61}(.[a-zA-Z][-a-zA-Z0-9]{1,61}){0,4}$", message="The string must match the pattern \'^[a-zA-Z][-a-zA-Z0-9]{1,61}(.[a-zA-Z][-a-zA-Z0-9]{1,61}){0,4}$\'") default @Size(min=3,max=100,message="The length of the string must be between 3 and 100 characters long.") @Pattern(regexp="^[a-zA-Z][-a-zA-Z0-9]{1,61}(.[a-zA-Z][-a-zA-Z0-9]{1,61}){0,4}$",message="The string must match the pattern \'^[a-zA-Z][-a-zA-Z0-9]{1,61}(.[a-zA-Z][-a-zA-Z0-9]{1,61}){0,4}$\'") String getDisplayName()
      Default implementation of getDisplayName().
      Returns:
      the result of HasName.getName().
    • limitTo100Characters

      default String limitTo100Characters(String content)
      Limits the length of the content to 100 by taking at most 97 characters length of the content and then adding 3 dots.
      Parameters:
      content - the content to be cut off.
      Returns:
      the cut of content.