Package com.google.enterprise.connector.spi

Examples of com.google.enterprise.connector.spi.RepositoryLoginException


        sessMgerSessions.put(docbase, currentSession);
      }
      allSessions.put(currentSession, new Throwable("New session created"));
      return currentSession;
    } else {
      throw new RepositoryLoginException("newSession(" + docbase
          + ") called for docbase " + docbase
          + " without setting any credentials prior to this call");
    }
  }
View Full Code Here


    Credentials creds = null;
    if (iLI != null) {
      creds = new SimpleCredentials(iLI.getUser(), iLI.getPassword()
          .toCharArray());
    } else {
      throw new RepositoryLoginException("No credentials defined for "
          + db);
    }

    try {
      MockJcrSession sess = (MockJcrSession) repo.login(creds);
      if (sess != null) {
        return new MockDmSession(this, repo, sess, db);
      } else {
        return null;
      }
    } catch (LoginException e) {
      throw new RepositoryLoginException(e);
    }
  }
View Full Code Here

        IDfLoginInfo idfLoginInfo = dfSessionManager.getIdentity(docbase);
        logger.finer("Session for user: " + idfLoginInfo.getUser()
            + ": " + dfSession + " (id=" + dfSession.getSessionId() + ')');
      }
    } catch (DfIdentityException e) {
      throw new RepositoryLoginException(e);
    } catch (DfAuthenticationException e) {
      throw new RepositoryLoginException(e);
    } catch (DfPrincipalException e) {
      throw new RepositoryLoginException(e);
    } catch (DfServiceException e) {
      throw new RepositoryException(e);
    } catch (DfException e) {
      throw new RepositoryException(e);
    }
View Full Code Here

    logger.finer("Set identity: " + identity.getUser());
    IDfLoginInfo idfLoginInfo = dctmLoginInfo.getIdfLoginInfo();
    try {
      dfSessionManager.setIdentity(docbase, idfLoginInfo);
    } catch (DfServiceException e) {
      throw new RepositoryLoginException(e);
    }
  }
View Full Code Here

      RepositoryException {
    IDfSession dfSession = null;
    try {
      dfSession = dfSessionManager.newSession(docbase);
    } catch (DfIdentityException e) {
      throw new RepositoryLoginException(e);
    } catch (DfAuthenticationException e) {
      throw new RepositoryLoginException(e);
    } catch (DfPrincipalException e) {
      throw new RepositoryLoginException(e);
    } catch (DfServiceException e) {
      throw new RepositoryException(e);
    } catch (NoClassDefFoundError e) {
      throw new RepositoryException(e);
    }
View Full Code Here

    try {
      for (String dc : domainComponents) {
        domainRdns.add(new Rdn("dc", dc));
      }
    } catch (InvalidNameException e) {
      throw new RepositoryLoginException("Invalid domain " + userDomain, e);
    }
    Collections.reverse(domainRdns); // RDN lists are in reverse order.
    return new LdapName(domainRdns);
  }
View Full Code Here

    try {
      return executeQuery(
          "select user_name from dm_user where user_login_name = '"
          + mockSess.getUserID() + "'");
    } catch (SQLException e) {
      throw new RepositoryLoginException("Database error", e);
    }
  }
View Full Code Here

        password = FnCredentialMap.getUserCred(username);
      }
    }
    if (password == null) {
      logger.log(Level.WARNING, "Password is NULL");
      throw new RepositoryLoginException();
    }

    UserContext uc = UserContext.get();
    try {
      Subject s = UserContext.createSubject(
          ((FnConnection) conn).getConnection(), username, password,
          "FileNetP8");
      uc.pushSubject(s);
      User u = Factory.User.fetchCurrent(((FnConnection) conn).getConnection(),
          null);
      logger.info("User: " + u.get_Name() + " is authenticated");

      FnCredentialMap.putUserCred(username, password);
      return new FnUser(u);
    } catch (Throwable e) {
      logger.log(Level.WARNING,
          "Unable to GET connection or user is not authenticated");
      throw new RepositoryLoginException(e);
    }
  }
View Full Code Here

      try {
        os = getRawObjectStore(shortName, userPassword,
            ((FnConnection) conn).getConnection(), objectStoreName);
      } catch (Throwable th) {
        logger.log(Level.SEVERE, "Problems while connecting to FileNet object store. Got Exception: ", th);
        throw new RepositoryLoginException(e);
      }
    }
    return new FnObjectStore(os, conn, userName, userPassword);
  }
View Full Code Here

          sessions.put(simpleCredentials, new JcrSession(session));
        }
      }
      return sessions.get(simpleCredentials);
    } catch (javax.jcr.LoginException e) {
      throw new RepositoryLoginException(e);
    } catch (javax.jcr.RepositoryException e) {
      throw new RepositoryException(e);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.spi.RepositoryLoginException

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.