identityuserstorereader.java

来自「开源的OpenId的一个java实现」· Java 代码 · 共 61 行

JAVA
61
字号
package org.wso2.solutions.identity.users;

import java.util.List;
import java.util.Map;

import org.wso2.usermanager.UserManagerException;

/**
 * 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.
 */
public interface IdentityUserStoreReader {

    /**
     * Get the user properties corresponding to the given user name and the
     * profile name.
     * @param userName Unique user name
     * @param profileName Profile name, unique to a given user
     * @return User properties corresponding to the given user name and the
     *         profile name
     * @throws UserManagerException
     */
    public Map<String,String> getUserProperties(String userName, String profileName)
            throws UserManagerException;

    /**
     * A given user can have multiple profiles. This returns all the profile
     * names for a given user.
     * @param userName Unique user name
     * @return Profile names corresponding to the given user name.
     * @throws UserManagerException
     */
    public List<String> getUserProfileNames(String userName)
            throws UserManagerException;

    /**
     * A given user should have a default profile name. This returns the name of
     * the default profile for a given user.
     * @param userName Unique user name
     * @return Default profile name corresponding to the given user name.
     * @throws UserManagerException
     */
    public String getDefaultUserProfileName(String userName)
            throws 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.
     * @param userName Unique user name
     * @param profileName Profile name
     * @return True, if the given user does have a profile with the same name,
     *         else false
     * @throws UserManagerException
     */
    public boolean isExistingUserProfile(String userName, String profileName)
            throws UserManagerException;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?