Package com.composum.sling.nodes.tools
Class OsgiBundleModel
- java.lang.Object
-
- com.composum.sling.core.AbstractSlingBean
-
- com.composum.sling.nodes.tools.OsgiBundleModel
-
- All Implemented Interfaces:
RestrictedBean
,SlingBean
public class OsgiBundleModel extends AbstractSlingBean
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
OsgiBundleModel.Exported
class
OsgiBundleModel.Imported
class
OsgiBundleModel.PackageReference
class
OsgiBundleModel.PackageSet
class
OsgiBundleModel.Resolved
static class
OsgiBundleModel.State
-
Nested classes/interfaces inherited from class com.composum.sling.core.AbstractSlingBean
AbstractSlingBean.NodeClosure
-
-
Field Summary
-
Fields inherited from class com.composum.sling.core.AbstractSlingBean
context, queryManager, request, resolver, resource, response, session, sling
-
-
Constructor Summary
Constructors Constructor Description OsgiBundleModel()
OsgiBundleModel(@NotNull BeanContext context, @NotNull org.osgi.framework.Bundle bundle)
OsgiBundleModel(BeanContext context)
OsgiBundleModel(BeanContext context, org.apache.sling.api.resource.Resource resource)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.osgi.framework.BundleContext
getBundleContext()
@NotNull Long
getBundleId()
@NotNull String
getCategory()
Collection<OsgiBundleModel.Exported>
getExported()
@Nullable OsgiBundleModel.Exported
getExported(@NotNull String symbolicName)
Map<String,OsgiBundleModel.Exported>
getExportedSet()
@NotNull Set<Map.Entry<String,String>>
getHeaders()
Collection<OsgiBundleModel.Imported>
getImported()
@Nullable OsgiBundleModel.Imported
getImported(@NotNull String symbolicName)
Map<String,OsgiBundleModel.Imported>
getImportedSet()
@NotNull String
getLastModified()
@NotNull String
getLocation()
@NotNull String
getName()
returns the name of the resource wrapped by this bean@NotNull Iterator<OsgiServiceModel>
getProvidedServices()
Collection<OsgiBundleModel.Resolved>
getResolved()
@Nullable OsgiBundleModel.Resolved
getResolved(@NotNull String symbolicName)
Map<String,OsgiBundleModel.Resolved>
getResolvedSet()
@NotNull OsgiBundleModel.State
getState()
protected static OsgiBundleModel.State
getState(@NotNull org.osgi.framework.Bundle bundle)
@NotNull String
getSymbolicName()
@NotNull Iterator<OsgiServiceModel>
getUsedServices()
@NotNull String
getVersion()
protected void
initialize(@NotNull org.osgi.framework.Bundle bundle)
void
initialize(BeanContext context, org.apache.sling.api.resource.Resource resource)
This basic initialization sets up the context and resource attributes only, all the other attributes are set 'lazy' during their getter calls.boolean
isActive()
protected static boolean
isActive(org.osgi.framework.Bundle bundle)
boolean
isFragment()
protected static boolean
isFragment(@NotNull org.osgi.framework.Bundle bundle)
boolean
isValid()
protected @NotNull OsgiBundleModel.PackageSet
scanPackgeReferences(@NotNull String references)
-
Methods inherited from class com.composum.sling.core.AbstractSlingBean
executeQuery, findBeans, findNodes, findNodes, findPathList, getContentResource, getDomId, getHasTitle, getId, getInherited, getInherited, getNode, getParent, getParent, getPath, getPermissible, getProperty, getProperty, getQueryManager, getRequest, getResolver, getResource, getResponse, getServiceKey, getSession, getSling, getStringId, getTitle, getType, getUrl, getUsername, initialize, isPermissible, isReadAllowed, isWriteAllowed, toString, toString
-
-
-
-
Field Detail
-
BUNDLE_ID_SUFFIX
public static final Pattern BUNDLE_ID_SUFFIX
-
HD_ARCHIVER_VERSION
public static final String HD_ARCHIVER_VERSION
- See Also:
- Constant Field Values
-
HD_BUNDLE_CATEGORY
public static final String HD_BUNDLE_CATEGORY
- See Also:
- Constant Field Values
-
HD_BUNDLE_LICENSE
public static final String HD_BUNDLE_LICENSE
- See Also:
- Constant Field Values
-
HD_BUNDLE_NAME
public static final String HD_BUNDLE_NAME
- See Also:
- Constant Field Values
-
HD_BUNDLE_VENDOR
public static final String HD_BUNDLE_VENDOR
- See Also:
- Constant Field Values
-
HD_CREATED_BY
public static final String HD_CREATED_BY
- See Also:
- Constant Field Values
-
HD_DESCRIPTION
public static final String HD_DESCRIPTION
- See Also:
- Constant Field Values
-
HD_DYNAMIC_IMPORT_PACKAGE
public static final String HD_DYNAMIC_IMPORT_PACKAGE
- See Also:
- Constant Field Values
-
HD_EMBED_DEPENDENCY
public static final String HD_EMBED_DEPENDENCY
- See Also:
- Constant Field Values
-
HD_EXPORT_PACKAGE
public static final String HD_EXPORT_PACKAGE
- See Also:
- Constant Field Values
-
HD_IMPLEMENTATION_BUILD
public static final String HD_IMPLEMENTATION_BUILD
- See Also:
- Constant Field Values
-
HD_IMPLEMENTATION_TITLE
public static final String HD_IMPLEMENTATION_TITLE
- See Also:
- Constant Field Values
-
HD_IMPLEMENTATION_VENDOR
public static final String HD_IMPLEMENTATION_VENDOR
- See Also:
- Constant Field Values
-
HD_IMPLEMENTATION_VENDOR_ID
public static final String HD_IMPLEMENTATION_VENDOR_ID
- See Also:
- Constant Field Values
-
HD_IMPLEMENTATION_VERSION
public static final String HD_IMPLEMENTATION_VERSION
- See Also:
- Constant Field Values
-
HD_IMPORT_PACKAGE
public static final String HD_IMPORT_PACKAGE
- See Also:
- Constant Field Values
-
HD_INCLUDE_RESOURCE
public static final String HD_INCLUDE_RESOURCE
- See Also:
- Constant Field Values
-
HD_PRIVATE_PACKAGE
public static final String HD_PRIVATE_PACKAGE
- See Also:
- Constant Field Values
-
HD_PROVIDE_CAPABILITY
public static final String HD_PROVIDE_CAPABILITY
- See Also:
- Constant Field Values
-
HD_REQUIRE_CAPABILITY
public static final String HD_REQUIRE_CAPABILITY
- See Also:
- Constant Field Values
-
HD_REQ_EXEC_ENVIRONMENT
public static final String HD_REQ_EXEC_ENVIRONMENT
- See Also:
- Constant Field Values
-
HD_SERVICE_COMPONENT
public static final String HD_SERVICE_COMPONENT
- See Also:
- Constant Field Values
-
HD_SPECIFICATION_TITLE
public static final String HD_SPECIFICATION_TITLE
- See Also:
- Constant Field Values
-
HD_SPECIFICATION_VENDOR
public static final String HD_SPECIFICATION_VENDOR
- See Also:
- Constant Field Values
-
HD_SPECIFICATION_VERSION
public static final String HD_SPECIFICATION_VERSION
- See Also:
- Constant Field Values
-
bundle
protected org.osgi.framework.Bundle bundle
-
name
protected String name
-
category
protected String category
-
PACKAGE_REF_START
public static final Pattern PACKAGE_REF_START
-
PACKAGE_REF_OPTION
public static final Pattern PACKAGE_REF_OPTION
-
-
Constructor Detail
-
OsgiBundleModel
public OsgiBundleModel(@NotNull @NotNull BeanContext context, @NotNull @NotNull org.osgi.framework.Bundle bundle)
-
OsgiBundleModel
public OsgiBundleModel(BeanContext context, org.apache.sling.api.resource.Resource resource)
-
OsgiBundleModel
public OsgiBundleModel(BeanContext context)
-
OsgiBundleModel
public OsgiBundleModel()
-
-
Method Detail
-
initialize
public void initialize(BeanContext context, org.apache.sling.api.resource.Resource resource)
Description copied from class:AbstractSlingBean
This basic initialization sets up the context and resource attributes only, all the other attributes are set 'lazy' during their getter calls.- Specified by:
initialize
in interfaceSlingBean
- Overrides:
initialize
in classAbstractSlingBean
- Parameters:
context
- the scripting context (e.g. a JSP PageContext or a Groovy scripting context)resource
- the resource to use (normally the resource addressed by the request)- See Also:
BeanContext.withResource(Resource)
-
initialize
protected void initialize(@NotNull @NotNull org.osgi.framework.Bundle bundle)
-
isValid
public boolean isValid()
-
isFragment
public boolean isFragment()
-
isFragment
protected static boolean isFragment(@NotNull @NotNull org.osgi.framework.Bundle bundle)
-
getBundleId
@NotNull public @NotNull Long getBundleId()
-
getName
@NotNull public @NotNull String getName()
Description copied from interface:SlingBean
returns the name of the resource wrapped by this bean- Specified by:
getName
in interfaceSlingBean
- Overrides:
getName
in classAbstractSlingBean
-
getSymbolicName
@NotNull public @NotNull String getSymbolicName()
-
getCategory
@NotNull public @NotNull String getCategory()
-
getState
@NotNull public @NotNull OsgiBundleModel.State getState()
-
getState
protected static OsgiBundleModel.State getState(@NotNull @NotNull org.osgi.framework.Bundle bundle)
-
isActive
public boolean isActive()
-
isActive
protected static boolean isActive(org.osgi.framework.Bundle bundle)
-
getLastModified
@NotNull public @NotNull String getLastModified()
-
getVersion
@NotNull public @NotNull String getVersion()
-
getLocation
@NotNull public @NotNull String getLocation()
-
getProvidedServices
@NotNull public @NotNull Iterator<OsgiServiceModel> getProvidedServices()
-
getUsedServices
@NotNull public @NotNull Iterator<OsgiServiceModel> getUsedServices()
-
getExported
public Collection<OsgiBundleModel.Exported> getExported()
-
getExported
@Nullable public @Nullable OsgiBundleModel.Exported getExported(@NotNull @NotNull String symbolicName)
-
getExportedSet
public Map<String,OsgiBundleModel.Exported> getExportedSet()
-
getImported
public Collection<OsgiBundleModel.Imported> getImported()
-
getImported
@Nullable public @Nullable OsgiBundleModel.Imported getImported(@NotNull @NotNull String symbolicName)
-
getImportedSet
public Map<String,OsgiBundleModel.Imported> getImportedSet()
-
getResolved
public Collection<OsgiBundleModel.Resolved> getResolved()
-
getResolved
@Nullable public @Nullable OsgiBundleModel.Resolved getResolved(@NotNull @NotNull String symbolicName)
-
getResolvedSet
public Map<String,OsgiBundleModel.Resolved> getResolvedSet()
-
scanPackgeReferences
@NotNull protected @NotNull OsgiBundleModel.PackageSet scanPackgeReferences(@NotNull @NotNull String references)
-
getBundleContext
protected org.osgi.framework.BundleContext getBundleContext()
-
-