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()); version.put("name", pluginContext.getPluginBundle().getPluginBundleVersion().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; }