org.wso2.carbon.registry.core.internal
Class RegistryCoreServiceComponent

java.lang.Object
  extended by org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent

public class RegistryCoreServiceComponent
extends Object

The Registry Kernel Declarative Service Component.


Nested Class Summary
static class RegistryCoreServiceComponent.DefaultSimulationService
          This is an implementation of the Simulation Service which is used to simulate handlers.
 
Constructor Summary
RegistryCoreServiceComponent()
           
 
Method Summary
protected  void activate(org.osgi.service.component.ComponentContext context)
          Activates the Registry Kernel bundle.
static void addAuthorizeRoleListener(int executionId, String path, String permission, String executeAction, String[] actions)
          Method to add an authorize role listener.
 RegistryService buildRegistryService()
          Builds the OSGi service for this Registry instance.
protected  void deactivate(org.osgi.service.component.ComponentContext context)
          Deactivates the Registry Kernel bundle.
static org.osgi.framework.BundleContext getBundleContext()
          Gets the instance of the bundle context in use.
static org.wso2.carbon.caching.impl.CacheInvalidator getCacheInvalidator()
          Method to return the CacheInvalidator OSGI service interface
static org.wso2.carbon.user.core.service.RealmService getRealmService()
          Gets the instance of the realm service in use.
static RegistryConfiguration getRegistryConfig()
          Deprecated. 
static RegistryService getRegistryService()
          Method to obtain an instance of the OSGi Registry Service.
 void registerBuiltInHandlers(RegistryService registryService)
          Method to register built-in handlers.
protected  void setCacheInvalidatorService(org.wso2.carbon.caching.impl.CacheInvalidator _cacheInvalidator)
          Method to set the CahceInvalidator.
protected  void setRealmService(org.wso2.carbon.user.core.service.RealmService realmService)
          Method to set the realm service used.
static void setRegistryConfig(RegistryConfiguration registryConfig)
          Deprecated. 
protected  void setStatisticsCollector(StatisticsCollector statisticsCollector)
          Method to set a register collector service.
 void setupMounts(RegistryService registryService, int tenantId)
           
protected  void unSetCacheInvalidatorService(org.wso2.carbon.caching.impl.CacheInvalidator _cacheInvalidator)
          This method is called when the current cache invalidator becomes un-available.
protected  void unsetRealmService(org.wso2.carbon.user.core.service.RealmService realmService)
          This method is called when the current realm service becomes un-available.
protected  void unsetStatisticsCollector(StatisticsCollector statisticsCollector)
          Method to set a un-register collector service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryCoreServiceComponent

public RegistryCoreServiceComponent()
Method Detail

activate

protected void activate(org.osgi.service.component.ComponentContext context)
Activates the Registry Kernel bundle.

Parameters:
context - the OSGi component context.

deactivate

protected void deactivate(org.osgi.service.component.ComponentContext context)
Deactivates the Registry Kernel bundle.

Parameters:
context - the OSGi component context.

setupMounts

public void setupMounts(RegistryService registryService,
                        int tenantId)

registerBuiltInHandlers

public void registerBuiltInHandlers(RegistryService registryService)
                             throws RegistryException
Method to register built-in handlers.

Parameters:
registryService - the registry service instance.
Throws:
RegistryException - if an error occurred.

buildRegistryService

public RegistryService buildRegistryService()
                                     throws Exception
Builds the OSGi service for this Registry instance.

Returns:
the OSGi service
Throws:
Exception - if the creation of the Registry service fails.

setCacheInvalidatorService

protected void setCacheInvalidatorService(org.wso2.carbon.caching.impl.CacheInvalidator _cacheInvalidator)
Method to set the CahceInvalidator. This will be used to invalidate the global cache in all the instance subscribed to the same topic in different cluster domains This method is called when the CacheInvalidator OSGI Service is available.

Parameters:
_cacheInvalidator - the cache invalidator service.

unSetCacheInvalidatorService

protected void unSetCacheInvalidatorService(org.wso2.carbon.caching.impl.CacheInvalidator _cacheInvalidator)
This method is called when the current cache invalidator becomes un-available.

Parameters:
_cacheInvalidator - the current cache invalidator instance

getCacheInvalidator

public static org.wso2.carbon.caching.impl.CacheInvalidator getCacheInvalidator()
Method to return the CacheInvalidator OSGI service interface

Returns:
CacheInvalidator OSGI service interface

setRealmService

protected void setRealmService(org.wso2.carbon.user.core.service.RealmService realmService)
Method to set the realm service used. This will be used when creating the registry context. This method is called when the OSGi Realm Service is available.

Parameters:
realmService - the realm service.

unsetRealmService

protected void unsetRealmService(org.wso2.carbon.user.core.service.RealmService realmService)
This method is called when the current realm service becomes un-available.

Parameters:
realmService - the current realm service instance, to be used for any cleaning-up.

setStatisticsCollector

protected void setStatisticsCollector(StatisticsCollector statisticsCollector)
Method to set a register collector service.

Parameters:
statisticsCollector - the statistics collector service.

unsetStatisticsCollector

protected void unsetStatisticsCollector(StatisticsCollector statisticsCollector)
Method to set a un-register collector service.

Parameters:
statisticsCollector - the statistics collector service.

getRegistryConfig

@Deprecated
public static RegistryConfiguration getRegistryConfig()
Deprecated. 


setRegistryConfig

@Deprecated
public static void setRegistryConfig(RegistryConfiguration registryConfig)
Deprecated. 


addAuthorizeRoleListener

public static void addAuthorizeRoleListener(int executionId,
                                            String path,
                                            String permission,
                                            String executeAction,
                                            String[] actions)
Method to add an authorize role listener.

Parameters:
executionId - the execution order identifier
path - the resource (or collection) path
permission - the permission
executeAction - the execute action required.
actions - the actions to which the role would be authorized.
See Also:
AuthorizeRoleListener

getRealmService

public static org.wso2.carbon.user.core.service.RealmService getRealmService()
Gets the instance of the realm service in use.

Returns:
the instance of the realm service.

getBundleContext

public static org.osgi.framework.BundleContext getBundleContext()
Gets the instance of the bundle context in use.

Returns:
the instance of the bundle context.

getRegistryService

public static RegistryService getRegistryService()
Method to obtain an instance of the OSGi Registry Service.

Returns:
instance of the OSGi Registry Service.


Copyright © 2014 WSO2 Inc. All Rights Reserved.