public JerseyRequest setRequestBody(String requestBody, String contentType) { delegateRequest.setRequestBody(requestBody, contentType); return this; }
@Override public JerseyRequest setRequestBody(final String s) { delegateRequest.setRequestBody(s); return this; }
public ApplicationLinkRequest setRequestBody(final String requestBody, final String contentType) { return setDelegate(request.setRequestBody(requestBody, contentType)); }
public ApplicationLinkRequest setRequestBody(String requestBody) { return setDelegate(request.setRequestBody(requestBody)); }
public ApplicationLinkRequest setRequestBody(String requestBody) { return setDelegate(request.setRequestBody(requestBody)); }
public ApplicationLinkRequest setRequestBody(final String requestBody, final String contentType) { return setDelegate(request.setRequestBody(requestBody, contentType)); }
request.setRequestBody(data, "text/xml"); if (log.isDebugEnabled())
@Override protected String doExecute() throws Exception { String crucibleUrl = getCrucibleUrl(); if (crucibleUrl == null) { return SUCCESS; } Request<?> request = requestFactory.createRequest(Request.MethodType.PUT, crucibleUrl + CRUCIBLE_METRICS_REST_ENDPOINT); request.addTrustedTokenAuthentication(themeProperties.getSystemAdministrator()); request.setRequestBody(metrics); try { metrics = request.execute(); } catch (ResponseException re) { addErrorMessage(getText("crucible.admin.error.response")); log.error("Error communicating with Crucible", re); } return getRedirect("EditMetrics!Default.jspa?message=crucible.admin.info.metrics.updated"); }
@Override protected String doExecute() throws Exception { if (!hasAdministratePermissionOnProject(key)) { return SECURITY_BREACH; } ApplicationLink appLink = appLinksManager.getLinkedApplication(Application.CRUCIBLE.name(), key); Request<?> request = requestFactory.createRequest(Request.MethodType.PUT, getRestResource(appLink)); request.addTrustedTokenAuthentication(themeProperties.getSystemAdministrator()); request.setRequestBody(XStreamUtils.toXML(projectConfig)); try { request.execute(); } catch (ResponseException re) { addErrorMessage(re.getMessage()); log.error("Error putting crucible project config", re); return INPUT; } return getRedirect("CrucibleProject!ListProjects.jspa?message=crucible.admin.info.updated"); }
public String doSynchronize() { final ApplicationLink localLink = appLinksManager.getLinkedApplication(app, getKey()); final String restUrl = localLink.getUrl() + "/plugins/servlet/applinks/projectlinks"; final Request<?> request = requestFactory.createRequest(Request.MethodType.POST, restUrl + "?key=" + localLink.getRemoteKey() + "&application=JIRA"); final ApplicationLink remoteLink = new DefaultApplicationLink("jira", getKey(), null, null); request.setRequestBody(XStreamUtils.toXML(remoteLink)); request.addTrustedTokenAuthentication(); try { request.execute(); } catch (final ResponseException re) { return getRedirect("ViewProject.jspa?message=editprojectlinks.error.synchronize&pid=" + getPid()); } return getRedirect("ViewProject.jspa?message=editprojectlinks.result.synchronized&pid=" + getPid()); }
final Request<?> request = createRequest(localLink, restUrl); final ApplicationLink remoteLink = new DefaultApplicationLink("jira", getKey(), null, null); request.setRequestBody(XStreamUtils.toXML(remoteLink)); request.addTrustedTokenAuthentication(); try