package org.opendaylight.controller.usermanager.internal;
-import java.util.Dictionary;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Set;
-
import org.apache.felix.dm.Component;
-import org.opendaylight.controller.clustering.services.ICacheUpdateAware;
import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
import org.opendaylight.controller.configuration.IConfigurationAware;
import org.opendaylight.controller.containermanager.IContainerAuthorization;
* ComponentActivatorAbstractBase.
*
*/
+ @Override
public void init() {
}
* cleanup done by ComponentActivatorAbstractBase
*
*/
+ @Override
public void destroy() {
}
* instantiated in order to get an fully working implementation
* Object
*/
+ @Override
public Object[] getImplementations() {
- return null;
+ return new Object[]{};
}
/**
* also optional per-container different behavior if needed, usually
* should not be the case though.
*/
+ @Override
public void configureInstance(Component c, Object imp, String containerName) {
}
* @return The list of implementations the bundle will support,
* in Global version
*/
+ @Override
protected Object[] getGlobalImplementations() {
- Object[] res = { UserManagerImpl.class };
+ Object[] res = { UserManager.class };
return res;
}
* @param imp implementation to be configured
* @param containerName container on which the configuration happens
*/
+ @Override
protected void configureGlobalInstance(Component c, Object imp) {
- if (imp.equals(UserManagerImpl.class)) {
- // export the service
- Dictionary<String, Set<String>> props = new Hashtable<String, Set<String>>();
- Set<String> propSet = new HashSet<String>();
- propSet.add("usermanager.localUserSaveConfigEvent");
- propSet.add("usermanager.remoteServerSaveConfigEvent");
- propSet.add("usermanager.authorizationSaveConfigEvent");
- props.put("cachenames", propSet);
+ if (imp.equals(UserManager.class)) {
// export the service
- c.setInterface(new String[] { ICacheUpdateAware.class.getName(),
+ c.setInterface(new String[] {
IUserManager.class.getName(),
- IConfigurationAware.class.getName() }, props);
+ IConfigurationAware.class.getName() }, null);
c.add(createServiceDependency().setService(
IClusterGlobalServices.class).setCallbacks(