Package com.openshift.client

Examples of com.openshift.client.OpenShiftRequestException


    Link link = null;
    if (getLinks() != null) {
      link = getLinks().get(linkName);
    }
    if (link == null) {
      throw new OpenShiftRequestException(
          "Could not find link \"{0}\" in resource \"{1}\"", linkName, getClass().getSimpleName());
    }
    return link;
  }
View Full Code Here


  private void validateRequiredParameter(LinkParameter linkParameter, Parameter[] parameters)
      throws OpenShiftRequestException {
    Parameter parameter = getParameter(linkParameter.getName(), parameters);
    if (parameter == null) {
      throw new OpenShiftRequestException(
          "Requesting {0}: required request parameter \"{1}\" is missing", getHref(),
          linkParameter.getName());
    }

    if (isEmptyString(linkParameter, parameter.getValue())) {
      throw new OpenShiftRequestException("Requesting {0}: required request parameter \"{1}\" is empty",
          getHref(), linkParameter.getName());
    }
    // TODO: check valid options (still reported in a very incosistent way)
  }
View Full Code Here

  private void validateRequiredParameter(LinkParameter parameter, Map<String, Object> parameters, Link link)
      throws OpenShiftRequestException {
    if (parameters == null
        || !parameters.containsKey(parameter.getName())) {
      throw new OpenShiftRequestException(
          "Requesting {0}: required request parameter \"{1}\" is missing", link.getHref(),
          parameter.getName());
    }

    Object parameterValue = parameters.get(parameter.getName());
    if (parameterValue == null
        || isEmptyString(parameter, parameterValue)) {
      throw new OpenShiftRequestException("Requesting {0}: required request parameter \"{1}\" is empty",
          link.getHref(), parameter.getName());
    }
    // TODO: check valid options (still reported in a very incosistent way)
  }
View Full Code Here

    Link link = null;
    if (getLinks() != null) {
      link = getLinks().get(linkName);
    }
    if (link == null) {
      throw new OpenShiftRequestException(
          "Could not find link \"{0}\" in resource \"{1}\"", linkName, getClass().getSimpleName());
    }
    return link;
  }
View Full Code Here

  private void validateRequiredParameter(LinkParameter linkParameter, Parameter[] parameters)
      throws OpenShiftRequestException {
    Parameter parameter = getParameter(linkParameter.getName(), parameters);
    if (parameter == null) {
      throw new OpenShiftRequestException(
          "Requesting {0}: required request parameter \"{1}\" is missing", getHref(),
          linkParameter.getName());
    }

    if (isEmptyString(linkParameter, parameter.getValue())) {
      throw new OpenShiftRequestException("Requesting {0}: required request parameter \"{1}\" is empty",
          getHref(), linkParameter.getName());
    }
    // TODO: check valid options (still reported in a very incosistent way)
  }
View Full Code Here

    Link link = null;
    if (getLinks() != null) {
      link = getLinks().get(linkName);
    }
    if (link == null) {
      throw new OpenShiftRequestException(
          "Could not find link \"{0}\" in resource \"{1}\"", linkName, getClass().getSimpleName());
    }
    return link;
  }
View Full Code Here

TOP

Related Classes of com.openshift.client.OpenShiftRequestException

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.