Examples of AttachmentResponse


Examples of org.activiti.rest.service.api.engine.AttachmentResponse

    }
    return result ;
  }
 
  public AttachmentResponse createAttachmentResponse(Attachment attachment, String serverRootUrl) {
    AttachmentResponse result = new AttachmentResponse();
    result.setId(attachment.getId());
    result.setName(attachment.getName());
    result.setDescription(attachment.getDescription());
    result.setType(attachment.getType());
    result.setUserId(attachment.getUserId());
   
    if (attachment.getUrl() == null && attachment.getTaskId() != null) {
      // Attachment content can be streamed
      result.setContentUrl(formatUrl(serverRootUrl, RestUrls.URL_TASK_ATTACHMENT_DATA, attachment.getTaskId(), attachment.getId()));
    } else {
      result.setExternalUrl(attachment.getUrl());
    }
   
    if (attachment.getTaskId() != null) {
      result.setUrl(formatUrl(serverRootUrl, RestUrls.URL_TASK_ATTACHMENT, attachment.getTaskId(), attachment.getId()));
      result.setTaskUrl(formatUrl(serverRootUrl, RestUrls.URL_TASK, attachment.getTaskId()));
    }
    if (attachment.getProcessInstanceId() != null) {
      result.setProcessInstanceUrl(formatUrl(serverRootUrl, RestUrls.URL_PROCESS_INSTANCE, attachment.getProcessInstanceId()));
    }
    return result ;
  }
View Full Code Here

Examples of org.activiti.rest.service.api.engine.AttachmentResponse

  public AttachmentResponse createAttachment(@PathVariable String taskId, HttpServletRequest request, HttpServletResponse response) {
   
    String serverRootUrl = request.getRequestURL().toString();
    serverRootUrl = serverRootUrl.substring(0, serverRootUrl.indexOf("/runtime/tasks/"));
   
    AttachmentResponse result = null;
    Task task = getTaskFromRequest(taskId);
    if (request instanceof MultipartHttpServletRequest) {
      result = createBinaryAttachment((MultipartHttpServletRequest) request, task, serverRootUrl, response);
    } else {
     
View Full Code Here

Examples of org.apache.ws.axis2.mtomsample.AttachmentResponse

    FileOutputStream fileOutputStream = new FileOutputStream(file);
    dataHandler.writeTo(fileOutputStream);
    fileOutputStream.flush();
    fileOutputStream.close();
   
    AttachmentResponse response = new AttachmentResponse();
    response.setAttachmentResponse("File saved succesfully.");
    return response;
  }
View Full Code Here

Examples of org.apache.ws.axis2.mtomsample.AttachmentResponse

    FileOutputStream fileOutputStream = new FileOutputStream(file);
    dataHandler.writeTo(fileOutputStream);
    fileOutputStream.flush();
    fileOutputStream.close();
   
    AttachmentResponse response = new AttachmentResponse();
    response.setAttachmentResponse("File saved succesfully.");
    return response;
  }
View Full Code Here

Examples of sample.mtom.service.MTOMSampleMTOMSampleSOAP11Port_httpStub.AttachmentResponse

    base64Binary.setContentType(dataHandler.getContentType());
    attachmentType.setBinaryData(base64Binary);
    attachmentType.setFileName(destination);
    attachmentRequest.setAttachmentRequest(attachmentType);

    AttachmentResponse response = serviceStub.attachment(attachmentRequest);
    System.out.println(response.getAttachmentResponse());
  }
View Full Code Here

Examples of sample.mtom.service.MTOMSampleStub.AttachmentResponse

    base64Binary.setContentType(dataHandler.getContentType());
    attachmentType.setBinaryData(base64Binary);
    attachmentType.setFileName(destination);
    attachmentRequest.setAttachmentRequest(attachmentType);

    AttachmentResponse response = serviceStub.attachment(attachmentRequest);
    System.out.println(response.getAttachmentResponse());
  }
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.