Stuart McCulloch | 26e7a5a | 2011-10-17 10:31:43 +0000 | [diff] [blame] | 1 | /* |
| 2 | * $Id$ |
| 3 | * |
| 4 | * Copyright (c) OSGi Alliance (2002, 2006, 2007). All Rights Reserved. |
| 5 | * |
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | * you may not use this file except in compliance with the License. |
| 8 | * You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, software |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | * See the License for the specific language governing permissions and |
| 16 | * limitations under the License. |
| 17 | */ |
| 18 | |
| 19 | package org.osgi.service.bindex; |
| 20 | |
| 21 | import java.util.Set; |
| 22 | import java.util.Map; |
| 23 | import java.io.File; |
| 24 | import java.io.OutputStream; |
| 25 | |
| 26 | /** |
| 27 | * The BundleIndexer is an OSGi service for indexing bundle capabiilities |
| 28 | * and requirements and create an OBR XML representation. |
| 29 | * |
| 30 | * @version $Revision$ |
| 31 | */ |
| 32 | public interface BundleIndexer { |
| 33 | static final String REPOSITORY_NAME = "repository.name"; |
| 34 | static final String STYLESHEET = "stylesheet"; |
| 35 | static final String URL_TEMPLATE = "url.template"; |
| 36 | static final String ROOT_URL = "root.url"; |
| 37 | static final String LICENSE_URL = "license.url"; |
| 38 | |
| 39 | /** |
| 40 | * Index the input files and write the result to the given OutputStream |
| 41 | * @param jarFiles a set of input jar files or directories |
| 42 | * @param out the OutputStream to write to |
| 43 | * @param config a set of optional parameters (use constants of this interface as keys) |
| 44 | */ |
| 45 | void index(Set<File> jarFiles, OutputStream out, Map<String, String> config) throws Exception; |
| 46 | } |