}
@Override
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
_name = name;
ComponentLocator locator = ComponentLocator.getCurrentLocator();
_managementServer = (ManagementServer)ComponentLocator.getComponent("management-server");
if (_managementServer == null) {
throw new ConfigurationException("unable to get " + ManagementServer.class.getName());
}
_agentMgr = locator.getManager(AgentManager.class);
if (_agentMgr == null) {
throw new ConfigurationException("unable to get " + AgentManager.class.getName());
}
_networkMgr = locator.getManager(NetworkManager.class);
if (_networkMgr == null) {
throw new ConfigurationException("unable to get " + NetworkManager.class.getName());
}
_vmMgr = locator.getManager(UserVmManager.class);
if (_vmMgr == null) {
throw new ConfigurationException("unable to get " + UserVmManager.class.getName());
}
_snapMgr = locator.getManager(SnapshotManager.class);
if (_snapMgr == null) {
throw new ConfigurationException("unable to get " + SnapshotManager.class.getName());
}
_accountMgr = locator.getManager(AccountManager.class);
if (_accountMgr == null) {
throw new ConfigurationException("unable to get " + AccountManager.class.getName());
}
_storageMgr = locator.getManager(StorageManager.class);
if (_storageMgr == null) {
throw new ConfigurationException("unable to get " + StorageManager.class.getName());
}
_eventDao = locator.getDao(EventDao.class);
if (_eventDao == null) {
throw new ConfigurationException("unable to get " + EventDao.class.getName());
}
_vmDao = locator.getDao(UserVmDao.class);
if (_vmDao == null) {
throw new ConfigurationException("unable to get " + UserVmDao.class.getName());
}
_accountDao = locator.getDao(AccountDao.class);
if (_accountDao == null) {
throw new ConfigurationException("unable to get " + AccountDao.class.getName());
}
_volumeDao = locator.getDao(VolumeDao.class);
if (_volumeDao == null) {
throw new ConfigurationException("unable to get " + VolumeDao.class.getName());
}
_routerDao = locator.getDao(DomainRouterDao.class);
if (_routerDao == null) {
throw new ConfigurationException("unable to get " + DomainRouterDao.class.getName());
}
_ipAddressDao = locator.getDao(IPAddressDao.class);
if (_ipAddressDao == null) {
throw new ConfigurationException("unable to get " + IPAddressDao.class.getName());
}
_jobDao = locator.getDao(AsyncJobDao.class);
if(_jobDao == null) {
throw new ConfigurationException("unable to get " + AsyncJobDao.class.getName());
}
_userDao = locator.getDao(UserDao.class);
if(_userDao == null) {
throw new ConfigurationException("unable to get " + UserDao.class.getName());
}
_itMgr = locator.getManager(VirtualMachineManager.class);
if (_itMgr == null) {
throw new ConfigurationException("unable to get " + VirtualMachineManager.class.getName());
}
return true;
}