com.atlassian.crowd.directory
Class InternalDirectoryUtilsImpl

java.lang.Object
  extended by com.atlassian.crowd.directory.InternalDirectoryUtilsImpl
All Implemented Interfaces:
InternalDirectoryUtils

public class InternalDirectoryUtilsImpl
extends Object
implements InternalDirectoryUtils


Constructor Summary
InternalDirectoryUtilsImpl(PasswordHelper passwordHelper)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalDirectoryUtilsImpl

public InternalDirectoryUtilsImpl(PasswordHelper passwordHelper)
Method Detail

validateDirectoryForEntity

public void validateDirectoryForEntity(DirectoryEntity entity,
                                       Long directoryId)
Description copied from interface: InternalDirectoryUtils
Validates that the directory entity has the same directory ID as directoryId.

Specified by:
validateDirectoryForEntity in interface InternalDirectoryUtils
Parameters:
entity - DirectoryEntity
directoryId - directory ID to match

validateUsername

public void validateUsername(String username)
Description copied from interface: InternalDirectoryUtils
Validates a username.

Specified by:
validateUsername in interface InternalDirectoryUtils
Parameters:
username - username to validate

validateCredential

public void validateCredential(PasswordCredential credential,
                               String regex,
                               @Nullable
                               String passwordComplexityMessage)
                        throws InvalidCredentialException
Description copied from interface: InternalDirectoryUtils
Validates password credential against the given regex.

Specified by:
validateCredential in interface InternalDirectoryUtils
Parameters:
credential - Password credential.
regex - Regex.
passwordComplexityMessage - Password complexity message (optional). If null/blank, a default message is used.
Throws:
InvalidCredentialException - If the credential failed validation.

validateGroupName

public void validateGroupName(Group group,
                              String groupName)
Description copied from interface: InternalDirectoryUtils
Validates group name.

Specified by:
validateGroupName in interface InternalDirectoryUtils
Parameters:
group - Group.
groupName - Group name.


Copyright © 2013 Atlassian. All Rights Reserved.