com.atlassian.crowd.directory
Interface InternalDirectoryUtils

All Known Implementing Classes:
InternalDirectoryUtilsImpl

public interface InternalDirectoryUtils

Internal Directory utility.


Method Summary
 void validateCredential(PasswordCredential credential, String regex)
          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.
 

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(PasswordCredential credential,
                        String regex)
                        throws InvalidCredentialException
Validates password credential against the given regex.

Parameters:
credential - Password credential.
regex - Regex.
Throws:
InvalidCredentialException - If the credential failed validation.

validateGroupName

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

Parameters:
group - Group.
groupName - Group name.


Copyright © 2012 Atlassian. All Rights Reserved.