Class ResourceImpl
- java.lang.Object
-
- org.apache.felix.bundlerepository.impl.ResourceImpl
-
- All Implemented Interfaces:
Resource
- Direct Known Subclasses:
LocalResourceImpl
public class ResourceImpl extends java.lang.Object implements Resource
-
-
Field Summary
-
Fields inherited from interface org.apache.felix.bundlerepository.Resource
CATEGORY, COPYRIGHT, DESCRIPTION, DOCUMENTATION_URI, ID, JAVADOC_URI, LICENSE_URI, MANIFEST_VERSION, PRESENTATION_NAME, SIZE, SOURCE_URI, SYMBOLIC_NAME, URI, VERSION
-
-
Constructor Summary
Constructors Constructor Description ResourceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCapability(Capability cap)voidaddCategory(java.lang.String category)voidaddRequire(Requirement req)booleanequals(java.lang.Object o)Capability[]getCapabilities()Retrieve the capabilitiesjava.lang.String[]getCategories()Retrieve this resource categoriesjava.lang.StringgetId()Shortcut for {{getProperties().get(ID)}}java.lang.StringgetPresentationName()Shortcut for {{getProperties().get(PRESENTATION_NAME)}}java.util.MapgetProperties()Get all resource propertiesRepositorygetRepository()Requirement[]getRequirements()Retrieve the requirementsjava.lang.LonggetSize()Shortcut for {{getProperties().get(SIZE)}}java.lang.StringgetSymbolicName()Shortcut for {{getProperties().get(SYMBOLIC_NAME)}}java.lang.StringgetURI()Shortcut for {{getProperties().get(URI)}}org.osgi.framework.VersiongetVersion()Shortcut for {{getProperties().get(VERSION)}}inthashCode()booleanisLocal()Returns whether this resource is a local one or not.java.lang.Objectput(java.lang.Object key, java.lang.Object value)Default setter method when setting parsed data from the XML file.voidput(java.lang.String key, java.lang.String value, java.lang.String type)voidsetRepository(Repository repository)java.lang.StringtoString()
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getRepository
public Repository getRepository()
-
setRepository
public void setRepository(Repository repository)
-
getProperties
public java.util.Map getProperties()
Description copied from interface:ResourceGet all resource properties- Specified by:
getPropertiesin interfaceResource- Returns:
-
getPresentationName
public java.lang.String getPresentationName()
Description copied from interface:ResourceShortcut for {{getProperties().get(PRESENTATION_NAME)}}- Specified by:
getPresentationNamein interfaceResource- Returns:
-
getSymbolicName
public java.lang.String getSymbolicName()
Description copied from interface:ResourceShortcut for {{getProperties().get(SYMBOLIC_NAME)}}- Specified by:
getSymbolicNamein interfaceResource- Returns:
-
getId
public java.lang.String getId()
Description copied from interface:ResourceShortcut for {{getProperties().get(ID)}}
-
getVersion
public org.osgi.framework.Version getVersion()
Description copied from interface:ResourceShortcut for {{getProperties().get(VERSION)}}- Specified by:
getVersionin interfaceResource- Returns:
-
getURI
public java.lang.String getURI()
Description copied from interface:ResourceShortcut for {{getProperties().get(URI)}}
-
getSize
public java.lang.Long getSize()
Description copied from interface:ResourceShortcut for {{getProperties().get(SIZE)}}
-
getRequirements
public Requirement[] getRequirements()
Description copied from interface:ResourceRetrieve the requirements- Specified by:
getRequirementsin interfaceResource- Returns:
-
addRequire
public void addRequire(Requirement req)
-
getCapabilities
public Capability[] getCapabilities()
Description copied from interface:ResourceRetrieve the capabilities- Specified by:
getCapabilitiesin interfaceResource- Returns:
-
addCapability
public void addCapability(Capability cap)
-
getCategories
public java.lang.String[] getCategories()
Description copied from interface:ResourceRetrieve this resource categories- Specified by:
getCategoriesin interfaceResource- Returns:
-
addCategory
public void addCategory(java.lang.String category)
-
isLocal
public boolean isLocal()
Description copied from interface:ResourceReturns 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.
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)Default setter method when setting parsed data from the XML file.
-
put
public void put(java.lang.String key, java.lang.String value, java.lang.String type)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-