當前位置: 首頁>>代碼示例>>Java>>正文


Java Builder.delete方法代碼示例

本文整理匯總了Java中javax.ws.rs.client.Invocation.Builder.delete方法的典型用法代碼示例。如果您正苦於以下問題:Java Builder.delete方法的具體用法?Java Builder.delete怎麽用?Java Builder.delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.ws.rs.client.Invocation.Builder的用法示例。


在下文中一共展示了Builder.delete方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: deleteStatusReturn

import javax.ws.rs.client.Invocation.Builder; //導入方法依賴的package包/類
@Override
public StatusResult deleteStatusReturn(WebTarget webClient, final String idName, final Long id,
		final Map<String, Object> pathParams,
		final Map<String, Object> queryParams, final Map<String, Object> builderProperties) throws Exception
{
	if (queryParams != null)
		webClient = applyQuery(webClient, queryParams);

	if (id != null && idName != null)
		webClient = webClient.resolveTemplate(idName, id);

	if (pathParams != null)
		webClient = webClient.resolveTemplates(pathParams);

       Builder builder = acceptMediaType(webClient.request());
       if (builderProperties != null){
           addBuilderProperties(builder, builderProperties);
       }
	Response resp = builder.delete();
	return getStatusResult(resp);

}
 
開發者ID:Appverse,項目名稱:appverse-server,代碼行數:23,代碼來源:RestPersistenceService.java

示例2: delete

import javax.ws.rs.client.Invocation.Builder; //導入方法依賴的package包/類
@Override
public T delete(WebTarget webClient, final String idName, final Long id,
		final Map<String, Object> pathParams,
		final Map<String, Object> queryParams, final Map<String, Object> builderProperties) throws Exception
{
	if (queryParams != null)
		webClient = applyQuery(webClient, queryParams);

	GenericType<T> genericType = new GenericType<T>(getClassP()) {
	};

	if (id != null && idName != null)
		webClient = webClient.resolveTemplate(idName, id);

	if (pathParams != null)
		webClient = webClient.resolveTemplates(pathParams);

       Builder builder = acceptMediaType(webClient.request());
       if (builderProperties != null){
           addBuilderProperties(builder, builderProperties);
       }
	return builder.delete(genericType);
}
 
開發者ID:Appverse,項目名稱:appverse-server,代碼行數:24,代碼來源:RestPersistenceService.java

示例3: delete

import javax.ws.rs.client.Invocation.Builder; //導入方法依賴的package包/類
void delete(MCRWork work) throws IOException, JDOMException, SAXException {
    WebTarget target = orcid.getWebTarget().path("work").path(work.getPutCode());
    Builder builder = buildInvocation(target);
    LOGGER.info("delete {} from {}", work.getObjectID(), target.getUri());
    Response response = builder.delete();
    expect(response, Response.Status.NO_CONTENT);
    orcid.getWorksSection().removeWork(work);
}
 
開發者ID:MyCoRe-Org,項目名稱:mycore,代碼行數:9,代碼來源:MCRWorksPublisher.java

示例4: makeRemoteCall

import javax.ws.rs.client.Invocation.Builder; //導入方法依賴的package包/類
protected Response makeRemoteCall(String method, UriBuilder uri, Object arg)
        throws EcsManagementClientException {
    if (!isLoggedIn())
        login();
    Client jerseyClient = buildJerseyClient();
    Builder request = jerseyClient.target(uri)
            .register(LoggingFeature.class).request()
            .header("X-SDS-AUTH-TOKEN", authToken)
            .header("Accept", "application/xml");
    Response response;
    if (GET.equals(method)) {
        response = request.get();
    } else if (POST.equals(method)) {
        response = request.post(Entity.xml(arg));
    } else if (PUT.equals(method)) {
        response = request.put(Entity.xml(arg));
    } else if (DELETE.equals(method)) {
        response = request.delete();
    } else {
        throw new EcsManagementClientException(
                "Invalid request method: " + method);
    }
    if (response.getStatus() == 401 && authRetries < AUTH_RETRIES_MAX) {
        // attempt to re-authorize and retry up to _authMaxRetries_ times.
        authRetries += 1;
        this.authToken = null;
        response = makeRemoteCall(method, uri, arg);
    }
    return response;
}
 
開發者ID:codedellemc,項目名稱:ecs-cf-service-broker,代碼行數:31,代碼來源:Connection.java

示例5: delete

import javax.ws.rs.client.Invocation.Builder; //導入方法依賴的package包/類
/**
 * Generic DELETE call.
 */
public <T> T delete(final String path, final Class<T> type,
    final RestParameter... parameters) throws ImClientException {
  try {
    logCallInfo(HttpMethods.DELETE, path);
    Builder clientConfigured = configureClient(path, parameters);
    return clientConfigured.delete(type);

  } catch (WebApplicationException exception) {
    throw new ImClientErrorException(createReponseError(exception));
  }
}
 
開發者ID:indigo-dc,項目名稱:im-java-api,代碼行數:15,代碼來源:ImClient.java

示例6: deleteFile

import javax.ws.rs.client.Invocation.Builder; //導入方法依賴的package包/類
@DELETE
@Path(FILEPATH_PFX)
public Response deleteFile(@PathParam(FILEPATH_PARAM) String filePath) {
    final PathInfo pathInfo = splitWorkspacePath(filePath);
    Builder cheReqBuilder = getProjectTarget().path(pathInfo.path).request();
    Response cheResp = cheReqBuilder.delete();
    assertValidResponse(cheResp);
    return Response.ok().build();
}
 
開發者ID:tareqhs,項目名稱:che_orion_api,代碼行數:10,代碼來源:FileService.java


注:本文中的javax.ws.rs.client.Invocation.Builder.delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。