View Javadoc

1   /**
2    *
3    * Copyright 2006 The Apache Software Foundation
4    *
5    *  Licensed under the Apache License, Version 2.0 (the "License");
6    *  you may not use this file except in compliance with the License.
7    *  You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   *  Unless required by applicable law or agreed to in writing, software
12   *  distributed under the License is distributed on an "AS IS" BASIS,
13   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   *  See the License for the specific language governing permissions and
15   *  limitations under the License.
16   */
17  package org.apache.geronimo.deployment;
18  
19  import java.io.File;
20  import java.io.IOException;
21  import java.net.URI;
22  import java.net.URL;
23  import java.util.jar.JarFile;
24  import java.util.zip.ZipEntry;
25  import java.util.zip.ZipFile;
26  
27  interface ResourceContext {
28      void addIncludeAsPackedJar(URI targetPath, JarFile jarFile) throws IOException;
29  
30      void addInclude(URI targetPath, ZipFile zipFile, ZipEntry zipEntry) throws IOException;
31  
32      void addInclude(URI targetPath, URL source) throws IOException;
33  
34      void addInclude(URI targetPath, File source) throws IOException;
35  
36      void addFile(URI targetPath, ZipFile zipFile, ZipEntry zipEntry) throws IOException;
37  
38      void addFile(URI targetPath, URL source) throws IOException;
39  
40      void addFile(URI targetPath, File source) throws IOException;
41  
42      void addFile(URI targetPath, String source) throws IOException;
43      
44      File getTargetFile(URI targetPath);
45      
46      void flush() throws IOException;
47  }