Examples of ReasonType


Examples of com.google.visualization.datasource.base.ReasonType

     */
    @Override
    public CharSequence error(final DataSourceRequest request, final ResponseStatus status) {
        // Get the responseStatus details.
        StatusType type = status.getStatusType();
        ReasonType reason = status.getReasonType();
        String detailedMessage = status.getDescription();

        // Create an xml document with head and an empty body.
        Document document = createDocument();
        Element bodyElement = appendHeadAndBody(document);

        // Populate the xml document.
        Element oopsElement = document.createElement("h3");
        oopsElement.setTextContent("Oops, an error occured.");
        bodyElement.appendChild(oopsElement);

        if(type != null) {
            String text = "Status: " + type.lowerCaseString();
            appendSimpleText(document, bodyElement, text);
        }

        if(reason != null) {
            String text = "Reason: " + reason.getMessageForReasonType(null);
            appendSimpleText(document, bodyElement, text);
        }

        if(detailedMessage != null) {
            String text = "Description: " + sanitizeDetailedMessage(detailedMessage);
View Full Code Here

Examples of com.google.visualization.datasource.base.ReasonType

   * @return A simple html for the given responseStatus.
   */
  public static CharSequence renderHtmlError(ResponseStatus responseStatus) {
    // Get the responseStatus details.
    StatusType status = responseStatus.getStatusType();
    ReasonType reason = responseStatus.getReasonType();
    String detailedMessage = responseStatus.getDescription();

    // Create an xml document with head and an empty body.
    Document document = createDocument();
    Element bodyElement = appendHeadAndBody(document);

    // Populate the xml document.
    Element oopsElement = document.createElement("h3");
    oopsElement.setTextContent("Oops, an error occured.");
    bodyElement.appendChild(oopsElement);

    if (status != null) {
      String text = "Status: " + status.lowerCaseString();
      appendSimpleText(document, bodyElement, text);
    }

    if (reason != null) {
      String text = "Reason: " + reason.getMessageForReasonType(null);
      appendSimpleText(document, bodyElement, text);
    }

    if (detailedMessage != null) {
      String text = "Description: " + sanitizeDetailedMessage(detailedMessage);
View Full Code Here

Examples of org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.ReasonType

        private EventResult handleInaccessibleChangeEvent(
                final ResourceLifecycleEvent event)
        {
            final IResource res = event.getAffectedResource();
            final ReasonType reasonType = event.getReasonType();
            ChangeType changeType = null;
            if (reasonType == ReasonType.RESOURCE_PROJECT_CLOSED)
            {
                changeType = ChangeType.VIEW_DEFN_PROJECT_CLOSED;
            }
View Full Code Here

Examples of org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.ReasonType

        @Override
        protected boolean isInteresting(final ResourceLifecycleEvent event)
        {
            boolean isInteresting = false;
            final ReasonType reasonType = event.getReasonType();
            switch (event.getEventType())
            {
                case RESOURCE_ADDED:
                {
                    final IResource resource = getResource();
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.