Examples of ApiException


Examples of io.lumify.web.clientapi.codegen.ApiException

            if (obj != null)
                return JsonUtil.getJsonMapper().writeValueAsString(obj);
            else
                return null;
        } catch (Exception e) {
            throw new ApiException(500, e.getMessage());
        }
    }
View Full Code Here

Examples of io.lumify.web.clientapi.codegen.ApiException

        if (response.getClientResponseStatus() == ClientResponse.Status.NO_CONTENT) {
            return null;
        } else if (response.getClientResponseStatus().getFamily() == Family.SUCCESSFUL) {
            return response.getEntityInputStream();
        } else {
            throw new ApiException(
                    response.getClientResponseStatus().getStatusCode(),
                    response.getEntity(String.class));
        }
    }
View Full Code Here

Examples of io.lumify.web.clientapi.codegen.ApiException

  }
  public void update (String data) throws ApiException {
    Object postBody = null;
    // verify required params are set
    if(data == null ) {
       throw new ApiException(400, "missing required params");
    }
    // create path and map variables
    String path = "/workspace/update".replaceAll("\\{format\\}","json");

    // query params
View Full Code Here

Examples of io.lumify.web.clientapi.codegen.ApiException

                response = builder.delete(ClientResponse.class, serialize(body));
            } else {
                response = builder.type(contentType).delete(ClientResponse.class, serialize(body));
            }
        } else {
            throw new ApiException(500, "unknown method type " + method);
        }
        if (response.getClientResponseStatus() == ClientResponse.Status.NO_CONTENT) {
            return null;
        } else if (response.getClientResponseStatus().getFamily() == Family.SUCCESSFUL) {
            return (String) response.getEntity(String.class);
        } else {
            throw new ApiException(
                    response.getClientResponseStatus().getStatusCode(),
                    response.getEntity(String.class));
        }
    }
View Full Code Here

Examples of io.lumify.web.clientapi.codegen.ApiException

  }
  public ClientApiWorkspacePublishResponse publish (String publishData) throws ApiException {
    Object postBody = null;
    // verify required params are set
    if(publishData == null ) {
       throw new ApiException(400, "missing required params");
    }
    // create path and map variables
    String path = "/workspace/publish".replaceAll("\\{format\\}","json");

    // query params
View Full Code Here

Examples of io.lumify.web.clientapi.codegen.ApiException

  }
  public ClientApiWorkspaceUndoResponse undo (String undoData) throws ApiException {
    Object postBody = null;
    // verify required params are set
    if(undoData == null ) {
       throw new ApiException(400, "missing required params");
    }
    // create path and map variables
    String path = "/workspace/undo".replaceAll("\\{format\\}","json");

    // query params
View Full Code Here

Examples of net.sourceforge.jwbf.mediawiki.actions.util.ApiException

    @SuppressWarnings("unchecked")
    Iterator<Element> el = root.getChildren().iterator();
    while (el.hasNext()) {
      Element element = el.next();
      if (element.getQualifiedName().equalsIgnoreCase("error")) {
        throw new ApiException(element.getAttributeValue("code"),
            element.getAttributeValue("info"));
      } else if (element.getQualifiedName().equalsIgnoreCase("rev")) {

        try {
          sa.setText(element.getText());
View Full Code Here

Examples of org.dedeler.template.exception.ApiException

    String formattedDate = dateFormat.format(date);

    model.addAttribute("serverTime", formattedDate);

    ApiException e = new ApiException(ErrorCode.UNKNOWN_ERROR);

    Result result = new Builder(e, locale).build();

    return result;
  }
View Full Code Here

Examples of org.entando.entando.aps.system.services.api.model.ApiException

        JAXBMessageType jaxbMessageType = null;
        try {
            String typeCode = properties.getProperty("typeCode");
            IApsEntity masterMessageType = this.getMessageManager().getEntityPrototype(typeCode);
            if (null == masterMessageType) {
                throw new ApiException(IApiErrorCodes.API_VALIDATION_ERROR,
            "Message type with code '" + typeCode + "' does not exist", Response.Status.CONFLICT);
            }
            jaxbMessageType = new JAXBMessageType(masterMessageType);
        } catch (ApiException ae) {
            throw ae;
View Full Code Here

Examples of org.gatein.api.ApiException

    Map<Locale, Described.State> loadDescriptions(String id) {
        try {
            return descriptionService.getDescriptions(id);
        } catch (Throwable t) {
            throw new ApiException("Failed to retrieve descriptions", t);
        }
    }
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.