Examples of HeRecord


Examples of com.esri.gpt.catalog.harvest.history.HeRecord

      // cleanup
      long deletedCount = performCleanup(context, unit, helper);
      rp.setDeletedCount(deletedCount);

      // prepare event record
      HeRecord event = new HeRecord(unit.getRepository());

      event.setHarvestedCount((int) rp.getHarvestedCount());
      event.setValidatedCount((int) rp.getValidatedCount());
      event.setPublishedCount((int) rp.getPublishedCount());
      event.setDeletedCount(deletedCount);

      // save report
      HeUpdateRequest updateReq = new HeUpdateRequest(context, event);
      updateReq.execute();
View Full Code Here

Examples of com.esri.gpt.catalog.harvest.history.HeRecord

  try {
    // start view preparation phase
    RequestContext context = onPrepareViewStarted();
    getReportViewer().setRequestContext(context);
    getReportViewer().setMsgBroker(extractMessageBroker());
    getReportViewer().setRecord(new HeRecord(new HrRecord()));

    String uuid = context.getServletRequest().getParameter("uuid");
    if (UuidUtil.isUuid(uuid)) {
      getCriteria().getActionCriteria().setEventUuid(uuid);
      setExternal(true);
    } else {
      // check authorization
      authorizeAction(context);
    }

    String sEventUuid = getCriteria().getActionCriteria().getEventUuid();

    // get uuid of harvest event uuid
    if (!UuidUtil.isUuid(sEventUuid)) {
      throw new ApplicationException();
    }

    // select and read harvest event record
    HeSelectOneRequest selectEventReq =
      new HeSelectOneRequest(context, sEventUuid);
    selectEventReq.execute();
    HeRecords events = selectEventReq.getQueryResult().getRecords();

    // get harvest event record
    HeRecord event = events.size() == 1 ? events.get(0) : null;
    if (event == null) {
      throw new ApplicationException("No requested event found.");
    }

    HrRecord repository = event.getRepository();

    getResult().getQueryResult().setUuid(repository.getUuid());
    getResult().getQueryResult().setProtocolTypeAsString(repository.getProtocol().getKind());
    getResult().getQueryResult().setName(repository.getName());
    getResult().getQueryResult().setUrl(repository.getHostUrl());
    getResult().getQueryResult().setReportUuid(event.getUuid());

    getReportViewer().setRecord(event);

  } catch (NotAuthorizedException e) {
    try {
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.