Examples of execute()


Examples of com.esri.gpt.catalog.harvest.jobs.HjGetNextRequest.execute()

* @return task descriptor or <code>null</code> if no more tasks
* @throws SQLException if accessing database fails
*/
public Task next(RequestContext context) throws SQLException {
  HjGetNextRequest request = new HjGetNextRequest(context);
  request.execute();
  HjRecords records = request.getQueryResult().getRecords();
  if (records.size() != 1) {
    return null;
  }
  return new Task(records.get(0));
View Full Code Here

Examples of com.esri.gpt.catalog.harvest.jobs.HjLoadAllRequest.execute()

* @return all tasks
*/
public Task[] all(RequestContext context) {
  try {
    HjLoadAllRequest request = new HjLoadAllRequest(context);
    request.execute();
    ArrayList<Task> tasks = new ArrayList<Task>();
    for (HjRecord record : request.getQueryResult().getRecords()) {
      tasks.add(new Task(record));
    }
    return tasks.toArray(new Task[tasks.size()]);
View Full Code Here

Examples of com.esri.gpt.catalog.harvest.jobs.HjResetRunningRequest.execute()

   */
  private void resetRunning() {
    RequestContext context = RequestContext.extract(null);
    try {
      HjResetRunningRequest recover = new HjResetRunningRequest(context);
      recover.execute();
      if (taskQueue!=null) {
        taskQueue.notifyChange();
      }
    } catch (SQLException ex) {
      LOGGER.log(Level.SEVERE, "[SYNCHRONIZER] Error recovering from the previous failout", ex);
View Full Code Here

Examples of com.esri.gpt.catalog.harvest.jobs.HjWithdrawRequest.execute()

*/
private void withdrawAll(String[] uuids) throws SQLException {
  RequestContext context = RequestContext.extract(null);
  try {
    HjWithdrawRequest withdrawRequest = new HjWithdrawRequest(context, uuids);
    withdrawRequest.execute();
  } finally {
    context.onExecutionPhaseCompleted();
  }
}

View Full Code Here

Examples of com.esri.gpt.catalog.harvest.repository.HrCompleteUpdateRequest.execute()

        throw new ServletException("409: Document was empty.");
      }
    } else {
      try {
        HrCompleteUpdateRequest req = new HrCompleteUpdateRequest(context, record);
        req.execute();
        response.setStatus(HttpServletResponse.SC_CREATED);
      } catch (HrAssertUrlException e) {
        throw new ServletException("409: Duplicated resource URL.");
      } catch (ValidationException e) {
        String sMsg = e.toString();
View Full Code Here

Examples of com.esri.gpt.catalog.harvest.repository.HrDeleteRequest.execute()

                    "catalog.harvest.manage.message.err.selection");
          }
          break;
        case Delete:
          HrDeleteRequest request = new HrDeleteRequest(context, aUuids);
          request.execute();
          int nRecordsDeleted =
                  request.getActionResult().getNumberOfRecordsModified();
          if (aUuids.length > 0) {
            extractMessageBroker().addSuccessMessage(
                    "catalog.harvest.manage.message.deleted",
View Full Code Here

Examples of com.esri.gpt.catalog.harvest.repository.HrHarvestRequest.execute()

private void executeSynchronization(ActionEvent event, RequestContext context, MmdActionCriteria actionCriteria) throws Exception {
  StringSet uuids = actionCriteria.getSelectedRecordIdSet();
  String[] aUuids = uuids.toArray(new String[uuids.size()]);
  HrHarvestRequest hrvFullRequest =
    new HrHarvestRequest(context,aUuids,HjRecord.JobType.Now,new HrCriteria(),new HrResult());
  hrvFullRequest.execute();
  if (hrvFullRequest.getActionResult().getNumberOfRecordsModified() > 0) {
    extractMessageBroker().addSuccessMessage(
      "catalog.harvest.manage.message.synchronized",
      new Object[]{Integer.toString(hrvFullRequest.getActionResult().
                   getNumberOfRecordsModified())
View Full Code Here

Examples of com.esri.gpt.catalog.harvest.repository.HrSelectRequest.execute()

    while (rs.next()) {
      String harvestUuid = Val.chkStr(rs.getString(2));
      if (UuidUtil.isUuid(harvestUuid)) {
        HrSelectRequest harvestRequest =
          new HrSelectRequest(getRequestContext(), harvestUuid);
        harvestRequest.execute();
        HrRecords harvestRecords = harvestRequest.getQueryResult().getRecords();
        if (harvestRecords.size()>=1) {
          HjRecord record = new HjRecord(harvestRecords.get(0));
          n = 1;
          record.setUuid(rs.getString(n++));
View Full Code Here

Examples of com.esri.gpt.catalog.harvest.repository.HrUpdateLastSyncDate.execute()

   
    if (isActive()) {
      // save last sync date
      unit.getRepository().setLastSyncDate(rp.getStartTime());
      HrUpdateLastSyncDate updLastSyncDate = new HrUpdateLastSyncDate(context, unit.getRepository());
      updLastSyncDate.execute();
    }
  } catch (Exception ex) {
    rp.setException(ex);
    unit.setCleanupFlag(false);
    LOGGER.log(Level.FINEST, "[SYNCHRONIZER] Failed harvesting through unit: {0}. Cause: {1}", new Object[]{unit, ex.getMessage()});
View Full Code Here

Examples of com.esri.gpt.catalog.lucene.LuceneQueryAdapter.execute()

    boolean returnIdsOnly = Val.chkBool(Val.chkStr(request.getParameter("returnIdsOnly")), false);
    if (returnIdsOnly) {
      startRecord = 1;
      query.getFilter().setMaxRecords(1);
      LuceneQueryAdapter tmp = new LuceneQueryAdapter();
      tmp.execute(context, query);
      query.getFilter().setMaxRecords(query.getResult().getNumberOfHits());
    }

    query.getFilter().setStartRecord(startRecord);
    LuceneQueryAdapter lqa = new LuceneQueryAdapter() {
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.