blob: 274b533a9231fed6ee35a8bc83e027d9bba465e3 [file] [log] [blame]
Richard S. Halla2dc4512006-04-04 13:17:11 +00001/*
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.
22package org.osgi.service.obr;
23
24import java.net.URL;
25import java.util.Map;
26
27import 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 */
37public 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 Nodet6c58a372010-02-22 19:51:28 +000061 final String CATEGORY = "category";
62
Richard S. Halla2dc4512006-04-04 13:17:11 +000063 final static String[] KEYS = { DESCRIPTION, SIZE, ID, LICENSE_URL,
64 DOCUMENTATION_URL, COPYRIGHT, SOURCE_URL, PRESENTATION_NAME,
Guillaume Nodet6c58a372010-02-22 19:51:28 +000065 SYMBOLIC_NAME, VERSION, URL, CATEGORY };
Richard S. Halla2dc4512006-04-04 13:17:11 +000066
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 Nodet66b87bd2010-02-23 11:34:29 +000088
Richard S. Halla2dc4512006-04-04 13:17:11 +000089}