Package org.openmeetings.app.persistence.beans.basic

Examples of org.openmeetings.app.persistence.beans.basic.LdapConfig


        currentClient = clientListManager
            .getClientByStreamId(current.getClient().getId());

        // LDAP Loggedin Users cannot use the permanent Login Flag

        LdapConfig ldapConfig = ldapConfigDao.getLdapConfigById(ldapConfigId);

        String ldapLogin = usernameOrEmail;
        if (ldapConfig.getAddDomainToUserName() != null
            && ldapConfig.getAddDomainToUserName()) {
          ldapLogin = usernameOrEmail + "@" + ldapConfig.getDomain();
        }

        o = ldapLoginManagement.doLdapLogin(ldapLogin,
            Userpass, currentClient, SID,
            ldapConfig.getConfigFileName());
      } else {

        currentClient = clientListManager.getClientByStreamId(current.getClient().getId());

        o = userManagement.loginUser(SID, usernameOrEmail, Userpass,
View Full Code Here


   */
  public boolean getLdapPwdSynchStatus(Long ldapConfigId) { // TIBO
    // Retrieve Configuration Data
    HashMap<String, String> configData;

    LdapConfig ldapConfig = ldapConfigDao.getLdapConfigById(ldapConfigId);

    try {
      configData = getLdapConfigData(ldapConfig.getConfigFileName());
    } catch (Exception e) {
      log.error("Error on getLdapPwdSynchStatus : " + e.getMessage());
      return true;
    }

View Full Code Here

            String domain = unformatString(ldapconfigObject
                .element("domain").getText());
            Boolean isActive = importBooleanType(unformatString(ldapconfigObject
                .element("isActive").getText()));

            LdapConfig ldapConfig = new LdapConfig();
            ldapConfig.setName(name);
            ldapConfig.setConfigFileName(configFileName);
            ldapConfig.setAddDomainToUserName(addDomainToUserName);
            ldapConfig.setDomain(domain);
            ldapConfig.setIsActive(isActive);

            ldapConfigsList.add(ldapConfig);

          }
View Full Code Here

 
  public Long addLdapConfig(String name, Boolean addDomainToUserName, String configFileName,
      String domain, Long insertedby, Boolean isActive) {
    try {
     
      LdapConfig ldapConfig = new LdapConfig();
      ldapConfig.setAddDomainToUserName(addDomainToUserName);
      ldapConfig.setConfigFileName(configFileName);
      ldapConfig.setDeleted("false");
      ldapConfig.setDomain(domain);
      ldapConfig.setIsActive(isActive);
      ldapConfig.setName(name);
      ldapConfig.setInserted(new Date());
      if (insertedby != null) {
        log.debug("addLdapConfig :1: "+usersDao.getUser(insertedby));
        ldapConfig.setInsertedby(usersDao.getUser(insertedby));
      }
     
      log.debug("addLdapConfig :2: "+insertedby);
     
      ldapConfig = em.merge(ldapConfig);
      Long ldapConfigId = ldapConfig.getLdapConfigId();
     
      if (ldapConfigId > 0) {
        return ldapConfigId;
      } else {
        throw new Exception("Could not store SOAPLogin");
View Full Code Here

 
  public Long updateLdapConfig(Long ldapConfigId, String name, Boolean addDomainToUserName,
      String configFileName, String domain, Long updatedby, Boolean isActive) {
    try {
     
      LdapConfig ldapConfig = this.getLdapConfigById(ldapConfigId);
     
      if (ldapConfig == null) {
        return -1L;
      }
     
      ldapConfig.setAddDomainToUserName(addDomainToUserName);
      ldapConfig.setConfigFileName(configFileName);
      ldapConfig.setDeleted("false");
      ldapConfig.setDomain(domain);
      ldapConfig.setIsActive(isActive);
      ldapConfig.setName(name);
      ldapConfig.setUpdated(new Date());
      if (updatedby != null) {
        log.debug("updateLdapConfig :1: "+usersDao.getUser(updatedby));
        ldapConfig.setUpdatedby(usersDao.getUser(updatedby));
      }
     
      log.debug("updateLdapConfig :2: "+updatedby);
     
      ldapConfig = em.merge(ldapConfig);
      ldapConfigId = ldapConfig.getLdapConfigId();
     
      return ldapConfigId;
     
    } catch (Exception ex2) {
      log.error("[updateLdapConfig]: ",ex2);
View Full Code Here

     
      TypedQuery<LdapConfig> query = em.createQuery(hql, LdapConfig.class);
      query.setParameter("ldapConfigId", ldapConfigId);
      query.setParameter("deleted", "false");
 
      LdapConfig ldapConfig = null;
      try {
        ldapConfig = query.getSingleResult();
        } catch (NoResultException ex) {
        }
     
View Full Code Here

 
 
  public Long deleteLdapConfigById(Long ldapConfigId) {
    try {
     
      LdapConfig ldapConfig = this.getLdapConfigById(ldapConfigId);
     
      if (ldapConfig == null) {
        return null;
      }
     
      ldapConfig = em.find(LdapConfig.class, ldapConfig.getLdapConfigId());
      em.remove(ldapConfig);
     
      return ldapConfigId;
     
    } catch (Exception ex2) {
View Full Code Here

    Element ldapconfigs = root.addElement("ldapconfigs");

    for (Iterator<LdapConfig> it = ldapConfigList.iterator(); it.hasNext();) {

      LdapConfig ldapC = it.next();

      Element ldapconfig = ldapconfigs.addElement("ldapconfig");

      ldapconfig.addElement("name").addCDATA(
          formatString("" + ldapC.getName()));
      ldapconfig.addElement("configFileName").addCDATA(
          formatString("" + ldapC.getConfigFileName()));
      ldapconfig.addElement("addDomainToUserName").addCDATA(
          formatString("" + ldapC.getAddDomainToUserName()));
      ldapconfig.addElement("domain").addCDATA(
          formatString("" + ldapC.getDomain()));
      ldapconfig.addElement("isActive").addCDATA(
          formatString("" + ldapC.getIsActive()));

    }

    return document;
  }
View Full Code Here

TOP

Related Classes of org.openmeetings.app.persistence.beans.basic.LdapConfig

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.