public DeploymentImpl(VirtualFile rootFile, String location, String symbolicName, Version version) { if (rootFile == null) throw new IllegalArgumentException("Null rootFile"); if (location == null) location = rootFile.getPathName(); if (symbolicName == null) symbolicName = rootFile.getName(); if (version == null) version = Version.emptyVersion; this.rootFile = rootFile; this.location = location; this.symbolicName = symbolicName; this.version = version.toString(); try { this.rootURL = rootFile.toURL(); } catch (IOException ex) { throw new IllegalStateException("Cannot obtain root URL", ex); } }
protected Bundle installBundle(String location) throws BundleException, IOException { try { new URL(location); } catch (Exception e) { location = getTestHelper().getTestArchivePath(location); } return getSystemContext().installBundle(location); }