Package com.volantis.mcs.runtime.packagers

Examples of com.volantis.mcs.runtime.packagers.PackagingException


                            null, new MarinerURL(noImageAsset.getValue())).
                               getExternalForm()).
                        append("\"/></div></body></html>");
                    writer.getWriter().write(bodyContent.toString());
                } catch (RepositoryException e) {
                    throw new PackagingException(e);
                } catch (IOException e) {
                    throw new PackagingException(e);
                }
            }

            public String getBodyType(MarinerRequestContext context) {
                return "text/html";
View Full Code Here


            // I would throw IllegalStateException if it was Wrapping...
            throw new RuntimeException(
                        exceptionLocalizer.format("unexpected-encoding"), e);
        } catch (MessagingException e) {
            // Problem in the body part data handler
            throw new PackagingException(
                        exceptionLocalizer.format("problem-adding-body"), e);
        } catch (IOException e) {
            // Problem closing the writer
            // MCSRU0033X="Problem adding body to package"
            throw new PackagingException(
                        exceptionLocalizer.format("problem-adding-body"), e);
        } finally {
            try {
                stream.close();
            } catch (IOException e) {
View Full Code Here

                            // package
                            assetPart.setHeader("Content-Location",
                                                "file://" + assetURL);
                        }
                    } catch (MessagingException e) {
                        throw new PackagingException(
                                    exceptionLocalizer.format(
                                                "could-not-add-asset",
                                                encodedURL),
                                    e);
                    }
View Full Code Here

                // Force the output through to the stream
                // @todo copied from Shaun's example code; probably not needed
                outputStream.flush();
            } catch (MarinerContextException e) {
                throw new PackagingException(
                            exceptionLocalizer.format("no-response-stream"), e);
            }
        } catch (MessagingException e) {
            throw new PackagingException(
                        exceptionLocalizer.format(
                                    "message-writing-finalizing-error"),
                        e);
        } catch (IOException e) {
            // MCSRU0037X="Problem writing to the response writer"
            throw new PackagingException(
                        exceptionLocalizer.format("response-writer-problem"),
                        e);
        } finally {
            if (outputStream != null) {
                try {
View Full Code Here

                writeCanvasContent(writer, (CanvasAttributes)bodyContext);
            } else if (bodyContext instanceof ResponseBodyAttributes) {
                writeAJAXResponseContent(writer, (ResponseBodyAttributes)bodyContext);
            }
        } catch (IOException e) {
            throw new PackagingException(e);
        } catch (ProtocolException e) {
            throw new PackagingException(e);
        }
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.runtime.packagers.PackagingException

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.