Package com.google.enterprise.connector.spi

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


    ous = new Vector<String>(10);
    String[] ary = canonicalName.split("/");
    for (int i = 0; i < ary.length; i++) {
      String[] pair = ary[i].split("=");
      if (pair.length != 2) {
        throw new RepositoryException("Invalid Notes name: " + canonicalName);
      }
      if ("CN".equalsIgnoreCase(pair[0])) {
        commonName = pair[1].trim();
      } else if ("OU".equalsIgnoreCase(pair[0])) {
        ous.add(pair[1]);
      } else if ("O".equalsIgnoreCase(pair[0])) {
        organization = pair[1];
      }
    }
    if (commonName == null) {
      throw new RepositoryException(
              "Failed to compute common name: " + canonicalName);
    }
    initAbbreviateName();
   
    if (shortName == null) {
View Full Code Here


      notesDocManager.deleteDocument(unid, repid);
      fileNames = notesDocManager.getAttachmentIds(conn, unid, repid);
      assertEquals(0, fileNames.size());
    } catch (SQLException e) {
      throw new RepositoryException(e);
    } finally {
      if (conn != null) {
        notesDocManager.releaseDatabaseConnection(conn);
      }
    }
View Full Code Here

      conn = notesDocManager.getDatabaseConnection();
      for(NotesDocument doc : docs){
        notesDocManager.addIndexedDocument(doc, conn);
      }
    } catch (Exception e) {
      throw new RepositoryException(e);
    } finally {
      notesDocManager.releaseDatabaseConnection(conn);
    }
  }
View Full Code Here

        String result = formula.substring(start + 1, end);
        Vector<String> returnResult = new Vector<String>();
        returnResult.add(result);
        return returnResult;
      } else {
        throw new RepositoryException(formula);
      }
    }

    // Return a result meaning "true";
    Vector<Integer> result = new Vector<Integer>();
View Full Code Here

   try {
     SimpleDateFormat format = new SimpleDateFormat("M/d/yyyy");
     Date d = format.parse(date);
     return new NotesDateTimeMock(d);
   } catch (ParseException e) {
     throw new RepositoryException(e);
   }
  }
View Full Code Here

        conn = getDatabaseConnection();
        Util.executeStatements(conn, true, alterDdl.toString());
        LOGGER.fine("Alter attachment_unid column in table "
            + attachmentsTableName);
      } catch (SQLException e) {
        throw new RepositoryException("Failed to alter attachment_unid column"
            + " in table " + attachmentsTableName, e);
      } finally {
        releaseDatabaseConnection(conn);
      }
    }
View Full Code Here

    LOGGER.entering(CLASS_NAME, METHOD);
    boolean isUpdated = false;

    //Validate connection, auto commit and indexed document
    if (connection == null)
      throw new RepositoryException("Database connection is null");

    if (!setAutoCommit(connection, false)) {
      throw new RepositoryException("Failed to disable auto commit");
    }

    if (docIndexed == null)
      return isUpdated;
View Full Code Here

      rs.close();
      pstmt.close();
    } catch (SQLException e) {
      LOGGER.logp(Level.FINE, CLASS_NAME, METHOD,
          "Failed to query " + indexedTableName + "table");
      throw new RepositoryException(e);
    } finally {
      if (conn != null) {
        releaseDatabaseConnection(conn);
      }
    }
View Full Code Here

      rs.close();
      pstmt.close();
    } catch (SQLException e) {
      LOGGER.logp(Level.FINE, CLASS_NAME, METHOD, "Failed to lookup " + unid +
          " in " + indexedTableName + " table");
      throw new RepositoryException(e);
    }
    LOGGER.exiting(CLASS_NAME, METHOD);

    return hasItem;
  }
View Full Code Here

    final String METHOD = "deleteDocument";
    LOGGER.entering(CLASS_NAME, METHOD);

    //Validate database connection and auto commit
    if (conn == null) {
      throw new RepositoryException("Database connection is not initialized");
    }
    if (!setAutoCommit(conn, false)) {
      throw new RepositoryException("Failed to disable auto commit");
    }

    boolean isDeleted = false;
    try {
      //Delete readers
View Full Code Here

TOP

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

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.