Package org.wso2.carbon.user.core

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


        return realmProps;
    }

    private UserRealm getApplicableUserRealm() throws UserStoreException {
        try {
            UserRealm realm = super.getUserRealm();
            if (realm == null) {
                throw new UserStoreException("UserRealm is null");
            }
            return realm;
        } catch (Exception e) {
View Full Code Here


public class DirectoryServerManager extends AbstractAdmin {

    private static Log log = LogFactory.getLog(DirectoryServerManager.class);

    private LDAPServerStoreManager getServerStoreManager() throws DirectoryServerManagerException {
        UserRealm realm = this.getUserRealm();
        RealmConfiguration configuration;
        try {
            configuration = realm.getRealmConfiguration();
        } catch (UserStoreException e) {
            throw new DirectoryServerManagerException("Unable to retrieve realm configuration.");
        }

        return new LDAPServerStoreManager(configuration);
View Full Code Here

        getAuthorizationManager().resetPermissionOnUpdateRole(roleName, newRoleName);
    }

    private AuthorizationManager getAuthorizationManager() throws UserStoreException {
        try {
            UserRealm realm = super.getUserRealm();
            if (realm == null) {
                // TODO log
                throw new UserStoreException("UserRealm is null");
            }
            return realm.getAuthorizationManager();
        } catch (Exception e) {
            throw new UserStoreException(e);
        }
    }
View Full Code Here

        }
    }

    private ProfileConfigurationManager getProfileConfigurationManager() throws UserStoreException {
        try {
            UserRealm realm = super.getUserRealm();
            if (realm == null) {
                throw new UserStoreException("UserRealm is null");
            }
            return realm.getProfileConfigurationManager();
        } catch (Exception e) {
            throw new UserStoreException(e);
        }
    }
View Full Code Here

     */
    public Claim[] getAllSupportedClaims() throws Exception {
        ClaimManager claimManager = null;

        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager != null) {
                // There can be cases - we get a request for an external user store - where we don'
                // have a claims administrator.
                return (Claim[]) realm.getClaimManager().getAllSupportClaimsByDefault();
            }
        } catch (UserStoreException e) {
            log.error("Error occurred while loading supported claims", e);
            getException("Error occurred while loading supported claima", e);
        }
View Full Code Here

        ClaimMapping claimMapping = null;
        Claim[] claims = null;
        ClaimManager claimManager = null;

        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager == null) {
                // There can be cases - we get a request for an external user store - where we don'
                // have a claims administrator.
                return new ClaimMapping[0];
            }

            claims = (Claim[]) claimManager.getAllSupportClaimsByDefault();
            if (claims != null) {
                claimMappings = new ClaimMapping[claims.length];
                for (int i = 0; i < claims.length; i++) {
                    claimMapping = new ClaimMapping(null, null);
                    claimMapping.setClaim(claims[i]);
                    claimMapping.setMappedAttribute(realm.getClaimManager().getAttributeName(
                            claims[i].getClaimUri()));
                    claimMappings[i] = claimMapping;
                }
            }
View Full Code Here

        ClaimMapping claimMapping = null;
        Claim[] claims = null;
        ClaimManager claimManager = null;

        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager == null) {
                // There can be cases - we get a request for an external user store - where we don'
                // have a claims administrator.
                return new ClaimMapping[0];
            }
View Full Code Here

    public ClaimMapping getClaimMapping(String claimURI) throws Exception {
        ClaimMapping claimMapping = null;
        ClaimManager claimManager = null;
        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager != null) {
                claimMapping = (ClaimMapping) claimManager.getClaimMapping(claimURI);
               
            }
        } catch (UserStoreException e) {
View Full Code Here

        ClaimMapping claimMapping = null;
        Claim[] claims = null;
        ClaimManager claimManager = null;

        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager == null) {
                // There can be cases - we get a request for an external user store - where we don'
                // have a claims administrator.
                return new ClaimMapping[0];
            }
View Full Code Here

        Claim[] claims = new Claim[0];
        ArrayList<Claim> reqClaims = null;
        ClaimManager claimManager = null;

        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager == null) {
                // There can be cases - we get a request for an external user store - where we don'
                // have a claims administrator.
                return claims;
            }
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.