Package org.wso2.carbon.user.core

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


            userSearchResults = rootContext.search(
                    userBase, searchFilter, userSearchControl);
        } catch (NamingException e) {
            String errorMessage = "Error occurred while searching in user base.";
            logger.error(errorMessage, e);
            throw new UserStoreException(errorMessage, e);
        }

        return userSearchResults;

    }
View Full Code Here


            groupSearchResults = rootContext.search(
                    userBase, searchFilter, userSearchControl);
        } catch (NamingException e) {
            String errorMessage = "Error occurred while searching in group base.";
            logger.error(errorMessage, e);
            throw new UserStoreException(errorMessage, e);
        }

        return groupSearchResults;
    }
View Full Code Here

     */
    protected void checkRequiredUserStoreConfiguration() throws UserStoreException {
        READ_ONLY = realmConfig.getUserStoreProperty(
                UserCoreConstants.RealmConfig.PROPERTY_READ_ONLY);
        if (READ_ONLY.equals("true")) {
            throw new UserStoreException("This user store manager meant to be read-write, " +
                                         "if you want to use user-store in read-only mode, " +
                                         "please use LDAPUserStoreManager.");
        }
        //checkGroupConfiguration
        READ_LDAP_USER_GROUPS = realmConfig.getUserStoreProperty(LDAPConstants.READ_EXTERNAL_ROLES);
        WRITE_LDAP_USER_GROUPS = realmConfig.getUserStoreProperty(
                LDAPConstants.WRITE_EXTERNAL_ROLES);
        USER_SEARCH_BASE = realmConfig.getUserStoreProperty(LDAPConstants.USER_SEARCH_BASE);
        GROUP_SEARCH_BASE = realmConfig.getUserStoreProperty(LDAPConstants.GROUP_SEARCH_BASE);

        if ((READ_LDAP_USER_GROUPS == null) || (WRITE_LDAP_USER_GROUPS == null)) {
            throw new UserStoreException("Please set the LDAP groups configuration properly.");
        }
        if ((READ_LDAP_USER_GROUPS.equals("false")) && (WRITE_LDAP_USER_GROUPS.equals("true"))) {
            throw new UserStoreException("Wrong combination for LDAP groups " +
                                         "read-write properties.");
        }
        if ("true".equals(realmConfig.getUserStoreProperty(LDAPConstants.EMPTY_ROLES_ALLOWED))) {

            EMPTY_ROLES_ALLOWED = true;
View Full Code Here

            DatabaseUtil.rollBack(dbConnection);

            String msg = "Error in adding tenant with " + "tenant domain: " + tenant.getDomain()
                    + ".";
            log.error(msg);
            throw new UserStoreException(e);
        } finally {
            DatabaseUtil.closeAllConnections(dbConnection, result, prepStmt);
        }
        return id;
    }
View Full Code Here

            DatabaseUtil.rollBack(dbConnection);
           
      String msg = "Error in updating tenant with " + "tenant domain: "
          + tenant.getDomain() + ".";
      log.error(msg);
      throw new UserStoreException(e);
    } finally {
            DatabaseUtil.closeAllConnections(dbConnection, prepStmt);
    }
  }
View Full Code Here

            DatabaseUtil.rollBack(dbConnection);

            String msg = "Error in getting the tenant with " + "tenant id: " + tenantId + ".";
            log.error(msg);
            throw new UserStoreException(e);
        } finally {
            DatabaseUtil.closeAllConnections(dbConnection, result, prepStmt);
        }
    return tenant;
  }
View Full Code Here

            DatabaseUtil.rollBack(dbConnection);
           
      String msg = "Error in getting the tenants.";
      log.error(msg);
      throw new UserStoreException(e);
    } finally {
            DatabaseUtil.closeAllConnections(dbConnection, result, prepStmt);
    }
    return tenantList.toArray(new Tenant[tenantList.size()]);
  }
View Full Code Here

            DatabaseUtil.rollBack(dbConnection);

      String msg = "Error in getting the tenant with " + "tenant id: "
          + tenantId + ".";
      log.error(msg);
      throw new UserStoreException(e);
    } finally {
      DatabaseUtil.closeAllConnections(dbConnection, result, prepStmt);
    }
   
    if(domain != null) {
View Full Code Here

            OMElement tenantMgtConfigElement = getTenantMgtConfigElement();
            return buildTenantMgtConfiguration(tenantMgtConfigElement);
        } catch (XMLStreamException e) {
            String error_Message = "Error in reading tenant-mgt.xml";
            log.error(error_Message);
            throw new UserStoreException(error_Message);
        } catch (IOException e) {
            String error_Message = "Error in reading tenant-mgt.xml file.";
            log.error(error_Message);
            throw new UserStoreException(error_Message);
        }
    }
View Full Code Here

            DatabaseUtil.rollBack(dbConnection);

      String msg = "Error in getting the tenant id with "
          + "tenant domain: " + domain + ".";
      log.error(msg);
      throw new UserStoreException(e);
    } finally {
            DatabaseUtil.closeAllConnections(dbConnection, result, prepStmt);
    }
    return id;
  }
View Full Code Here

TOP

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

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.