connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/installpackages/InstallPackages.java
equal
deleted
inserted
replaced
64 IRemoteAgentInstallerProvider getRemoteAgentInstallerProvider(); |
64 IRemoteAgentInstallerProvider getRemoteAgentInstallerProvider(); |
65 } |
65 } |
66 |
66 |
67 private final IServerData serverData; |
67 private final IServerData serverData; |
68 private List<PackageType> packageList; |
68 private List<PackageType> packageList; |
69 private IPath serverPath; |
69 private String serverPath; |
70 |
70 |
71 public InstallPackages(IServerData serverData, IRunnableContext runnableContext) { |
71 public InstallPackages(IServerData serverData, IRunnableContext runnableContext) { |
72 Check.checkArg(serverData); |
72 Check.checkArg(serverData); |
73 this.serverData = serverData; |
73 this.serverData = serverData; |
74 if (runnableContext == null) |
74 if (runnableContext == null) |
164 if (foundOpenBrace) |
164 if (foundOpenBrace) |
165 out.write(c); |
165 out.write(c); |
166 } |
166 } |
167 out.close(); |
167 out.close(); |
168 in.close(); |
168 in.close(); |
169 URL url = masterFile.toURL(); |
169 URL url = masterFile.toURI().toURL(); |
170 return loadPackages(url); |
170 return loadPackages(url); |
171 } |
171 } |
172 |
172 |
173 return null; |
173 return null; |
174 } |
174 } |
212 } |
212 } |
213 return url.toString(); |
213 return url.toString(); |
214 } |
214 } |
215 |
215 |
216 private String getRelativePath(String installFilePath) { |
216 private String getRelativePath(String installFilePath) { |
217 IPath path = getServerPath(); |
217 String path = getServerPath(); |
218 return path.append(installFilePath).toString(); |
218 return path + "/" + installFilePath; |
219 } |
219 } |
220 |
220 |
221 private IPath getServerPath() { |
221 private String getServerPath() { |
222 if (serverPath != null) |
222 if (serverPath != null) |
223 return serverPath; |
223 return serverPath; |
224 // see if there's an alternate server, otherwise use IServerData |
224 // see if there's an alternate server, otherwise use IServerData |
225 Location installLocation = Platform.getInstallLocation(); |
225 Location installLocation = Platform.getInstallLocation(); |
226 URL url = installLocation.getURL(); |
226 URL url = installLocation.getURL(); |
233 properties.load(is); |
233 properties.load(is); |
234 is.close(); |
234 is.close(); |
235 String key = serverData.getRemoteAgentInstallerProvider().getService().getIdentifier(); |
235 String key = serverData.getRemoteAgentInstallerProvider().getService().getIdentifier(); |
236 String pathStr = (String) properties.get(key); |
236 String pathStr = (String) properties.get(key); |
237 if (pathStr != null) |
237 if (pathStr != null) |
238 return serverPath = new Path(pathStr); |
238 return serverPath = pathStr; |
239 } catch (IOException e) { |
239 } catch (IOException e) { |
240 RemoteConnectionsActivator.logError(e); |
240 RemoteConnectionsActivator.logError(e); |
241 } |
241 } |
242 return new Path(""); //$NON-NLS-1$ |
242 return ""; //$NON-NLS-1$ |
243 } |
243 } |
244 } |
244 } |