com.atlassian.crowd.directory
Interface InternalDirectoryUtils

All Known Implementing Classes:
InternalDirectoryUtilsImpl

public interface InternalDirectoryUtils

Internal Directory utility.


Method Summary
 void validateCredential(User user, PasswordCredential credential, Set<PasswordConstraint> passwordConstraints, String message)
          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.
 

Method Detail

validateDirectoryForEntity

void validateDirectoryForEntity(DirectoryEntity entity,
                                Long directoryId)
Validates that the directory entity has the same directory ID as directoryId.

Parameters:
entity - DirectoryEntity
directoryId - directory ID to match
Throws:
IllegalArgumentException - if the directory IDs do not match

validateUsername

void validateUsername(String username)
Validates a username.

Parameters:
username - username to validate
Throws:
IllegalArgumentException - if the username is not valid

validateCredential

void validateCredential(User user,
                        PasswordCredential credential,
                        Set<PasswordConstraint> passwordConstraints,
                        String message)
                        throws InvalidCredentialException
Validates a password credential for a given user against the given set of constraints.

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.
message - Password complexity message (optional). If null/blank, a default message is used.
Throws:
InvalidCredentialException - If the credential failed validation.

validateGroupName

void validateGroupName(Group group,
                       String groupName)
Validates group name.

Parameters:
group - Group.
groupName - Group name.


Copyright © 2016 Atlassian. All Rights Reserved.