@Override public String getVersion() { return pluginBundleVersion.getVersion(); }
if (strictDependencyChecking) { VersionRange versionRange = VersionRange.createFromVersion(dependency.getVersion()); String version = pluginBundleIdentifierToPluginBundle.get(pluginBundleIdentifier).getPluginBundleVersion().getVersion(); ArtifactVersion artifactVersion = new DefaultArtifactVersion(version); if (versionRange.containsVersion(artifactVersion)) {
if (sPluginBundleVersion.getVersion().equals(currentlyInstalledPluginBundle.getPluginBundleVersion().getVersion())) { found = true;
PluginBundleIdentifier pluginBundleIdentifier = pluginBundleVersionIdentifier.getPluginBundleIdentifier(); if (pluginBundleIdentifierToPluginBundle.containsKey(pluginBundleIdentifier)) { throw new PluginException("Plugin " + pluginBundleIdentifier.getHumanReadable() + " already loaded (version " + pluginBundleIdentifierToPluginBundle.get(pluginBundleIdentifier).getPluginBundleVersion().getVersion() + ")");
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()); version.put("icon", pluginContext.getPluginBundle().getPluginBundleVersion().getIcon()); return true; } else if (getPluginContext().getPluginType() == PluginSourceType.JAR_FILE) { version.put("nonce", pluginContext.getPluginBundle().getPluginBundleVersion().getVersion()); response.setContentType("application/json"); response.getOutputStream().write(version.toString().getBytes(Charsets.UTF_8));
public Object sGet(SField sField) { if (sField.getName().equals("version")) { return getVersion();
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());
+ pluginBundleIdentifierToPluginBundle.get(pluginBundleVersionIdentifier.getPluginBundleIdentifier()).getPluginBundleVersion().getVersion() + ")");
current.setRepository(sPluginBundleVersion.getRepository()); current.setType(getSConverter().convertFromSObject(sPluginBundleVersion.getType())); current.setVersion(sPluginBundleVersion.getVersion()); current.setOrganization(sPluginBundleVersion.getOrganization()); current.setName(sPluginBundleVersion.getName());
pluginBundleVersion.setRepository(sPluginBundleVersion.getRepository()); pluginBundleVersion.setType(getSConverter().convertFromSObject(sPluginBundleVersion.getType())); pluginBundleVersion.setVersion(sPluginBundleVersion.getVersion()); pluginBundleVersion.setOrganization(sPluginBundleVersion.getOrganization()); pluginBundleVersion.setName(sPluginBundleVersion.getName());
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; }