Richard S. Hall | a2dc451 | 2006-04-04 13:17:11 +0000 | [diff] [blame] | 1 | /* |
| 2 | * $Header: /cvshome/build/org.osgi.service.obr/src/org/osgi/service/obr/Resource.java,v 1.5 2006/03/16 14:56:17 hargrave Exp $ |
| 3 | * |
| 4 | * Copyright (c) OSGi Alliance (2006). 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 | // This document is an experimental draft to enable interoperability |
| 20 | // between bundle repositories. There is currently no commitment to |
| 21 | // turn this draft into an official specification. |
| 22 | package org.osgi.service.obr; |
| 23 | |
| 24 | import java.net.URL; |
| 25 | import java.util.Map; |
| 26 | |
| 27 | import org.osgi.framework.Version; |
| 28 | |
| 29 | /** |
| 30 | * A resource is an abstraction of a downloadable thing, like a bundle. |
| 31 | * |
| 32 | * Resources have capabilities and requirements. All a resource's requirements |
| 33 | * must be satisfied before it can be installed. |
| 34 | * |
| 35 | * @version $Revision: 1.5 $ |
| 36 | */ |
| 37 | public interface Resource |
| 38 | { |
| 39 | final String LICENSE_URL = "license"; |
| 40 | |
| 41 | final String DESCRIPTION = "description"; |
| 42 | |
| 43 | final String DOCUMENTATION_URL = "documentation"; |
| 44 | |
| 45 | final String COPYRIGHT = "copyright"; |
| 46 | |
| 47 | final String SOURCE_URL = "source"; |
| 48 | |
| 49 | final String SYMBOLIC_NAME = "symbolicname"; |
| 50 | |
| 51 | final String PRESENTATION_NAME = "presentationname"; |
| 52 | |
| 53 | final String ID = "id"; |
| 54 | |
| 55 | final String VERSION = "version"; |
| 56 | |
| 57 | final String URL = "url"; |
| 58 | |
| 59 | final String SIZE = "size"; |
| 60 | |
Guillaume Nodet | 6c58a37 | 2010-02-22 19:51:28 +0000 | [diff] [blame] | 61 | final String CATEGORY = "category"; |
| 62 | |
Richard S. Hall | a2dc451 | 2006-04-04 13:17:11 +0000 | [diff] [blame] | 63 | final static String[] KEYS = { DESCRIPTION, SIZE, ID, LICENSE_URL, |
| 64 | DOCUMENTATION_URL, COPYRIGHT, SOURCE_URL, PRESENTATION_NAME, |
Guillaume Nodet | 6c58a37 | 2010-02-22 19:51:28 +0000 | [diff] [blame] | 65 | SYMBOLIC_NAME, VERSION, URL, CATEGORY }; |
Richard S. Hall | a2dc451 | 2006-04-04 13:17:11 +0000 | [diff] [blame] | 66 | |
| 67 | // get readable name |
| 68 | |
| 69 | Map getProperties(); |
| 70 | |
| 71 | String getSymbolicName(); |
| 72 | |
| 73 | String getPresentationName(); |
| 74 | |
| 75 | Version getVersion(); |
| 76 | |
| 77 | String getId(); |
| 78 | |
| 79 | URL getURL(); |
| 80 | |
| 81 | Requirement[] getRequirements(); |
| 82 | |
| 83 | Capability[] getCapabilities(); |
| 84 | |
| 85 | String[] getCategories(); |
| 86 | |
| 87 | Repository getRepository(); |
Guillaume Nodet | 66b87bd | 2010-02-23 11:34:29 +0000 | [diff] [blame] | 88 | |
Richard S. Hall | a2dc451 | 2006-04-04 13:17:11 +0000 | [diff] [blame] | 89 | } |