public class InternalDirectoryUtilsImpl extends Object implements InternalDirectoryUtils
Constructor and Description |
---|
InternalDirectoryUtilsImpl(PasswordHelper passwordHelper) |
Modifier and Type | Method and Description |
---|---|
void |
validateCredential(PasswordCredential credential,
String regex,
String passwordComplexityMessage)
Validates password credential against the given regex.
|
void |
validateDirectoryForEntity(DirectoryEntity entity,
Long directoryId)
Validates that the directory entity has the same directory ID as directoryId.
|
void |
validateGroupName(Group group,
String groupName)
Validates group name.
|
void |
validateUsername(String username)
Validates a username.
|
public InternalDirectoryUtilsImpl(PasswordHelper passwordHelper)
public void validateDirectoryForEntity(DirectoryEntity entity, Long directoryId)
InternalDirectoryUtils
validateDirectoryForEntity
in interface InternalDirectoryUtils
entity
- DirectoryEntitydirectoryId
- directory ID to matchpublic void validateUsername(String username)
InternalDirectoryUtils
validateUsername
in interface InternalDirectoryUtils
username
- username to validatepublic void validateCredential(PasswordCredential credential, String regex, @Nullable String passwordComplexityMessage) throws InvalidCredentialException
InternalDirectoryUtils
validateCredential
in interface InternalDirectoryUtils
credential
- Password credential.regex
- Regex.passwordComplexityMessage
- Password complexity message (optional). If null/blank, a default message is used.InvalidCredentialException
- If the credential failed validation.public void validateGroupName(Group group, String groupName)
InternalDirectoryUtils
validateGroupName
in interface InternalDirectoryUtils
group
- Group.groupName
- Group name.Copyright © 2013 Atlassian. All Rights Reserved.