Package com.esri.gpt.catalog.management

Examples of com.esri.gpt.catalog.management.MmdActionRequest


      ArrayList<String> defaultAcl = new ArrayList<String>();
      defaultAcl.add(getActionCriteria().getToggleMetadataAccessPolicy());
      criteria.getActionCriteria().setMetadataAccessPolicy(defaultAcl);
    }

    MmdActionRequest request = new MmdActionRequest(context,publisherForAction,criteria,getResult());
    if (!applyToAll) {
      request.execute();
    } else {
      if (!_queryCriteriaForAction.getIsEmpty()) {
        request.execute(_queryCriteriaForAction);
      }
    }

    // set the success message
    int nModified = getActionResult().getNumberOfRecordsModified();
    if (nModified > 0) {
      String sKey = "catalog.publication.manageMetadata.action.success";
      if (actionCriteria.getActionKey().equalsIgnoreCase("delete")) {
        sKey += ".delete";
      }
      String[] args = new String[1];
      args[0] = "" + nModified;
      msgBroker.addSuccessMessage(sKey, args);
    }
    if (request.hadUnalteredDraftDocuments()) {
      msgBroker.addErrorMessage("catalog.publication.manageMetadata.action.err.draftUnaltered");
    }
  }
}
View Full Code Here


    }
    if (actionCriteria.getSelectedRecordIdSet().size() > 0) {
      MmdResult result = new MmdResult();
      MmdCriteria criteria = new MmdCriteria();
      criteria.setActionCriteria(actionCriteria);
      MmdActionRequest actionRequest = new MmdActionRequest(
          context.getRequestContext(),publisher,criteria,result);
      actionRequest.execute();
      int numDeleted = result.getActionResult().getNumberOfRecordsModified();
      tSummary.setTotalDeleted(tSummary.getTotalDeleted() + numDeleted);
      // TODO: need some logging
      //LOGGER.finer(result.getActionResult().getNumberOfRecordsModified()+" document(s) deleted.");
    }
View Full Code Here

    actionCriteria.setActionKey("delete");
    actionCriteria.getSelectedRecordIdSet().add(uuid);
    MmdResult result = new MmdResult();
    MmdCriteria criteria = new MmdCriteria();
    criteria.setActionCriteria(actionCriteria);
    MmdActionRequest actionRequest = new MmdActionRequest(context,publisher,criteria,result);
    actionRequest.execute();
    LOGGER.finer(result.getActionResult().getNumberOfRecordsModified()+" document(s) deleted.");
  }
View Full Code Here

TOP

Related Classes of com.esri.gpt.catalog.management.MmdActionRequest

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.