org.apache.clerezza.permissiondescriptions
Class PermissionGatherer
java.lang.Object
org.apache.clerezza.permissiondescriptions.PermissionGatherer
- All Implemented Interfaces:
- EventListener, org.osgi.framework.BundleListener
@Service(value=PermissionGatherer.class)
@Reference(name="permissionProvider",
policy=DYNAMIC,
referenceInterface=PermissionDescriptionsProvider.class,
cardinality=OPTIONAL_MULTIPLE)
public class PermissionGatherer- extends Object
- implements org.osgi.framework.BundleListener
This binds all implementations of PermissionDescriptionsProvider,
and gathers their PermissionDescriptions. Furthermore the gatherer
scans all activaded bundles for Permissions which are annonated with the
PermissionInfo annotation and generates PermissionDescriptions
for them. This service provides methods to retrieve the gathered
PermissionDescriptions and also methods to retrieve all unannotated
Permission found in the activated bundles. If new bundles are
started then they are also scanned.
- Author:
- mir
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PermissionGatherer
public PermissionGatherer()
getPermissionDescriptorsPerBundles
public Map<org.osgi.framework.Bundle,Collection<PermissionDescripton>> getPermissionDescriptorsPerBundles()
getAllPermissionDescriptors
public Iterator<PermissionDescripton> getAllPermissionDescriptors()
getPermissionsPerBundles
public Map<org.osgi.framework.Bundle,Collection<Class<? extends Permission>>> getPermissionsPerBundles()
getAllPermissions
public Iterator<Class<? extends Permission>> getAllPermissions()
activate
protected void activate(org.osgi.service.component.ComponentContext componentContext)
bindPermissionProvider
protected void bindPermissionProvider(org.osgi.framework.ServiceReference serviceReference)
unbindPermissionProvider
protected void unbindPermissionProvider(org.osgi.framework.ServiceReference serviceReference)
deactivate
protected void deactivate(org.osgi.service.component.ComponentContext componentContext)
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event)
- Specified by:
bundleChanged in interface org.osgi.framework.BundleListener
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.