Interface Resource
- All Known Subinterfaces:
LocalResource
- All Known Implementing Classes:
ConvertedResource
,LazyLocalResourceImpl
,LocalResourceImpl
,ResourceImpl
public interface Resource
A resource is an abstraction of a downloadable thing, like a bundle.
Resources have capabilities and requirements. All a resource's requirements
must be satisfied before it can be installed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the capabilitiesString[]
Retrieve this resource categoriesgetId()
Shortcut for {{getProperties().get(ID)}}Shortcut for {{getProperties().get(PRESENTATION_NAME)}}Get all resource propertiesRetrieve the requirementsgetSize()
Shortcut for {{getProperties().get(SIZE)}}Shortcut for {{getProperties().get(SYMBOLIC_NAME)}}getURI()
Shortcut for {{getProperties().get(URI)}}org.osgi.framework.Version
Shortcut for {{getProperties().get(VERSION)}}boolean
isLocal()
Returns whether this resource is a local one or not.
-
Field Details
-
LICENSE_URI
- See Also:
-
DESCRIPTION
- See Also:
-
DOCUMENTATION_URI
- See Also:
-
COPYRIGHT
- See Also:
-
SOURCE_URI
- See Also:
-
JAVADOC_URI
- See Also:
-
SYMBOLIC_NAME
- See Also:
-
PRESENTATION_NAME
- See Also:
-
ID
- See Also:
-
VERSION
- See Also:
-
URI
- See Also:
-
SIZE
- See Also:
-
CATEGORY
- See Also:
-
MANIFEST_VERSION
- See Also:
-
-
Method Details
-
getProperties
Map getProperties()Get all resource properties- Returns:
-
getId
String getId()Shortcut for {{getProperties().get(ID)}}- Returns:
-
getSymbolicName
String getSymbolicName()Shortcut for {{getProperties().get(SYMBOLIC_NAME)}}- Returns:
-
getVersion
org.osgi.framework.Version getVersion()Shortcut for {{getProperties().get(VERSION)}}- Returns:
-
getPresentationName
String getPresentationName()Shortcut for {{getProperties().get(PRESENTATION_NAME)}}- Returns:
-
getURI
String getURI()Shortcut for {{getProperties().get(URI)}}- Returns:
-
getSize
Long getSize()Shortcut for {{getProperties().get(SIZE)}}- Returns:
-
getCategories
String[] getCategories()Retrieve this resource categories- Returns:
-
getCapabilities
Capability[] getCapabilities()Retrieve the capabilities- Returns:
-
getRequirements
Requirement[] getRequirements()Retrieve the requirements- Returns:
-
isLocal
boolean isLocal()Returns whether this resource is a local one or not. Local resources are already available in the OSGi framework and thus will be preferred over other resources.
-