Package com.esri.gpt.framework.collection

Examples of com.esri.gpt.framework.collection.StringSet


* Constructs with an authenticator if crendentials are required by the mail server.
* @param authenticator the authenticator
*/
public MailRequest(Authenticator authenticator) {
  _authenticator = authenticator;
  setRecipients(new StringSet());
}
View Full Code Here


                String incomingToAddress) {
  setSmtpHost(smtpHost);
  setSmtpPort(Val.chkInt(smtpPort,-1));
 
  // tokenize the addresses, try to ensure that valid values have been set
  StringSet ssFrom = new StringSet();
  StringSet ssTo = new StringSet();
  ssFrom.addDelimited(outgoingFromAddress);
  ssTo.addDelimited(incomingToAddress);
  if ((ssFrom.size() > 0) && (ssTo.size() > 0)) {
    setOutgoingFromAddress(ssFrom.iterator().next());
    setIncomingToAddress(incomingToAddress);
  } else if (ssFrom.size() > 0) {
    setOutgoingFromAddress(ssFrom.iterator().next());
    setIncomingToAddress(outgoingFromAddress);
  } else if (ssTo.size() > 0) {
    setOutgoingFromAddress(ssTo.iterator().next());
    setIncomingToAddress(incomingToAddress);
  }
}
View Full Code Here

    // get action
    HeActionCriteria.HistoryAction action =
      getCriteria().getActionCriteria().getAction();

    StringSet uuids =
      getCriteria().getActionCriteria().getSelectedRecordIdSet();

    String[] aUuids = uuids.toArray(new String[uuids.size()]);

    switch (action) {
      case ViewReport:
        if (aUuids.length == 1) {
          getCriteria().getActionCriteria().setEventUuid(aUuids[0]);
View Full Code Here

* @param context the context associated with the active request
* @param actionCriteria the criteria for the action
* @throws Exception if an exception occurs
*/
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(
View Full Code Here

* @param context the context associated with the active request
* @param actionCriteria the criteria for the action
* @throws Exception if an exception occurs
*/
private void executeCancelSynchronization(ActionEvent event, RequestContext context, MmdActionCriteria actionCriteria) throws Exception {
  StringSet uuids = actionCriteria.getSelectedRecordIdSet();
  String[] aUuids = uuids.toArray(new String[uuids.size()]);
  int canceledCount = 0;
  for (String uuid : aUuids) {
    if (context.getApplicationContext().getHarvestingEngine().cancel(context, uuid)) {
      canceledCount++;
    }
View Full Code Here

* @param context the context associated with the active request
* @param actionCriteria the criteria for the action
* @throws Exception if an exception occurs
*/
private void executeShowHarvested(ActionEvent event, RequestContext context, MmdActionCriteria actionCriteria) throws Exception {
  StringSet uuids = actionCriteria.getSelectedRecordIdSet();
  String[] aUuids = uuids.toArray(new String[uuids.size()]);
  if (aUuids.length>0) {
      getCriteria().getQueryCriteria().reset();
      getCriteria().getQueryCriteria().setSiteUuid(aUuids[0]);
  }
}
View Full Code Here

* @param context the context associated with the active request
* @param actionCriteria the criteria for the action
* @throws Exception if an exception occurs
*/
private void executeFind(ActionEvent event, RequestContext context, MmdActionCriteria actionCriteria) throws Exception {
  StringSet uuids = actionCriteria.getSelectedRecordIdSet();
  String[] aUuids = uuids.toArray(new String[uuids.size()]);
  if (aUuids.length>0) {
      getCriteria().getQueryCriteria().reset();
      getCriteria().getQueryCriteria().setUuid(aUuids[0]);
  }
}
View Full Code Here

    DiscoveryQuery query = this.getDiscoveryQuery();
    String elementSetType = qOptions.getElementSetType();
    if (elementSetType == null) {
     
      boolean isDublinCore = qOptions.isDublinCoreResponse();
      StringSet elementNames = qOptions.getElementNames();
      boolean hasElementNames = (elementNames != null) && (elementNames.size() > 0);
      if (isDublinCore && hasElementNames) {
        AliasedDiscoverables aliased = this.queryables.getAllAliased();
        query.setReturnables(new Discoverables());
        for (String elementName: elementNames) {
          Discoverable discoverable = aliased.get(elementName);
View Full Code Here

    if (nlActions != null) {
      for (int i=0;i<nlActions.getLength();i++) {
        Node ndAction = nlActions.item(i);
        String typeName = xpath.evaluate("@typeName",ndAction);
        String handle = xpath.evaluate("@handle",ndAction);
        StringSet ids = new StringSet();
        tOptions.setDeletionIDs(ids);
      
        // find the constraint node
        locator = "csw:Constraint";
        Node ndConstraint = (Node)xpath.evaluate(locator,ndAction,XPathConstants.NODE);
        if (ndConstraint == null) {
          String msg = "The parameter was missing - "+locator;
          throw new OwsException(OwsException.OWSCODE_MissingParameterValue,locator,msg);
        }
       
        // constraint version
        //String cVersion = xpath.evaluate("@version",ndConstraint);
       
        // csw:CqlText
        locator = "csw:CqlText";
        Node ndCql = (Node)xpath.evaluate(locator,ndConstraint,XPathConstants.NODE);
        if (ndCql != null) {
          //String cql = Val.chkStr(ndCql.getTextContent());     
          String msg = "Delete transactions based upon "+locator+" are not supported.";
          throw new OwsException(OwsException.OWSCODE_OperationNotSupported,locator,msg);
        } else {
       
          // ogc:Filter
          locator = "ogc:Filter";
          Node ndFilter = (Node)xpath.evaluate(locator,ndConstraint,XPathConstants.NODE);
          if (ndFilter == null) {
            String msg = "The parameter was missing - "+locator;
            throw new OwsException(OwsException.OWSCODE_MissingParameterValue,locator,msg);
          } else {
            this.parseDeletionIds(ndFilter,xpath,ids);
          }
        }
         
        // execute the delete
        if (ids.size() > 0) {
          this.executeDelete(context,publisher,typeName,handle,ids.toArray(new String[0]));
        } else {
          String msg = "No Ids were specified for deletion.";
          throw new OwsException(msg);
        }
      }
View Full Code Here

        }
      }
    }
   
    // remove sections that were not requested
    StringSet sections = cOptions.getSections();
    if ((sections != null) && (sections.size() > 0)) {
      HashMap<String,String> keep = new HashMap<String,String>();
      for (String section: sections) {
        if (section.equalsIgnoreCase("ServiceIdentification")) {
          keep.put(CswNamespaces.URI_OWS+"#ServiceIdentification","");
        } else if (section.equalsIgnoreCase("ServiceProvider")) {
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.collection.StringSet

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.