connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java
equal
deleted
inserted
replaced
295 Check.checkContract(connectionTypeIdMap != null); |
295 Check.checkContract(connectionTypeIdMap != null); |
296 return connectionTypeIdMap.get(identifier); |
296 return connectionTypeIdMap.get(identifier); |
297 } |
297 } |
298 |
298 |
299 public Collection<IConnectionType> getConnectionTypes() { |
299 public Collection<IConnectionType> getConnectionTypes() { |
300 return connectionTypeIdMap.values(); |
300 return new ArrayList<IConnectionType>(connectionTypeIdMap.values()); |
301 } |
301 } |
302 |
302 |
303 public Collection<IService> getCompatibleServices(IConnectionType connectionType) { |
303 public Collection<IService> getCompatibleServices(IConnectionType connectionType) { |
304 Check.checkContract(connectionTypeToServices != null); |
304 Check.checkContract(connectionTypeToServices != null); |
305 Collection<IService> services = connectionTypeToServices.get(connectionType); |
305 Collection<IService> services = connectionTypeToServices.get(connectionType); |
306 if (services != null) |
306 if (services != null) |
307 return services; |
307 return new ArrayList<IService>(services); |
308 return Collections.EMPTY_LIST; |
308 return Collections.EMPTY_LIST; |
309 } |
309 } |
310 |
310 |
311 /* (non-Javadoc) |
311 /* (non-Javadoc) |
312 * @see com.nokia.carbide.remoteconnections.registry.IConnectionStore#addConnection(com.nokia.carbide.remoteconnections.extensions.IConnection) |
312 * @see com.nokia.carbide.remoteconnections.registry.IConnectionStore#addConnection(com.nokia.carbide.remoteconnections.extensions.IConnection) |
401 |
401 |
402 /* (non-Javadoc) |
402 /* (non-Javadoc) |
403 * @see com.nokia.carbide.remoteconnections.registry.IConnectionStore#getConnections() |
403 * @see com.nokia.carbide.remoteconnections.registry.IConnectionStore#getConnections() |
404 */ |
404 */ |
405 public Collection<IConnection> getConnections() { |
405 public Collection<IConnection> getConnections() { |
406 return connectionToConnectedServices.keySet(); |
406 return new ArrayList<IConnection>(connectionToConnectedServices.keySet()); |
407 } |
407 } |
408 |
408 |
409 public Collection<IConnectedService> getConnectedServices(IConnection connection) { |
409 public Collection<IConnectedService> getConnectedServices(IConnection connection) { |
410 return connectionToConnectedServices.get(connection); |
410 return new ArrayList<IConnectedService>(connectionToConnectedServices.get(connection)); |
411 } |
411 } |
412 |
412 |
413 private File getConnectionStorageFile() { |
413 private File getConnectionStorageFile() { |
414 IPath path = RemoteConnectionsActivator.getDefault().getStateLocation().append(CONNECTION_DATA_XML); |
414 IPath path = RemoteConnectionsActivator.getDefault().getStateLocation().append(CONNECTION_DATA_XML); |
415 return path.toFile(); |
415 return path.toFile(); |
437 public IClientServiceSiteUI getClientSiteUI(IService service) { |
437 public IClientServiceSiteUI getClientSiteUI(IService service) { |
438 return new ClientServiceSiteUI(service); |
438 return new ClientServiceSiteUI(service); |
439 } |
439 } |
440 |
440 |
441 public Collection<IService> getServices() { |
441 public Collection<IService> getServices() { |
442 return services; |
442 return new ArrayList<IService>(services); |
443 } |
443 } |
444 |
444 |
445 public IService findServiceByID(String id) { |
445 public IService findServiceByID(String id) { |
446 for (IService service : services) { |
446 for (IService service : services) { |
447 if (service.getIdentifier().equals(id)) |
447 if (service.getIdentifier().equals(id)) |