Class LazyLocalResourceImpl
- java.lang.Object
-
- org.apache.felix.bundlerepository.impl.LazyLocalResourceImpl
-
- All Implemented Interfaces:
LocalResource
,Resource
,org.osgi.framework.BundleReference
public class LazyLocalResourceImpl extends java.lang.Object implements LocalResource
-
-
Field Summary
Fields Modifier and Type Field Description private org.osgi.framework.Bundle
m_bundle
private org.apache.felix.utils.log.Logger
m_logger
private Resource
m_resource
-
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 LazyLocalResourceImpl(org.osgi.framework.Bundle bundle, org.apache.felix.utils.log.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.osgi.framework.Bundle
getBundle()
Capability[]
getCapabilities()
Retrieve the capabilitiesjava.lang.String[]
getCategories()
Retrieve this resource categoriesjava.lang.String
getId()
Shortcut for {{getProperties().get(ID)}}java.lang.String
getPresentationName()
Shortcut for {{getProperties().get(PRESENTATION_NAME)}}java.util.Map
getProperties()
Get all resource propertiesRequirement[]
getRequirements()
Retrieve the requirementsprivate Resource
getResource()
java.lang.Long
getSize()
Shortcut for {{getProperties().get(SIZE)}}java.lang.String
getSymbolicName()
Shortcut for {{getProperties().get(SYMBOLIC_NAME)}}java.lang.String
getURI()
Shortcut for {{getProperties().get(URI)}}org.osgi.framework.Version
getVersion()
Shortcut for {{getProperties().get(VERSION)}}boolean
isLocal()
Returns whether this resource is a local one or not.java.lang.String
toString()
-
-
-
Field Detail
-
m_bundle
private final org.osgi.framework.Bundle m_bundle
-
m_logger
private final org.apache.felix.utils.log.Logger m_logger
-
m_resource
private volatile Resource m_resource
-
-
Method Detail
-
isLocal
public boolean isLocal()
Description copied from interface:Resource
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.
-
getBundle
public org.osgi.framework.Bundle getBundle()
- Specified by:
getBundle
in interfaceorg.osgi.framework.BundleReference
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getResource
private final Resource getResource()
-
getProperties
public java.util.Map getProperties()
Description copied from interface:Resource
Get all resource properties- Specified by:
getProperties
in interfaceResource
- Returns:
-
getId
public java.lang.String getId()
Description copied from interface:Resource
Shortcut for {{getProperties().get(ID)}}
-
getSymbolicName
public java.lang.String getSymbolicName()
Description copied from interface:Resource
Shortcut for {{getProperties().get(SYMBOLIC_NAME)}}- Specified by:
getSymbolicName
in interfaceResource
- Returns:
-
getVersion
public org.osgi.framework.Version getVersion()
Description copied from interface:Resource
Shortcut for {{getProperties().get(VERSION)}}- Specified by:
getVersion
in interfaceResource
- Returns:
-
getPresentationName
public java.lang.String getPresentationName()
Description copied from interface:Resource
Shortcut for {{getProperties().get(PRESENTATION_NAME)}}- Specified by:
getPresentationName
in interfaceResource
- Returns:
-
getURI
public java.lang.String getURI()
Description copied from interface:Resource
Shortcut for {{getProperties().get(URI)}}
-
getSize
public java.lang.Long getSize()
Description copied from interface:Resource
Shortcut for {{getProperties().get(SIZE)}}
-
getCategories
public java.lang.String[] getCategories()
Description copied from interface:Resource
Retrieve this resource categories- Specified by:
getCategories
in interfaceResource
- Returns:
-
getCapabilities
public Capability[] getCapabilities()
Description copied from interface:Resource
Retrieve the capabilities- Specified by:
getCapabilities
in interfaceResource
- Returns:
-
getRequirements
public Requirement[] getRequirements()
Description copied from interface:Resource
Retrieve the requirements- Specified by:
getRequirements
in interfaceResource
- Returns:
-
-