Package com.esri.gpt.framework.jsf

Examples of com.esri.gpt.framework.jsf.MessageBroker.addErrorMessage()


    MmdActionCriteria actionCriteria, Publisher publisher, boolean applyToAll) throws Exception {
  MessageBroker msgBroker = extractMessageBroker();

  // check to ensure that records were selected
  if (actionCriteria.getSelectedRecordIdSet().size() == 0 && applyToAll==false) {
    msgBroker.addErrorMessage("catalog.publication.manageMetadata.action.err.noneSelected");
  } else {

    // check the publisher
    Publisher publisherForAction = publisher;
    if (!publisher.getIsAdministrator()) {
View Full Code Here


      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 (sXml.startsWith(sbom)) {
        sXml = Val.chkStr(sXml.substring(1));
      }

      if (sFileName.length() == 0) {
        msgBroker.addErrorMessage("publication.validateMetadata.err.file.required");
      } else if (sXml.length() == 0) {
        msgBroker.addErrorMessage("publication.validateMetadata.err.file.empty");
      } else {

        //String sOut = "C:/xfer/test19139.xml";
View Full Code Here

      }

      if (sFileName.length() == 0) {
        msgBroker.addErrorMessage("publication.validateMetadata.err.file.required");
      } else if (sXml.length() == 0) {
        msgBroker.addErrorMessage("publication.validateMetadata.err.file.empty");
      } else {

        //String sOut = "C:/xfer/test19139.xml";
        //com.esri.gpt.framework.xml.XmlIoUtil.writeXmlFile(sXml,new java.io.File(sOut));
View Full Code Here

    // there seems to be no good exception related to a file that is simply
    // not an XML file, a message containing "content is not allowed in prolog"
    // seems to be the best guess at the moment
    String sMsg = e.toString().toLowerCase();
    if (sMsg.indexOf("content is not allowed in prolog") != -1) {
      msgBroker.addErrorMessage("publication.validateMetadata.err.file.prolog");
    } else {
      throw e;
    }
  }
}
View Full Code Here

    }
   
  } catch (Throwable t) {
    MessageBroker messageBroker =
      new FacesContextBroker().extractMessageBroker();
    messageBroker.addErrorMessage(t);
    LogUtil.getLogger().log(Level.SEVERE,"Exception raised.",t);
  }
}
}
View Full Code Here

    }

  } catch (Throwable t) {
    MessageBroker messageBroker =
      new FacesContextBroker().extractMessageBroker();
    messageBroker.addErrorMessage(t);
    LogUtil.getLogger().log(Level.SEVERE, "Exception raised.", t);
  }
}

private String getStringAttribute(String attrName) {
View Full Code Here

    FacesMessage message = new FacesMessage();
    message.setSeverity(FacesMessage.SEVERITY_ERROR);
    message.setSummary(e.getMessage());
    message.setDetail(e.getMessage());
    broker.addMessage(message);
    broker.addErrorMessage(new SearchException(""));
    LOG.log(Level.WARNING, "Could not get Full Metadata Url",
        e);
  } finally {
    this.onExecutionPhaseCompleted();
  }
View Full Code Here

  String sCreateSchemaKey = getCreateSchemaKey();
  setOpenSchemaKey("");
  setOpenDocumentUuid("");
  if (sCreateSchemaKey.length() == 0) {
    MessageBroker msgBroker = extractMessageBroker();
    msgBroker.addErrorMessage("publication.createMetadata.err.noSchemaSelected");
  } else {
   
    // create the new schema
    MetadataDocument document = new MetadataDocument();
    Schema schema = document.prepareForCreate(context,sCreateSchemaKey);
View Full Code Here

          FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_WARN,sFileName,null);
          msgBroker.addMessage(fm);
        }
       
        if (sFileName.length() == 0) {
          msgBroker.addErrorMessage("publication.uploadMetadata.err.file.required");
        } else if (sXml.length() == 0) {
          msgBroker.addErrorMessage("publication.uploadMetadata.err.file.empty");
        } else if (bValidateOnly) {
          ValidationRequest request = new ValidationRequest(context,sFileName,sXml);
          request.verify();
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.