ZipEntry entry = jarFile.getEntry("META-INF/maven/" + pluginBundleVersion.getGroupId() + "/" + pluginBundleVersion.getArtifactId() + "/pom.xml"); Model model = mavenreader.read(jarFile.getInputStream(entry));
public Path getTempDir() { return pluginManager.getTempDir().resolve(getPluginBundle().getPluginBundleVersion().getGroupId() + "." + getPluginBundle().getPluginBundleVersion().getArtifactId()); }
ObjectNode version = OBJECT_MAPPER.createObjectNode(); version.put("groupId", pluginContext.getPluginBundle().getPluginBundleVersion().getGroupId()); version.put("artifactId", pluginContext.getPluginBundle().getPluginBundleVersion().getArtifactId()); version.put("version", pluginContext.getPluginBundle().getPluginBundleVersion().getVersion()); version.put("description", pluginContext.getPluginBundle().getPluginBundleVersion().getDescription());
SPluginBundleVersion installedVersion = currentlyInstalledPluginBundle.getPluginBundleVersion(); for (PluginBundleVersion pluginBundleVersion : getDatabaseSession().getAll(PluginBundleVersion.class)) { if (pluginBundleVersion.getArtifactId().equals(installedVersion.getArtifactId()) && pluginBundleVersion.getGroupId().equals(installedVersion.getGroupId()) && pluginBundleVersion.getVersion().equals(installedVersion.getVersion())) { installedVersion.setOid(pluginBundleVersion.getOid()); PluginBundleIdentifier pluginBundleIdentifier = new PluginBundleIdentifier(installedVersion.getGroupId(), installedVersion.getArtifactId()); PluginLocation<?> pluginLocation = repositoryKnownLocation.get(pluginBundleIdentifier);
IfcModelInterface allOfType = session.getAllOfType(StorePackage.eINSTANCE.getPluginBundleVersion(), OldQuery.getDefault()); for (PluginBundleVersion pbv : allOfType.getAll(PluginBundleVersion.class)) { if (pbv.getGroupId().equals(pluginBundle.getPluginBundleVersion().getGroupId()) && pbv.getArtifactId().equals(pluginBundle.getPluginBundleVersion().getArtifactId())) { pluginBundleVersion.setArtifactId(sPluginBundleVersion.getArtifactId()); pluginBundleVersion.setDescription(sPluginBundleVersion.getArtifactId()); pluginBundleVersion.setGroupId(sPluginBundleVersion.getGroupId()); pluginBundleVersion.setIcon(sPluginBundleVersion.getIcon());
IfcModelInterface allOfType = session.getAllOfType(StorePackage.eINSTANCE.getPluginBundleVersion(), OldQuery.getDefault()); for (PluginBundleVersion pbv : allOfType.getAll(PluginBundleVersion.class)) { if (pbv.getGroupId().equals(pluginBundle.getPluginBundleVersion().getGroupId()) && pbv.getArtifactId().equals(pluginBundle.getPluginBundleVersion().getArtifactId())) { current.setDescription(sPluginBundleVersion.getArtifactId()); current.setIcon(sPluginBundleVersion.getIcon()); current.setMismatch(sPluginBundleVersion.isMismatch());
public PluginBundleVersion convertFromSObject(SPluginBundleVersion input, PluginBundleVersion result, DatabaseSession session) throws BimserverDatabaseException { if (input == null) { return null; } result.setVersion(input.getVersion()); result.setType(PluginBundleType.values()[input.getType().ordinal()]); result.setDescription(input.getDescription()); result.setMismatch(input.isMismatch()); result.setRepository(input.getRepository()); result.setGroupId(input.getGroupId()); result.setArtifactId(input.getArtifactId()); result.setIcon(input.getIcon()); result.setOrganization(input.getOrganization()); result.setName(input.getName()); result.setDate(input.getDate()); return result; } public SPluginBundleType convertToSObject(PluginBundleType input) {
@Override public SPluginBundle getPluginBundle() { SPluginBundle result = new SPluginBundle(); result.setName(sPluginBundle.getName()); result.setOrganization(sPluginBundle.getOrganization()); if (sPluginBundle.getInstalledVersion() != null) { SPluginBundleVersion installedVersion = new SPluginBundleVersion(); installedVersion.setArtifactId(sPluginBundle.getInstalledVersion().getArtifactId()); installedVersion.setDescription(sPluginBundle.getInstalledVersion().getDescription()); installedVersion.setGroupId(sPluginBundle.getInstalledVersion().getGroupId()); installedVersion.setIcon(sPluginBundle.getInstalledVersion().getIcon()); installedVersion.setMismatch(sPluginBundle.getInstalledVersion().isMismatch()); installedVersion.setName(sPluginBundle.getInstalledVersion().getName()); installedVersion.setOrganization(sPluginBundle.getInstalledVersion().getOrganization()); installedVersion.setRepository(sPluginBundle.getInstalledVersion().getRepository()); installedVersion.setType(sPluginBundle.getInstalledVersion().getType()); installedVersion.setVersion(sPluginBundle.getInstalledVersion().getVersion()); result.setInstalledVersion(installedVersion); } return result; }