diff --git a/src/main/java/org/salespointframework/useraccount/Password.java b/src/main/java/org/salespointframework/useraccount/Password.java index 786fc3ef..d542e645 100644 --- a/src/main/java/org/salespointframework/useraccount/Password.java +++ b/src/main/java/org/salespointframework/useraccount/Password.java @@ -38,6 +38,11 @@ public abstract class Password { */ abstract String asString(); + /** + * An encrypted password. + * + * @author Oliver Drotbohm + */ @Embeddable @EqualsAndHashCode(callSuper = false) @RequiredArgsConstructor(staticName = "of", access = AccessLevel.PACKAGE) @@ -87,6 +92,12 @@ private UnencryptedPassword(String password) { this.value = password; } + /** + * Creates a new unencrypted password. + * + * @param password must not be {@literal null} or empty. + * @return will never be {@literal null}. + */ public static UnencryptedPassword of(String password) { return new UnencryptedPassword(password); } @@ -94,7 +105,7 @@ public static UnencryptedPassword of(String password) { /** * Returns the length of the password. * - * @return + * @return a positive integer. */ public int getLength() { return value.length(); diff --git a/src/main/java/org/salespointframework/useraccount/Role.java b/src/main/java/org/salespointframework/useraccount/Role.java index c5f99b85..768552f4 100755 --- a/src/main/java/org/salespointframework/useraccount/Role.java +++ b/src/main/java/org/salespointframework/useraccount/Role.java @@ -50,6 +50,7 @@ public final class Role implements Serializable, Comparable, ValueObject { * Creates a new {@link Role} instance with the given name. * * @param name the name of the Role, must not be {@literal null} or empty. + * @return will never be {@literal null}. */ public static Role of(String name) { return new Role(name); diff --git a/src/main/java/org/salespointframework/useraccount/UserAccountManagement.java b/src/main/java/org/salespointframework/useraccount/UserAccountManagement.java index 803eefb1..b305eb3b 100644 --- a/src/main/java/org/salespointframework/useraccount/UserAccountManagement.java +++ b/src/main/java/org/salespointframework/useraccount/UserAccountManagement.java @@ -118,28 +118,28 @@ public interface UserAccountManagement { * Checks if an {@link UserAccount} exists. * * @param userAccountIdentifier - * @return + * @return whether a {@link UserAccount} with the given identifier exists. */ boolean contains(UserAccountIdentifier userAccountIdentifier); /** * Finds all {@link UserAccount}s. * - * @return + * @return will never be {@literal null}. */ Streamable findAll(); /** * Finds only enabled {@link UserAccount}s. * - * @return + * @return will never be {@literal null}. */ Streamable findEnabled(); /** * Finds only disabled {@link UserAccount}s. * - * @return + * @return will never be {@literal null}. */ Streamable findDisabled(); @@ -147,7 +147,7 @@ public interface UserAccountManagement { * Returns the user with the given user name. * * @param username must not be {@literal null} or empty. - * @return + * @return will never be {@literal null}. */ Optional findByUsername(String username); diff --git a/src/main/java/org/salespointframework/useraccount/UserAccountRepository.java b/src/main/java/org/salespointframework/useraccount/UserAccountRepository.java index f989f3d8..b45edd97 100644 --- a/src/main/java/org/salespointframework/useraccount/UserAccountRepository.java +++ b/src/main/java/org/salespointframework/useraccount/UserAccountRepository.java @@ -32,14 +32,14 @@ interface UserAccountRepository /** * Returns all enabled {@link UserAccount}s. * - * @return + * @return will never be {@literal null}. */ Streamable findByEnabledTrue(); /** * Returns all disabled {@link UserAccount}s. * - * @return + * @return will never be {@literal null}. */ Streamable findByEnabledFalse(); @@ -47,7 +47,7 @@ interface UserAccountRepository * Returns the {@link UserAccount} with the given email address. * * @param emailAddress must not be {@literal null}. - * @return + * @return will never be {@literal null}. * @since 7.1 */ Optional findByEmail(String emailAddress);