Package org.apache.excalibur.source

Examples of org.apache.excalibur.source.ModifiableSource


                this.sendBrokenLinkWarning(target.getSourceURI(),
                    DefaultNotifyingBuilder.getRootCause(pe).getMessage());
            } finally {
                if (output != null && status != -1) {

                    ModifiableSource source = getSource(target);
                    try {
                        pageSize = output.size();
                        OutputStream stream = source.getOutputStream();

                        output.setFileOutputStream(stream);
                        output.flush();
                        output.close();
                        pageGenerated(target.getSourceURI(),
View Full Code Here


            n.setMessage("Page Not Available.");
            n.setDescription("The requested resource couldn't be found.");
            n.addExtraDescription(Notifying.EXTRA_REQUESTURI, target.getSourceURI());
            n.addExtraDescription("missing-file", target.getSourceURI());

            ModifiableSource source = getSource(target);
            try {
                OutputStream stream = source.getOutputStream();

                PrintStream out = new PrintStream(stream);
                Notifier.notify(n, out, "text/html");
                out.flush();
                out.close();
View Full Code Here

                    filename,
                    DefaultNotifyingBuilder.getRootCause(pe).getMessage());
            } finally {
                if (output != null && status != -1) {

                    ModifiableSource source = getSource(target, filename);
                    try {
                        OutputStream stream = source.getOutputStream();

                        output.setFileOutputStream(stream);
                        output.flush();
                        output.close();
                    } catch (IOException ioex) {
View Full Code Here

            n.setMessage("Page Not Available.");
            n.setDescription("The requested resource couldn't be found.");
            n.addExtraDescription(Notifying.EXTRA_REQUESTURI, uri);
            n.addExtraDescription("missing-file", uri);

            ModifiableSource source = getSource(target, filename);
            try {
                OutputStream stream = source.getOutputStream();

                PrintStream out = new PrintStream(stream);
                Notifier.notify(n, out, "text/html");
                out.flush();
                out.close();
View Full Code Here

            TransformerFactory tf = TransformerFactory.newInstance();

            if (docTarget instanceof ModifiableSource
                && tf.getFeature(SAXTransformerFactory.FEATURE)) {

                ModifiableSource ws = (ModifiableSource) docTarget;
                os = ws.getOutputStream();
                SAXTransformerFactory stf = (SAXTransformerFactory) tf;
                TransformerHandler th = stf.newTransformerHandler();
                Transformer t = th.getTransformer();
                t.setOutputProperty(OutputKeys.INDENT, "true");
                t.setOutputProperty(OutputKeys.METHOD, "xml");
View Full Code Here

                if (source instanceof RestrictableSource)
                    ((RestrictableSource)source).setSourceCredential(new SourceCredential(principal, password));

                if (source instanceof ModifiableSource) {
                    ModifiableSource writeablesource = (ModifiableSource)source;

                    OutputStream out = writeablesource.getOutputStream();

                    byte[] buffer = new byte[8192];
                    int length = -1;

                    InputStream in = part.getInputStream();
View Full Code Here

            if (source instanceof RestrictableSource)
                ((RestrictableSource)source).setSourceCredential(new SourceCredential(principal, password));

            if (source instanceof ModifiableSource) {
                ModifiableSource writeablesource = (ModifiableSource)source;

                writeablesource.delete();

            } else
                throw new ProcessingException("Source isn't writeable");

        } catch (SourceException se) {
View Full Code Here

TOP

Related Classes of org.apache.excalibur.source.ModifiableSource

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.