Package org.intalio.tempo.workflow.tas.core

Examples of org.intalio.tempo.workflow.tas.core.AttachmentMetadata


     * Stores a simple text file
     *
     * @throws Exception
     */
    public void testStorage() throws Exception {
        AttachmentMetadata metadata = new AttachmentMetadata();
        metadata.setMimeType("text/plain");
        String string = "hello.txt";
        metadata.setFilename(string);
        String url = _service.add(_credentials, metadata, "Hello world!".getBytes("UTF-8"));
        System.out.println("URL: " + url);
        _service.delete(_credentials, url);
    }
View Full Code Here


     * Stores an xml file
     *
     * @throws Exception
     */
    public void testStoreXmlFile() throws Exception {
        AttachmentMetadata metadata = new AttachmentMetadata();
        metadata.setMimeType("text/xml");
        metadata.setFilename("log4j.xml");
        String url = _service.add(_credentials, metadata, this.getClass().getResource("/log4j.xml").toExternalForm());
        _service.delete(_credentials, url);
    }
View Full Code Here

                new WDSStorageStrategy(_WDS_ENDPOINT));
    }

    public void testWDSStorage() throws Exception {
       
        AttachmentMetadata metadata = new AttachmentMetadata();
        metadata.setMimeType("text/plain");
        metadata.setFilename("hello.txt");
       
        String url = _service.add(_credentials, metadata, "Hello world!".getBytes("UTF-8"));
       
        _logger.debug("URL: " + url);
       
View Full Code Here

    /**
     * Parses a <code>tas:attachmentMetadata</code> element into an {@link AttachmentMetadata} object.
     */
    private static AttachmentMetadata parseAttachmentMetadata(OMElement metadataElement)
            throws InvalidMessageFormatException {
        AttachmentMetadata metadata = new AttachmentMetadata();
        String mimeType = _xpathHelper.getRequiredString(metadataElement, "tas:mimeType").trim();
        metadata.setMimeType(mimeType);
        String filename = _xpathHelper.getRequiredString(metadataElement, "tas:filename").trim();
        metadata.setFilename(filename);
        return metadata;
    }
View Full Code Here

    public OMElement add(OMElement addRequestElement) throws AxisFault {
        try {
            _logger.debug("Request: add");

            OMElement metadataElement = _xpathHelper.getRequiredElement(addRequestElement, "tas:attachmentMetadata");
            AttachmentMetadata metadata = TASAxis2Bridge.parseAttachmentMetadata(metadataElement);

            OMElement credentialElement = _xpathHelper.getRequiredElement(addRequestElement, "tas:authCredentials");
            AuthCredentials credentials = TASAxis2Bridge.parseAuthCredentials(credentialElement);

            OMElement localFileUrlElement = _xpathHelper.getElement(addRequestElement, "tas:localFileURL");
View Full Code Here

TOP

Related Classes of org.intalio.tempo.workflow.tas.core.AttachmentMetadata

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.