Examples of UserStoreException


Examples of org.apache.airavata.security.UserStoreException

        } else {
            MessageDigest messageDigest = null;
            try {
                messageDigest = MessageDigest.getInstance(hashMethod);
            } catch (NoSuchAlgorithmException e) {
                throw new UserStoreException("Error creating message digest with hash algorithm - " + hashMethod, e);
            }
            return new String(messageDigest.digest(password.getBytes()));
        }

    }
View Full Code Here

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

    private Claim[] getClaimsToEnterData(UserRealm realm)
            throws UserStoreException {
        try {
            return getAllSupportedClaims(realm, UserCoreConstants.DEFAULT_CARBON_DIALECT);
        } catch (org.wso2.carbon.user.api.UserStoreException e) {
            throw new UserStoreException(e);
        }
    }
View Full Code Here

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

        ProfileConfiguration[] configurations;
        String[] profileNames = new String[0];
        try {
            configurations = (ProfileConfiguration[]) profileAdmin.getAllProfiles();
        } catch (org.wso2.carbon.user.api.UserStoreException e) {
            throw new UserStoreException(e);
        }

        if (configurations != null) {
            profileNames = new String[configurations.length];
            for (int i = 0; i < configurations.length; i++) {
View Full Code Here

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

        } catch (DirectoryServerException e) {
            //exception can be caught if addPartition method fails.
            String errorMessage = "Could not create a new partition for tenant id - " +
                                  tenant.getId() + "and for tenant domain - " + tenant.getDomain();
            logger.error(errorMessage, e);
            throw new UserStoreException(errorMessage, e);
        } catch (EmbeddingLDAPException e) {
            //exception can be caught if getPartitionInfo method fails.
            String errorMessage = "Could not create a new partition for tenant id - " +
                                  tenant.getId() + "and for tenant domain - " + tenant.getDomain();
            logger.error(errorMessage, e);
            throw new UserStoreException(errorMessage, e);

        }

        return tenant.getId();
    }
View Full Code Here

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

    public void deleteTenant(int i) throws UserStoreException {

        try {
            this.ldapPartitionManager.removePartition(String.valueOf(i));
        } catch (Exception e) {
            throw new UserStoreException("Could not remove partition for tenant id " + i, e);
        }
    }
View Full Code Here

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

    public void addPartitionToTenant(Tenant tenant) throws UserStoreException {
        try {
            ldapPartitionManager.initializeExistingPartition(getPartitionInfo(tenant));

        } catch (Exception e) {
            throw new UserStoreException("Can not add the new partition ", e);
        }
    }
View Full Code Here

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

            realmConfig.getRealmProperties().remove(JDBCRealmConstants.MAX_WAIT);
           
            return realmConfig;
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            throw new UserStoreException(e.getMessage(), e);
        }
    }
View Full Code Here

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

            try {
                context = new InitialDirContext(environment);
            } catch (Exception e1) {
                log.error("Error obtaining connection for the second time" + e.getMessage(), e);
                throw new UserStoreException("Error obtaining connection. " + e.getMessage(), e);
            }

        }
        return (context);
View Full Code Here

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

            return ldapRealmConfig;

        } catch (Exception e) {
            String errorMessage = "Tenant specific realm config could not be created.";
            log.error(errorMessage, e);
            throw new UserStoreException(errorMessage, e);
        }

    }
View Full Code Here

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

        if (jdbcDataSource == null) {
            jdbcDataSource = DatabaseUtil.getRealmDataSource(realmConfig);
            properties.put(UserCoreConstants.DATA_SOURCE, jdbcDataSource);
        }
        if (jdbcDataSource == null) {
            throw new UserStoreException("Data Source is null");
        }

        if (log.isDebugEnabled()) {
            log.debug("The jdbcDataSource being used by JDBCUserStoreManager :: "
                    + jdbcDataSource.hashCode());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.