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()
           
 
Method Summary
 void validateCredential(User user, PasswordCredential credential, Set<PasswordConstraint> passwordConstraints, String passwordComplexityMessage)
          Validates a password credential for a given user against the given set of constraints.
 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()
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(User user,
                               PasswordCredential credential,
                               Set<PasswordConstraint> passwordConstraints,
                               @Nullable
                               String passwordComplexityMessage)
                        throws InvalidCredentialException
Description copied from interface: InternalDirectoryUtils
Validates a password credential for a given user against the given set of constraints.

Specified by:
validateCredential in interface InternalDirectoryUtils
Parameters:
user - the User to validate the credential for
credential - Password credential. If encrypted the credential is considered valid.
passwordConstraints - The type of validation to perform. Will contain a regex, a password score, or both.
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 © 2016 Atlassian. All Rights Reserved.