1 package org.codehaus.plexus.archiver;
2
3 /*
4 * Copyright (C) 2011-2016, Neticoa SAS France - Tous droits réservés.
5 * Author(s) : Franck Bonin, Neticoa SAS France
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 */
20
21 import org.codehaus.plexus.components.io.fileselectors.FileSelector;
22
23 import java.io.File;
24 import java.util.List;
25
26 /**
27 * @author Franck Bonin
28 * @version $Revision$ $Date$
29 */
30 public interface ArchiveContentLister
31 {
32 String ROLE = ArchiveContentLister.class.getName();
33
34 /**
35 * list the archive content.
36 *
37 * @throws ArchiverException
38 */
39 List<ArchiveContentEntry> list()
40 throws ArchiverException;
41
42 /*
43 * Take a path into the archive and list it (futur).
44 *
45 * @param path
46 * Path inside the archive to be listed.
47 * @throws ArchiverException
48 */
49 /*void extract( String path )
50 throws ArchiverException;*/
51
52 File getSourceFile();
53
54 void setSourceFile( File sourceFile );
55
56 /**
57 * Sets a set of {@link FileSelector} instances, which may be used to select the files to extract from the archive.
58 * If file selectors are present, then a file is only extracted, if it is confirmed by all file selectors.
59 */
60 void setFileSelectors( FileSelector[] selectors );
61
62 /**
63 * Returns a set of {@link FileSelector} instances, which may be used to select the files to extract from the
64 * archive. If file selectors are present, then a file is only extracted, if it is confirmed by all file selectors.
65 */
66 FileSelector[] getFileSelectors();
67 }