Package org.wso2.carbon.user.core

Examples of org.wso2.carbon.user.core.UserRealm


     * @return
     * @throws ProfileManagementException
     */
    public DetailedProfileConfigurationDTO getAllAvailableProfileConfiguraionsForDialect(
            String dialect) throws ProfileManagementException {
        UserRealm realm = null;
        ProfileConfigurationManager profileManager = null;
        // This map contains profile configurations against their corresponding
        // configuration name.
        ProfileConfiguration[] profileConfigs = null;
        // To iterate over profileConfigurations
        Iterator<Entry<String, ProfileConfiguration>> iterator = null;
        // This is the profile configuration corresponding to the given dialect
        // to act on the given
        // user store.
        DetailedProfileConfigurationDTO detailedConfiguration = null;
        List<ProfileConfigurationDTO> configurations = null;

        validateInputParameters(new String[] { dialect });

        try {

            // Get available profile configurations for internal user store.
            realm = getRealm();
            profileManager = realm.getProfileConfigurationManager();

            if (profileManager == null) {
                String message = "No profile configurations defined ";
                if (log.isDebugEnabled()) {
                    log.debug(message);
View Full Code Here


     * @param profileConfig
     * @return
     */
    public ClaimConfigurationDTO[] getProfileConfiguration(String dialect, String profileConfig)
            throws ProfileManagementException {
        UserRealm realm = null;
        ProfileConfigurationManager profileManager = null;
        ClaimManager claimManager = null;
        ProfileConfiguration profileConfiguration = null;
        ClaimConfigurationDTO claim = null;
        List<ClaimConfigurationDTO> claimList = null;
        List<String> hiddenClaims = null;
        List<String> overriddenClaims = null;
        List<String> inheritedClaims = null;
        Claim[] definedClaims = null;
        List<String> definedClaimsList = null;

        validateInputParameters(new String[] { dialect, profileConfig });

        try {
            realm = getRealm();
            profileManager = realm.getProfileConfigurationManager();

            if (profileManager == null) {
                String message = "No profile configurations defined";
                if (log.isDebugEnabled()) {
                    log.debug(message);
                }
                return null;
            }

            claimManager = realm.getClaimManager();

            if (claimManager == null) {
                String message = "No claim configurations defined";
                if (log.isDebugEnabled()) {
                    log.debug(message);
View Full Code Here

     *
     * @return
     * @throws ProfileManagementException
     */
    public DialectDTO[] getDialects() throws ProfileManagementException {
        UserRealm realm = null;
        ProfileConfigurationManager profileManager = null;
        // This map contains profile configurations against their corresponding
        // configuration name.
        ProfileConfiguration[] profileConfigs = null;
        // To iterate over profileConfigurations
        Iterator<Entry<String, ProfileConfiguration>> iterator = null;
        Map<String, DialectDTO> basicConfigurations = null;
        String[] dialects = null;

        try {

            // Get available profile configurations for internal user store.
            realm = getRealm();
            profileManager = realm.getProfileConfigurationManager();

            if (profileManager == null) {
                String message = "No profile configurations defined ";
                if (log.isDebugEnabled()) {
                    log.debug(message);
View Full Code Here

        }
    }

    public void deleteProfileConfiguraiton(String dialect, String profileName)
            throws ProfileManagementException {
        UserRealm realm = getRealm();
        try {
            if (UserCoreConstants.DEFAULT_PROFILE.equals(profileName)) {
                throw new ProfileManagementException("Cannot delete default profile");
            }
            ProfileConfigurationManager admin = realm.getProfileConfigurationManager();
            ProfileConfiguration profileConfig = new ProfileConfiguration(profileName, dialect,
                    new ArrayList<String>(), new ArrayList<String>(), new ArrayList<String>());
            admin.deleteProfileConfig(profileConfig);
        } catch (org.wso2.carbon.user.api.UserStoreException e) {
            throw new ProfileManagementException("Could not delete profil configuration.", e);
View Full Code Here

     * @return
     * @throws Exception
     */
    private String[] getAllClaimDailects() throws Exception {
        ClaimManager claimsManager;
        UserRealm realm;
        Claim[] claims;
        List<String> dialects;

        realm = getRealm();
        claimsManager = realm.getClaimManager();

        if (claimsManager == null) {
            String message = "No claim configurations defined";
            if (log.isDebugEnabled()) {
                log.debug(message);
View Full Code Here

            ClaimConfigurationDTO[] claimsConfiguration) throws ProfileManagementException {

        validateInputParameters(new String[] { profileName, dialectName });

        try {
            UserRealm realm = null;
            ProfileConfigurationManager profileManager = null;
            realm = getRealm();
            profileManager = realm.getProfileConfigurationManager();

            if (profileManager == null) {
                String message = "No profile configurations defined";
                if (log.isDebugEnabled()) {
                    log.debug(message);
View Full Code Here

            throw new ProfileManagementException(message, e);
        }
    }

    public DialectDTO[] getDialectsForUserStore() throws ProfileManagementException {
        UserRealm realm = null;
        ProfileConfigurationManager profileAdmin = null;
        // This map contains profile configurations against their corresponding
        // configuration name.
        ProfileConfiguration[] profileConfigs = null;
        // To iterate over profileConfigurations
        Iterator<Entry<String, ProfileConfiguration>> iterator = null;
        Map<String, DialectDTO> basicConfigurations = null;
        String[] dialects = null;

        try {

            // Get available profile configurations for internal user store.
            realm = getRealm();
            profileAdmin = realm.getProfileConfigurationManager();

            if (profileAdmin == null) {
                String message = "No profile configurations defined";
                if (log.isDebugEnabled()) {
                    log.debug(message);
View Full Code Here

     * @param claimsConfiguration
     * @throws ProfileManagementException
     */
    public void updateClaimMappingBehavior(String profileName,
            ClaimConfigurationDTO[] claimsConfiguration) throws ProfileManagementException {
        UserRealm realm = null;
        ProfileConfigurationManager profileManager = null;

        validateInputParameters(new String[] { profileName });

        try {
            realm = getRealm();
            profileManager = realm.getProfileConfigurationManager();

            if (profileManager == null) {
                String message = "No profile configurations defined";
                if (log.isDebugEnabled()) {
                    log.debug(message);
View Full Code Here

     * @return
     * @throws ProfileManagementException
     */
    public ClaimConfigurationDTO[] getClaimConfigurations(String dialect)
            throws ProfileManagementException {
        UserRealm realm = null;
        ClaimManager claimsManager = null;
        Claim[] claims = null;
        List<ClaimConfigurationDTO> claimList = null;

        validateInputParameters(new String[] { dialect });

        try {
            realm = getRealm();
            claimsManager = realm.getClaimManager();

            if (claimsManager == null) {
                String message = "No claim configurations defined";
                if (log.isDebugEnabled()) {
                    log.debug(message);
View Full Code Here

     * @throws ProfileManagementException
     */
    public boolean isAddProfileEnabled() throws ProfileManagementException {
        UserStoreManager userStoreManager = null;
        try {
            UserRealm realm = getRealm();
            userStoreManager = realm.getUserStoreManager();

        } catch (ProfileManagementException e) {
            String errorMessage = "Error obtaining user realm.";
            log.error(errorMessage, e);
            throw new ProfileManagementException(errorMessage, e);
View Full Code Here

TOP

Related Classes of org.wso2.carbon.user.core.UserRealm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.