Class ActorCreatedByAdminDTO
java.lang.Object
de.gustavblass.fsu.fmi.roombooking.dto.ActorCreatedByAdminDTO
- Direct Known Subclasses:
LocalActorCreatedByAdminDTO
A data-transfer object that represents and validates the HTML form input POSTed to
ActorAdminController.createActor(LocalActorCreatedByAdminDTO, BindingResult, HttpServletResponse).- Implementation Note:
- This is a class and not a record, because only a class allows
enabledto be set totrueby default (for the end-user's convenience when filling in the HTML form) while remaining mutable.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @NotNull @Email StringThe e-mail address of the future Actor.private BooleanWhether to enable the future Actor's account.private BooleanWhether to lock the future Actor's account.static final intThenamemust contain at least this number of characters.private @NotNull @NotBlank @Length(min=2) @Pattern(regexp="^[\\p{L}'\u2019.,\\-_\\s+]+$") Stringstatic final @NonNull StringThe regular expression that defines how thenamemust be formatted.private @NotNull ActorRoleThe role that the future Actor shall have.static final intTheuserNamemust not contain more than this number of characters.static final intTheuserNamemust contain at least this number of characters.static final @NonNull StringThe regular expression that defines how theuserNamemust be formatted.private @NotNull @NotBlank @Length(min=3,max=32) @Pattern(regexp="^[a-zA-Z0-9][a-z0-9.\\-_]+[a-zA-Z0-9]$") String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Deletes all personal data from this object by setting all fields tonull.abstract voidSets any passwords or other authentication secrets to null.
-
Field Details
-
USER_NAME_PATTERN
-
USER_NAME_MINIMUM_LENGTH
public static final int USER_NAME_MINIMUM_LENGTHTheuserNamemust contain at least this number of characters.- See Also:
-
USER_NAME_MAXIMUM_LENGTH
public static final int USER_NAME_MAXIMUM_LENGTHTheuserNamemust not contain more than this number of characters.- See Also:
-
NAME_PATTERN
-
MINIMUM_NAME_LENGTH
public static final int MINIMUM_NAME_LENGTHThenamemust contain at least this number of characters.- See Also:
-
role
-
userName
@NotNull @NotBlank @Length(min=3, max=32) @Pattern(regexp="^[a-zA-Z0-9][a-z0-9.\\-_]+[a-zA-Z0-9]$") private @NotNull @NotBlank @Length(min=3,max=32) @Pattern(regexp="^[a-zA-Z0-9][a-z0-9.\\-_]+[a-zA-Z0-9]$") String userName -
name
@NotNull @NotBlank @Length(min=2) @Pattern(regexp="^[\\p{L}'\u2019.,\\-_\\s+]+$") private @NotNull @NotBlank @Length(min=2) @Pattern(regexp="^[\\p{L}'\u2019.,\\-_\\s+]+$") String name -
eMailAddress
The e-mail address of the future Actor. -
enabled
-
locked
-
-
Constructor Details
-
ActorCreatedByAdminDTO
public ActorCreatedByAdminDTO()
-
-
Method Details
-
clear
public void clear()Deletes all personal data from this object by setting all fields tonull. -
clearCredentials
public abstract void clearCredentials()Sets any passwords or other authentication secrets to null.
-