org.wso2.solutions.identity.users
Interface IdentityUserStoreReader

All Known Implementing Classes:
IdentityDefaultUserStoreReader

public interface IdentityUserStoreReader

This interface adds the functionality related to multiple profiles. A given user can have multiple profiles with different attribute values. This contains methods corresponding to reading attribute values from user profiles.


Method Summary
 java.lang.String getDefaultUserProfileName(java.lang.String userName)
          A given user should have a default profile name.
 java.util.List<java.lang.String> getUserProfileNames(java.lang.String userName)
          A given user can have multiple profiles.
 java.util.Map<java.lang.String,java.lang.String> getUserProperties(java.lang.String userName, java.lang.String profileName)
          Get the user properties corresponding to the given user name and the profile name.
 boolean isExistingUserProfile(java.lang.String userName, java.lang.String profileName)
          Profile name for a given user should be unique.
 

Method Detail

getUserProperties

java.util.Map<java.lang.String,java.lang.String> getUserProperties(java.lang.String userName,
                                                                   java.lang.String profileName)
                                                                   throws org.wso2.usermanager.UserManagerException
Get the user properties corresponding to the given user name and the profile name.

Parameters:
userName - Unique user name
profileName - Profile name, unique to a given user
Returns:
User properties corresponding to the given user name and the profile name
Throws:
org.wso2.usermanager.UserManagerException

getUserProfileNames

java.util.List<java.lang.String> getUserProfileNames(java.lang.String userName)
                                                     throws org.wso2.usermanager.UserManagerException
A given user can have multiple profiles. This returns all the profile names for a given user.

Parameters:
userName - Unique user name
Returns:
Profile names corresponding to the given user name.
Throws:
org.wso2.usermanager.UserManagerException

getDefaultUserProfileName

java.lang.String getDefaultUserProfileName(java.lang.String userName)
                                           throws org.wso2.usermanager.UserManagerException
A given user should have a default profile name. This returns the name of the default profile for a given user.

Parameters:
userName - Unique user name
Returns:
Default profile name corresponding to the given user name.
Throws:
org.wso2.usermanager.UserManagerException

isExistingUserProfile

boolean isExistingUserProfile(java.lang.String userName,
                              java.lang.String profileName)
                              throws org.wso2.usermanager.UserManagerException
Profile name for a given user should be unique. A single user cannot have multiple profiles with the same profile name. This checks whether the given user have a profile of the provided profile name.

Parameters:
userName - Unique user name
profileName - Profile name
Returns:
True, if the given user does have a profile with the same name, else false
Throws:
org.wso2.usermanager.UserManagerException