Package com.intalio.bpms.workflow.taskManagementServices20051109

Examples of com.intalio.bpms.workflow.taskManagementServices20051109.Attachments


  public void testUpdate() throws Exception {
    XmlObject xmlObject = XmlObject.Factory.parse(this.getClass().getResource("/update.xml"));
    Assert.assertNotNull(xmlObject);
        System.out.println(xmlObject.toString());
        Task taskElement = Task.Factory.newInstance();
        TaskMetadata metadata = taskElement.addNewMetadata();
       
        metadata.set(new TaskUnmarshaller().expectElement(xmlObject, "taskMetadata"));
        System.out.println(taskElement.getMetadata().getTaskId());
  }
View Full Code Here


 
  @Test
  public void testUpdateWithUnmarshaller() throws Exception {
    XmlObject xmlObject = XmlObject.Factory.parse(this.getClass().getResource("/update.xml"));
    OMElement om = new XmlTooling().convertDocument(xmlObject);
    TaskMetadata tm = new TaskUnmarshaller().unmarshalPartialTask2(om);
    System.out.println(tm.getTaskId());
  }
View Full Code Here

      ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            OMElement taskElement = requireElement(rootQueue, "taskMetadata");
            TaskMetadata metadata = new TaskUnmarshaller().unmarshalPartialTask2(taskElement);
            String participantToken = requireElementValue(rootQueue, "participantToken");
            _server.update(dao,metadata, participantToken);
            return createOkResponse();
        } catch (Exception e) {
            throw makeFault(e);
View Full Code Here

                _logger.debug(xmlObject.xmlText());
            }
            XmlCursor xmlCursor = xmlObject.newCursor();
            xmlCursor.toStartDoc();
            xmlCursor.toNextToken();
            TaskMetadata taskMetadata = com.intalio.bpms.workflow.taskManagementServices20051109.Task.Factory.newInstance().addNewMetadata();
            taskMetadata.set(xmlCursor.getObject());
            xmlCursor.dispose();
            return taskMetadata;
        } catch (InvalidInputFormatException e) {
            throw e;
        } catch (XmlException e) {
View Full Code Here

            requireElement(xmlObject, "metadata");

            com.intalio.bpms.workflow.taskManagementServices20051109.Task taskElement = com.intalio.bpms.workflow.taskManagementServices20051109.Task.Factory
                            .newInstance();

            TaskMetadata metadataElement = taskElement.addNewMetadata();
            metadataElement.set(expectElement(xmlObject, "metadata"));
            return metadataElement;
        } catch (XmlException e) {
            throw new RuntimeException(e.getMessage(), e);
        }
    }
View Full Code Here

    }
    public TaskMetadata unmarshalPartialTask2(OMElement rootElement) throws InvalidInputFormatException {
      try {
          XmlObject xmlObject = XmlObject.Factory.parse(rootElement.getXMLStreamReader());
          com.intalio.bpms.workflow.taskManagementServices20051109.Task taskElement = com.intalio.bpms.workflow.taskManagementServices20051109.Task.Factory.newInstance();
            TaskMetadata metadata = taskElement.addNewMetadata();
            metadata.set(new TaskUnmarshaller().expectElement(xmlObject, "taskMetadata"));
            return metadata;
        } catch (XmlException e) {
            throw new RuntimeException(e.getMessage(), e);
        }
    }
View Full Code Here

        requireElement(rootElement, "metadata");

        com.intalio.bpms.workflow.taskManagementServices20051109.Task taskElement = com.intalio.bpms.workflow.taskManagementServices20051109.Task.Factory
                        .newInstance();

        TaskMetadata metadataElement = taskElement.addNewMetadata();
        metadataElement.set(expectElement(rootElement, "metadata"));

        com.intalio.bpms.workflow.taskManagementServices20051109.TaskData inputElement = null;
        XmlObject xmlInput = expectElement(rootElement, "input");
        if (xmlInput != null) {
            inputElement = taskElement.addNewInput();
View Full Code Here

        response.setGetAttachmentsResponse(atts);
        return XmlTooling.convertDocument(response);
    }

    private static Attachment transformAttachment(org.intalio.tempo.workflow.task.attachments.Attachment attachment) {
        AttachmentMetadataImpl metadata = (AttachmentMetadataImpl) com.intalio.bpms.workflow.taskManagementServices20051109.AttachmentMetadata.Factory
                        .newInstance();
        AttachmentMetadata data = attachment.getMetadata();
        Calendar cal = Calendar.getInstance();
        cal.setTime(data.getCreationDate());
        metadata.setCreationDate(cal);
        metadata.setDescription(data.getDescription());
        metadata.setFileName(data.getFileName());
        metadata.setMimeType(data.getMimeType());
        metadata.setTitle(data.getTitle());

        Attachment att = (Attachment) Attachment.Factory.newInstance();
        att.setAttachmentMetadata(metadata);
        att.setPayloadUrl(attachment.getPayloadURL().toString());
        return att;
View Full Code Here

            attsTable[i] = transformAttachment(attachment);
            i++;
        }
        Attachments atts = (Attachments) Attachments.Factory.newInstance();
        atts.setAttachmentArray(attsTable);
        GetAttachmentsResponseDocumentImpl response = (GetAttachmentsResponseDocumentImpl) GetAttachmentsResponseDocument.Factory.newInstance();
        response.setGetAttachmentsResponse(atts);
        return XmlTooling.convertDocument(response);
    }
View Full Code Here

TOP

Related Classes of com.intalio.bpms.workflow.taskManagementServices20051109.Attachments

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.