Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 307393 | Differences between
and this patch

Collapse All | Expand All

(-)a/org.eclipse.gemini.web.core/src/main/java/org/eclipse/gemini/web/internal/url/DirTransformer.java (-5 / +5 lines)
Lines 35-48 import org.eclipse.virgo.util.io.PathReference; Link Here
35
 * Files cannot be added, only changed or removed. Actual transformation of files is performed by an implementation of
35
 * Files cannot be added, only changed or removed. Actual transformation of files is performed by an implementation of
36
 * the {@link DirTransformerCallback} interface.
36
 * the {@link DirTransformerCallback} interface.
37
 */
37
 */
38
public class DirTransformer {
38
final class DirTransformer {
39
39
40
    /**
40
    /**
41
     * Callback interface used to transform files in a directory.
41
     * Callback interface used to transform files in a directory.
42
     * 
42
     * 
43
     * @see DirTransformer
43
     * @see DirTransformer
44
     */
44
     */
45
    public static interface DirTransformerCallback {
45
    static interface DirTransformerCallback {
46
46
47
        /**
47
        /**
48
         * Transform the supplied file.
48
         * Transform the supplied file.
Lines 75-81 public class DirTransformer { Link Here
75
     * 
75
     * 
76
     * @param callback the <code>DirTransformerCallback</code> to use for file transformation.
76
     * @param callback the <code>DirTransformerCallback</code> to use for file transformation.
77
     */
77
     */
78
    public DirTransformer(DirTransformerCallback callback) {
78
    DirTransformer(DirTransformerCallback callback) {
79
        if (callback == null) {
79
        if (callback == null) {
80
            throw new IllegalArgumentException("Callback must not be null");
80
            throw new IllegalArgumentException("Callback must not be null");
81
        }
81
        }
Lines 89-95 public class DirTransformer { Link Here
89
     * @param transformedUrl the {@link URL} to write the transformed directory to.
89
     * @param transformedUrl the {@link URL} to write the transformed directory to.
90
     * @throws IOException if the directory cannot be transformed.
90
     * @throws IOException if the directory cannot be transformed.
91
     */
91
     */
92
    public void transform(URL url, URL transformedUrl) throws IOException {
92
    void transform(URL url, URL transformedUrl) throws IOException {
93
        transform(url, transformedUrl, false);
93
        transform(url, transformedUrl, false);
94
    }
94
    }
95
95
Lines 101-107 public class DirTransformer { Link Here
101
     * @param ensureManifestIsPresent if <code>true</code> ensures that the transformed directory contains a manifest.
101
     * @param ensureManifestIsPresent if <code>true</code> ensures that the transformed directory contains a manifest.
102
     * @throws IOException if the directory cannot be transformed.
102
     * @throws IOException if the directory cannot be transformed.
103
     */
103
     */
104
    public void transform(URL url, URL transformedUrl, boolean ensureManifestIsPresent) throws IOException {
104
    void transform(URL url, URL transformedUrl, boolean ensureManifestIsPresent) throws IOException {
105
        PathReference fromDirectory = new PathReference(url.getPath());
105
        PathReference fromDirectory = new PathReference(url.getPath());
106
        PathReference toDirectory = new PathReference(transformedUrl.getPath());
106
        PathReference toDirectory = new PathReference(transformedUrl.getPath());
107
        transformDir(fromDirectory, toDirectory);
107
        transformDir(fromDirectory, toDirectory);
(-)a/org.eclipse.gemini.web.core/src/main/java/org/eclipse/gemini/web/internal/url/DirTransformingURLConnection.java (-3 / +3 lines)
Lines 33-39 import org.eclipse.virgo.util.io.PathReference; Link Here
33
 * 
33
 * 
34
 * @see DirTransformer
34
 * @see DirTransformer
35
 */
35
 */
36
public class DirTransformingURLConnection extends URLConnection {
36
final class DirTransformingURLConnection extends URLConnection {
37
37
38
    private static final String TEMP_DIR = "file:temp/";
38
    private static final String TEMP_DIR = "file:temp/";
39
39
Lines 55-61 public class DirTransformingURLConnection extends URLConnection { Link Here
55
     *         be created.
55
     *         be created.
56
     * @throws URISyntaxException
56
     * @throws URISyntaxException
57
     */
57
     */
58
    public DirTransformingURLConnection(URL url, DirTransformer transformer) throws MalformedURLException {
58
    DirTransformingURLConnection(URL url, DirTransformer transformer) throws MalformedURLException {
59
        this(url, transformer, false);
59
        this(url, transformer, false);
60
    }
60
    }
61
61
Lines 71-77 public class DirTransformingURLConnection extends URLConnection { Link Here
71
     *         be created.
71
     *         be created.
72
     * @throws URISyntaxException
72
     * @throws URISyntaxException
73
     */
73
     */
74
    public DirTransformingURLConnection(URL url, DirTransformer transformer, boolean ensureManifestIsPresent) throws MalformedURLException {
74
    DirTransformingURLConnection(URL url, DirTransformer transformer, boolean ensureManifestIsPresent) throws MalformedURLException {
75
        super(url);
75
        super(url);
76
        this.transformer = transformer;
76
        this.transformer = transformer;
77
        this.ensureManifestIsPresent = ensureManifestIsPresent;
77
        this.ensureManifestIsPresent = ensureManifestIsPresent;
(-)a/org.eclipse.gemini.web.core/src/main/java/org/eclipse/gemini/web/internal/url/WebBundleUrlStreamHandlerService.java (-1 / +1 lines)
Lines 88-94 public final class WebBundleUrlStreamHandlerService extends AbstractURLStreamHan Link Here
88
88
89
        private final WebBundleUrl webBundleUrl;
89
        private final WebBundleUrl webBundleUrl;
90
90
91
        public Callback(URL sourceURL, WebBundleUrl url, WebBundleManifestTransformer transformer) {
91
        Callback(URL sourceURL, WebBundleUrl url, WebBundleManifestTransformer transformer) {
92
            this.sourceURL = sourceURL;
92
            this.sourceURL = sourceURL;
93
            this.webBundleUrl = url;
93
            this.webBundleUrl = url;
94
            this.transformer = transformer;
94
            this.transformer = transformer;

Return to bug 307393